Tuesday, July 26, 2016

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

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

On Tue, Jul 26, 2016 at 4:17 PM, Jani Tiainen <redetin@gmail.com> wrote:
Hi,

Sounds like you're in need of data migrations to insert initial data while building up your database schema.


On 26.07.2016 11:14, Seti Volkylany wrote:
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.
--
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/4884ce55-8862-4c0f-967e-710ea36b9175%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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/57971C8F.1030508%40gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
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/CANtEdp7ErBZLxrm52rAjem2rVEd-1F13CQtt6MLg0dPuDR_ShA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment