Trying
So I have a realestate app to a data transfer where I have a new "directory" entry " I am. "apps that I've created
I like startmigration:
python manage.py startmigration listings migrate_listings --freeze realestate
Empty migration, which I created populated with:
Def Forward (Self, ORM): For the listing in ORM "Write Your Further Travel Here" ['realestate.RealEstateLis Ting '] Kobjektskal (): Sub_taip = Ormksubteepekobjektskget (Slg_uarel = Slugify (Listingklisting_taipknam)) lt = Ormklisting (Listing_taip = Sub_taipkparent, Sub_taip = Sub_taip, Akspiration_det = Listings .expiration_date, Title = listing.title, slug_url = listing.slug_url, Description = listing.description, contact_person = listing.contact_person, secondary_contact = listing.secondary_contact, address = listing.address, location = listing.location, price = listing.price , pricing_option = listing.pricing_option, display_picture = listing.display_picture, image_gallery = listing.image_gallery, DATE_ADDED = listing.date_added, status = listing.status, featured_on_homepage = listing.featured_on_homepage,) lt.save () feet listing.property_features.all the lt.features.clear (): lt.features.add (feet) for CFT list .community_features.all: lt.features.add (cft) lt.restrictions.clear (for ) Lt.restrictions.add (s)
However when I run the migration still get this error:
whiney_method
ValueError ("You can not illustrate a stub model") I understand you can not use a "stub" model using fakeorm but can not use freezing of extra apps
Not allowed. How do I go about using them without the cold "stub" model?
OK I am answering my own question, because I am the only Diego South user. I had to understand what I had to do.
What I was not doing, all the apps that were necessary in migration, were cold. Since I was not stabilized, this stub model was prepared
More applications have good syntax for freezing.
Python manage.py startmigration listing migrate_listings realestate --freeze - Freeze Logistics - Freezes Media --Freeze Upload
And then everything works is!
Comments
Post a Comment