django - South not detecting new model file in model folder -
I am working with a current project that projects south. Within each app there is a model folder where the model is stored in separate files. I've added a new file (shown below), but when I try to create a migration file for the model, the south fails to detect the new file and says: "Nothing has changed. " My question is, what is the correct way to find this new model in South? Thank you. Import Django.contrib.auth.models, Import groups from django.contrib import model to django.db import admin class. AdgroupEmailRecipients (models.model): users = models.ForeignKey (user) class meta: app_label = 'wifipromo' class ad-group email correspondence admin (admin.model admin): list_display = ('user_first_name', 'user_lost_name', 'user_mail ') DEF user_first_name (auto, obg): return obj.users.first_name user_first_name.short_description = "first name" def user_last_name (self, obj): return obj.users.last_name user_last_name.short_description = "last name" def user_email (self , Obj) obj.users.email user_email.short_description = "email"
The model The Holder of the __ init __.py
file, you import the south or even model Sinkrad to detect it. Actually Django is just looking for a file with all its models ... and if you import it in init .py, then the system will see this.
Comments
Post a Comment