Re: Pass these specific model objects to one template

2016-03-21 Thread Pemby
All of the above seems to be working the way I expect it to. I can get the data I am after and pass it to a template. Now I would like take all objects, of the below model, and pass all these objects it to my '/signup.html/'* IN ADDTION* to what is being passed above so I can start* form *pr

Pass these specific model objects to one template

2016-03-21 Thread Pemby
Person Model class Person( models.Model ): first_name = models.CharField( max_length=50 ) last_name = models.CharField( max_length=50 ) def __str__(self): return "{0} {1}".format( self.first_name, self.last_name ) View Function def getPersonData(request): currP

Django Model | Relationship question. Student->School Class

2015-12-21 Thread Pemby
With this code for example. class Students(models.Model): first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) classChoice1 = ? classChoice2 = ? classChouce3 = ? class Class(models.Model): class_n

Question about using a model as a member in another model.

2015-12-17 Thread Pemby
Hi all, This is totally a beginner question and if this is the incorrect forum for this type of question please let me know! So I have a couple questions. First I have two models a Student (as a signup) a Class (as a Elective) What is the correct way to associate nth amount of students to a