This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.utils.functional import lazy | |
from django.core.urlresolvers import reverse | |
reverse_lazy = lazy(reverse, unicode) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django import forms | |
from django.contrib.auth.models import User | |
from django.contrib.auth.forms import UserCreationForm | |
from django.utils.translation import ugettext as _ | |
class SignupForm(UserCreationForm): | |
def __init__(self, *args, **kwargs): | |
super(SignupForm, self).__init__(*args, **kwargs) | |
self.fields.pop('username') | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.core.management.base import BaseCommand, CommandError | |
from django.core import serializers | |
from optparse import make_option | |
class Command(BaseCommand): | |
""" | |
Generate a fixture file for a specific model. | |
Useage: ./manage.py generate_fixtures app.models.MyModel --file=MyModelsOutputFile.json | |
""" |
NewerOlder