Login

Snippets by kmmbvnr

Snippet List

Seamless Django and VirtualEnv integration

Automatically activates the virtualenv when running manage.py command. Just create requirements.pip file inside the root of django project and run ./manage.py update_ve in first time. Code checks requirements.pip and virtual env timestamps and require to recreate outdated environment.

  • pip
  • virtualenv
Read More

ModelValue for djagno-livesettings

Extension for django-livesettings project - http://bitbucket.org/bkroeze/django-livesettings/ Allow to specify the model instance in settings Usage: config_register( ModelValue(BASE_GROUP, 'TestValue', queryset = Value.objects.all(), required=False)

  • livesettings
Read More

Preview tag for fields with choices

django.contrib.formtools in preview displaying only field.data by default. Its not convenient to see integer value for fields with radio buttons or select choices. This custom tag trying to show string value from choices if available.

  • template
  • tag
  • newforms
  • preview
Read More

kmmbvnr has posted 4 snippets.