djangosnippets.org: Latest snippets posted by JustDelighthttp://djangosnippets.org/users/JustDelight/2013-02-27T03:08:27.346020-06:00JustDelightProper fixtures loading in south data migrations
2013-02-27T03:08:27.346020-06:00JustDelighthttp://djangosnippets.org/snippets/2897/<p>South documentation <a href="http://south.readthedocs.org/en/0.7.6/fixtures.html#fixtures-from-migrations">contains a description</a> of the way you can load fixtures inside the data-migrations.</p>
<p>def forwards(self, orm):
from django.core.management import call_command
call_command("loaddata", "my_fixture.json")</p>
<p>It seems pretty clear and easy, but in fact it does not work the way you expect from south migrations, because the fixture loading does not …</p>
Freely redistributableCitySelector
2012-02-23T06:24:08.007374-06:00JustDelighthttp://djangosnippets.org/snippets/2692/<p>CitySelector is a jquery widget, allowing to pick cities from DB, filled by django_ipgeobase application.
Also it includes widget for django forms, based on mentioned jquery plugin, views and urlconf, required to provide
interaction between widget and DB and middleware, populating request with correspondent location.</p>
<p>Visit https://bitbucket.org/JustDelight/city_selector</p>
Freely redistributable