Hi,
I have no idea how you would go about doing this as I've done very
little with the admin interface besides what it does for you, but I'd
be very interested to hear what you find.
Dan.
2008/7/12 Christian Kortenhorst <[EMAIL PROTECTED]>:
> Hey All
>
> Just been messing around with django and found that can not seam to get
> admin to work how, it does not support multilayer input I want it I know
> there is some way of writing your own "view", but wondering would it be
> possible to write a multilayer setup or what is the wok around or what
> should i be looking for?
>
> my setup is
>
> <python>
> class Faculty(models.Model):
> class Admin: pass
> name = models.CharField(maxlength=200)
> director = models.CharField(maxlength=200)
> web_url = models.CharField(maxlength=200)
>
> def __str__(self):
> return self.name
>
> class School(models.Model):
> class Admin: pass
>
> faculty = models.ForeignKey(Faculty)
> name = models.CharField(maxlength=200)
>
> def __str__(self):
> return self.name
>
> class Programme(models.Model):
> class Admin: pass
>
> duration_choices = (
> ('Years', 'years'),
> ('Days', 'days')
> )
>
> school = models.ForeignKey(School)
> name = models.CharField(maxlength=200)
> description = models.CharField(maxlength=1000)
>
> def __str__(self):
> return self.name
>
> class Stream(models.Model):
> class Admin: pass
> programme_code = models.ForeignKey(Programme,
> edit_inline=models.TABULAR, num_in_admin=3)
> stream_number = models.IntegerField(core=True)
>
> .....
>
> </python>
>
> Want to be able to click in and keep adding programs to a school and when i
> do that a new box is created and a steam is created.
>
> e.g.
>
> add a Faculty
> -> input for school is shown
> -> add a school
> -> -> input for Programme is shown
> -> -> add a programme
> -> -> -> etc..
>
> also the option to add new school and program so can have a one to many
> relationship.
>
> Thanks
> Christian K
>
> --
> Christian Kortenhorst
> mod: +353-(0)87-6183349
> home: +353-(0)1-4966287
>
>
> --
> Christian Kortenhorst
> mod: +353-(0)87-6183349
> home: +353-(0)1-4966287
> >
>
--
Daniel Kersten.
Leveraging dynamic paradigms since the synergies of 1985.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Python Ireland" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.ie/group/pythonireland?hl=en
-~----------~----~----~----~------~----~------~--~---