forked from beba/foerderbarometer
new: empty views and project.pid
This commit is contained in:
parent
73225ea284
commit
8db27707e1
|
@ -10,7 +10,7 @@ class ProjectForm(ModelForm):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Project
|
model = Project
|
||||||
fields = '__all__'
|
exclude = ('pid',)
|
||||||
|
|
||||||
class VolunteerForm(ModelForm):
|
class VolunteerForm(ModelForm):
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@ class VolunteerForm(ModelForm):
|
||||||
class LibraryForm(ModelForm):
|
class LibraryForm(ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Library
|
model = Library
|
||||||
# fields = '__all__'
|
|
||||||
exclude = ('realname', 'email', 'username')
|
exclude = ('realname', 'email', 'username')
|
||||||
|
|
||||||
class IFGForm(ModelForm):
|
class IFGForm(ModelForm):
|
||||||
|
|
|
@ -14,6 +14,8 @@ class Project(Volunteer):
|
||||||
start = models.DateTimeField('start date')
|
start = models.DateTimeField('start date')
|
||||||
# contact = models.ForeignKey(Volonteer, on_delete = models.CASCADE, null = True)
|
# contact = models.ForeignKey(Volonteer, on_delete = models.CASCADE, null = True)
|
||||||
|
|
||||||
|
pid = models.IntegerField(null=True) # automaticly generated
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ from formtools.wizard.views import CookieWizardView
|
||||||
from .forms import ProjectForm, VolunteerForm, LibraryForm, IFGForm
|
from .forms import ProjectForm, VolunteerForm, LibraryForm, IFGForm
|
||||||
from .models import Project
|
from .models import Project
|
||||||
|
|
||||||
def intern(request):
|
def project(request):
|
||||||
# return HttpResponse("Hello, world. You're at the input form")
|
# return HttpResponse("Hello, world. You're at the input form")
|
||||||
# ProjectFormSet = modelformset_factory(Project, fields='__all__')
|
# ProjectFormSet = modelformset_factory(Project, fields='__all__')
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
|
@ -24,6 +24,16 @@ def intern(request):
|
||||||
form = ProjectForm()
|
form = ProjectForm()
|
||||||
return render(request, 'input/project.html', {'form': form})
|
return render(request, 'input/project.html', {'form': form})
|
||||||
|
|
||||||
|
def accreditation(request):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def travel(request):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def certificate(request):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def done(request):
|
def done(request):
|
||||||
return HttpResponse("Your data is save now.")
|
return HttpResponse("Your data is save now.")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue