# Path: example_project/demo/models.py
# class Publisher(models.Model):
#     #title = models.CharField(max_length=30, choices=(('Mr', 'Mr'), ('Mrs', 'Mrs'), ('Miss', 'Miss'), ('Dr', 'Dr')), default='Mr')
#     #first_name = models.CharField(max_length=30)
#     #last_name = models.CharField(max_length=30)
#     name = models.CharField(max_length=30)
#     address = models.CharField(max_length=50)
#     city = models.CharField(max_length=60)
#     state_province = models.CharField(max_length=30)
#     country = models.CharField(max_length=50)
#     website = models.URLField()
#     sleazy = models.BooleanField()
# 
#     def __unicode__(self):
#         return self.name


from django.forms import ModelForm, ValidationError, CharField
from .models import Publisher

class PublisherForm(ModelForm):
    name = CharField(help_text='The name of the publisher')
    class Meta:
        model = Publisher

# Path: example_project/demo/models.py
# class Publisher(models.Model):
#     #title = models.CharField(max_length=30, choices=(('Mr', 'Mr'), ('Mrs', 'Mrs'), ('Miss', 'Miss'), ('Dr', 'Dr')), default='Mr')
#     #first_name = models.CharField(max_length=30)
#     #last_name = models.CharField(max_length=30)
#     name = models.CharField(max_length=30)
#     address = models.CharField(max_length=50)
#     city = models.CharField(max_length=60)
#     state_province = models.CharField(max_length=30)
#     country = models.CharField(max_length=50)
#     website = models.URLField()
#     sleazy = models.BooleanField()
# 
#     def __unicode__(self):
#         return self.name


# Path: example_project/demo/forms.py
from django.forms import ModelForm, ValidationError, CharField
from .models import Publisher


class PublisherForm(ModelForm):
    name = CharField(help_text='The name of the publisher')
    class Meta:
        model = Publisher

        fields = ('name', 'address', 'city', 'state_province', 'country', 'website', 'sleazy')