<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Arthur Koziel’s Blog - Latest Comments in Automatical superuser creation with Django</title><link>http://arthurkozielsblog.disqus.com/</link><description></description><atom:link href="https://arthurkozielsblog.disqus.com/automatical_superuser_creation_with_django/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 21 Nov 2008 00:18:00 -0000</lastBuildDate><item><title>Re: Automatical superuser creation with Django</title><link>http://arthurkoziel.com/2008/09/04/automatical-superuser-creation-django/index.html#comment-5239117</link><description>&lt;p&gt;I've been using this technique since you posted it - thanks! Unfortunately, I now want to have initial SQL data loaded into some of my other tables which is keyed off the user - and the initial_data.json fixture is loaded right at the end, after the initial SQL data for the other tables. Can you think of a solution that will still continue to work in this situation?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Richard Davies</dc:creator><pubDate>Fri, 21 Nov 2008 00:18:00 -0000</pubDate></item><item><title>Re: Automatical superuser creation with Django</title><link>http://arthurkoziel.com/2008/09/04/automatical-superuser-creation-django/index.html#comment-5239092</link><description>&lt;p&gt;Thanks for this!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kevin Gann</dc:creator><pubDate>Wed, 01 Oct 2008 12:47:00 -0000</pubDate></item><item><title>Re: Automatical superuser creation with Django</title><link>http://arthurkoziel.com/2008/09/04/automatical-superuser-creation-django/index.html#comment-5239080</link><description>&lt;p&gt;My answer is a mess. I have posted it on my blog with better formatting:&lt;/p&gt;&lt;p&gt;&lt;a href="http://lurkingideas.net/blog/2008/sep/18/creating-django-superuser-automatically/" rel="nofollow noopener" target="_blank" title="http://lurkingideas.net/blog/2008/sep/18/creating-django-superuser-automatically/"&gt;http://lurkingideas.net/blo...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Sorry for littering your blog.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jiri Barton</dc:creator><pubDate>Thu, 18 Sep 2008 13:24:00 -0000</pubDate></item><item><title>Re: Automatical superuser creation with Django</title><link>http://arthurkoziel.com/2008/09/04/automatical-superuser-creation-django/index.html#comment-5239079</link><description>&lt;p&gt;A brilliant idea it is. Let me extend it a bit further. Create an empty application "superuser" and put your dump there. Include this application in your settings:&lt;br&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre&gt;mkdir -p superuser/fixtures&lt;br&gt;touch superuser/__init__.py superuser/models.py&lt;br&gt;./manage dumpdata auth &amp;gt;superuser/fixtures/initial_data.json&lt;br&gt;&lt;pre&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Add 'superuser' to the list of your INSTALLED_APPS in your settings.py. &lt;i&gt;syncdb --noinput&lt;/i&gt; will install the fixture automatically.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/pre&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jiri Barton</dc:creator><pubDate>Thu, 18 Sep 2008 12:39:00 -0000</pubDate></item><item><title>Re: Automatical superuser creation with Django</title><link>http://arthurkoziel.com/2008/09/04/automatical-superuser-creation-django/index.html#comment-5239069</link><description>&lt;p&gt;I've made a script that instead of syncdb. Basically it does the same thing.&lt;/p&gt;&lt;p&gt;import os&lt;br&gt;import sys&lt;br&gt;sys.path.append('..')&lt;/p&gt;&lt;p&gt;SUPERUSER_DATA = {&lt;br&gt;    'username':'admin',&lt;br&gt;    'email':'admin@admin.com', &lt;br&gt;    'password': 'admin'&lt;br&gt;}&lt;/p&gt;&lt;p&gt;os.system('rm -rf db/*') # remove Sqlite files, we store SQlite dbs in ./db&lt;br&gt;os.system('python &lt;a href="http://manage.py" rel="nofollow noopener" target="_blank" title="manage.py"&gt;manage.py&lt;/a&gt; syncdb --noinput')&lt;br&gt;os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'&lt;br&gt;from django.contrib.auth.create_superuser import createsuperuser&lt;br&gt;createsuperuser(**SUPERUSER_DATA)&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">D3f0</dc:creator><pubDate>Sun, 07 Sep 2008 09:20:00 -0000</pubDate></item><item><title>Re: Automatical superuser creation with Django</title><link>http://arthurkoziel.com/2008/09/04/automatical-superuser-creation-django/index.html#comment-5239067</link><description>&lt;p&gt;Really nice. Until now I always used "raw sql" fixtures, without the session thing. Will use this from now on. :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Martin</dc:creator><pubDate>Sat, 06 Sep 2008 02:31:00 -0000</pubDate></item><item><title>Re: Automatical superuser creation with Django</title><link>http://arthurkoziel.com/2008/09/04/automatical-superuser-creation-django/index.html#comment-5239066</link><description>&lt;p&gt;I think a better technique would be to use the ./&lt;a href="http://manage.py" rel="nofollow noopener" target="_blank" title="manage.py"&gt;manage.py&lt;/a&gt; reset [app] command, which will only destroy the data of the apps you're developing, and not of the contrib stuff. As long as you don't touch the user data model, it should be a simpler solution. ./manage sqlreset [app] can be used to check what will be executed prior to doing it&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jean-Philippe Bougie</dc:creator><pubDate>Fri, 05 Sep 2008 23:32:00 -0000</pubDate></item><item><title>Re: Automatical superuser creation with Django</title><link>http://arthurkoziel.com/2008/09/04/automatical-superuser-creation-django/index.html#comment-5239064</link><description>&lt;p&gt;Incredible! Thanks for sharing. Until there's some sort of "usable" migrations for Django, I'm gonna stick with this method of local development.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Metin</dc:creator><pubDate>Fri, 05 Sep 2008 18:06:00 -0000</pubDate></item><item><title>Re: Automatical superuser creation with Django</title><link>http://arthurkoziel.com/2008/09/04/automatical-superuser-creation-django/index.html#comment-5239062</link><description>&lt;p&gt;I am also using the same technique for developing and testing one of my projects. But rather I dump all data from all tables into a fixture.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Aidas Bendoraitis</dc:creator><pubDate>Fri, 05 Sep 2008 05:08:00 -0000</pubDate></item></channel></rss>