It is possible to somehow fill the database data as soon as all applications will be loaded?

23 views
Skip to first unread message

Seti Volkylany

unread,
Jul 26, 2016, 4:14:52 AM7/26/16
to Django users
It is possible to somehow fill the database data as soon as all applications will be loaded.
I explain the problem. It is necessary that the default database was an urgent data for the entire project, in my case, tags, level of accounts and professions.
To resolve this problem, I created the necessary commands. For example, for tags that command is "create_tags" (called so ./manage.py create_tags). It creates all the necessary tags for all other objects: articles, questions, answers, snippets and so.

The question is next, how to run it once as soon as Django will be able to fill these databases.

Jani Tiainen

unread,
Jul 26, 2016, 4:18:06 AM7/26/16
to django...@googlegroups.com
Hi,

Sounds like you're in need of data migrations to insert initial data while building up your database schema.
--
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...@googlegroups.com.
To post to this group, send email to django...@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/4884ce55-8862-4c0f-967e-710ea36b9175%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Siddharth Ghumre

unread,
Jul 26, 2016, 4:37:33 AM7/26/16
to django...@googlegroups.com
For Django version 1.7 and above use migrations to load initial data as South is inbuilt included in these versions. Prior to version Django 1.7 (1.6 and below) use fixtures to load initial data.


Hope this helps.

-Sid

Reply all
Reply to author
Forward
0 new messages