Wednesday, December 28, 2016

Re: Can I close the feature that django orm will create table when a modal create?

You'll want to set Meta.managed = False on the model.

https://docs.djangoproject.com/en/stable/ref/models/options/#managed

On Wednesday, December 28, 2016 at 7:17:31 AM UTC-5, tinybox wrote:
Hi everyone,
    I am a beginner about django. 
    It seems django will create a table when the modal first create, but I want to create table in database by myself and forbid django creating table automatically. 
    What can I do in setting.py?

    Thanks~

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/fa69ade1-676d-4f90-805a-9aebcaee269c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment