Accessing data entered into multiple Django forms and generating them onto a new URL
- by pedjk
I have a projects page where users can start up new projects. Each project has two forms.
The two forms are:
class ProjectForm(forms.Form):
Title = forms.CharField(max_length=100, widget=_hfill)
class SsdForm(forms.Form):
Status = forms.ModelChoiceField(queryset=P.ProjectStatus.objects.all())
With their respective models as follows:
class Project(DeleteFlagModel):
Title = models.CharField(max_length=100)
class Ssd(models.Model):
Status = models.ForeignKey(ProjectStatus)
Now when a user fills out these two forms, the data is saved into the database. What I want to do is access this data and generate it onto a new URL. So I want to get the "Title" and the "Status" from these two forms and then show them on a new page for that one project. I don't want the "Title" and "Status" from all the projects to show up, just for one project at a time. If this makes sense, how would I do this?
I'm very new to Django and Python (though I've read the Django tutorials) so I need as much help as possible.
Thanks in advance
Edit:
The ProjectStatus code is (under models):
class ProjectStatus(models.Model):
Name = models.CharField(max_length=30)
def __unicode__(self):
return self.Name