Skip to content

Instantly share code, notes, and snippets.

@camilosanchez
Created January 7, 2014 10:05
Show Gist options
  • Save camilosanchez/8297252 to your computer and use it in GitHub Desktop.
Save camilosanchez/8297252 to your computer and use it in GitHub Desktop.
forms.py
from django import forms
from django.forms import ModelForm
from models import Offer, Consumer
# Login Form
#class LoginForm(forms.Form):
# username = forms.EmailField()
# password = forms.CharField(widget=forms.PasswordInput())
class OfferForm(ModelForm):
class Meta:
model = Offer
exclude = ["offer_owner"]
class ConsumerForm(ModelForm):
class Meta:
model = Consumer
# exclude = ["offer_obtained", ""]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment