System check identified no issues (0 silenced).ĭjango version 2.0.7, using settings 'settings_development_mlazo' project/settings/manage.py runserver 0:8002 -settings=settings_development_mlazo Therefore, django runserver was executed without problems. Obj.product, fields=p_fields, many=False, # and create the following method and call from there the required serializer class Product = serializers.SerializerMethodField() So, as mentioned by the lines above how to solve it ( top-level import ), I proceed to do the following changes : # change Product = srlzprod.ProductsSerializers(fields=,read_only=True,) Promotion_description = serializers.SerializerMethodField() What I wanted to accomplished was the following : class CampaignsProductsSerializers(srlz.DynamicFieldsModelSerializer):īank_name = serializers.CharField(trim_whitespace=True,)Ĭoupon_type = serializers.SerializerMethodField() ModuleNotFoundError: No module named 'product' ![]() I was getting a problem like this : from product import serializers as srlzprod # the line below was the problem 'srlzprod'įrom products import serializers as srlzprod This time my problem was importing Serializers ( django and restframework ) from different modules such as the following : from rest_framework import serializers ![]() I have crossed with this issue many times, but I didnt try to dig deeper about it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |