Re: Right way to use this ForeignKey

2006-12-03 Thread phess
nes and > dates (or whatever) and you can type the first few characters of the > magazine name to find yourself in the right general area. That's what I'd been using, but it felt plain wrong. Once again, thanks a lot! Phess --~--~-~--~~~---~--~~ You recei

Re: Right way to use this ForeignKey

2006-12-03 Thread phess
zine, number) Phess --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMA

Right way to use this ForeignKey

2006-12-03 Thread phess
I'm stuck at what I think should have been one of the easiest steps of building my magazines website: the models. :( I really feel stupid for that, so please tell me the right way to do this. This is what I have: Magazines, with many Issues each, and articles, which belong to only one Magazine,

Re: Inheritance through a ForeignKey field

2006-12-01 Thread phess
I just saw the source of all my problems. This is the code for the Article class: class Article(models.Model): """This class defines an Article, with links to: - a Magazine, - a Section (which depends on the Magazine), and - an Issue (which also depends on the Magazine)""" def

Re: Inheritance through a ForeignKey field

2006-12-01 Thread phess
Sorry, I forgot to actually *ask* the question. :) I'm able to get a list of Sections related to 'Linux Magazine', for example, with: validsections = magazine.section_set.all() This returns this list: [, ] # (so far I've created only these 2 sections) Is there a method to restrict the

Re: Inheritance through a ForeignKey field

2006-12-01 Thread phess
It did help. Thank you very much. But the situation has changed already. :\ I'd like the Admin pages to show me only the Sections and Issues that make sense for the Magazine I choose from the selectbox. So, this is how my model is (sort of): I have a Magazine class, an Issue class and a

Inheritance through a ForeignKey field

2006-11-30 Thread phess
I'm now building an online magazine website. Each magazine has the same set of sections. And every article belongs to one and only one section. So, the Article class has a ForeignKey(Section) line. So far, so good (I guess). :) But there are actually 2 magazines, each with its own group of

html templates for generic views

2006-11-27 Thread phess
I must quickly develop a complete website, so I chose "the Web framework for perfectionists with deadlines". ;) In my first tests with a web-based registration mechanism, I'd like to use default (could be quick n' dirty) templates, but these seem to be unavailable. Since I'm really not