2017-02-10 23:12:12 +01:00
|
|
|
from django import forms
|
|
|
|
from django.contrib.auth.models import User
|
|
|
|
|
|
|
|
from .models import Profile
|
|
|
|
|
|
|
|
|
|
|
|
class UserForm(forms.ModelForm):
|
|
|
|
class Meta:
|
|
|
|
model = User
|
|
|
|
fields = ["first_name", "last_name"]
|
|
|
|
|
|
|
|
|
|
|
|
class ProfileForm(forms.ModelForm):
|
|
|
|
class Meta:
|
2017-02-11 00:21:11 +01:00
|
|
|
model = Profile
|
2017-08-07 18:56:56 +02:00
|
|
|
fields = ["phone", "departement", "occupation"]
|