Re: A Model to store links to other models

2010-11-22 Thread Micah Carrick
Hey guys, I could use some advice on the next steps for the administration. I am passing the link groups to the template via context so that the template can iterate over each group creating a unordered list of links for each group. Some links are blog posts, some are flat pages, etc. Works great.

Re: A Model to store links to other models

2010-11-20 Thread Micah Carrick
I had not seen the generic relationships and ContentType. I'm going to play with that a bit. Thanks everybody! 2010/11/20 Łukasz Rekucki > On 20 November 2010 02:51, Micah Carrick wrote: > > I'm having trouble coming up with a pretty solution to a seemingly simple > > task. I'm relatively new

Re: A Model to store links to other models

2010-11-20 Thread Łukasz Rekucki
On 20 November 2010 02:51, Micah Carrick wrote: > I'm having trouble coming up with a pretty solution to a seemingly simple > task. I'm relatively new to Django. > > I want to allow the end user to control various lists of links on the site > used for navigation. The admin should allow the creatio

Re: A Model to store links to other models

2010-11-20 Thread Mark (Nosrednakram)
Hello Micah, I'm not sure I understand what you're attempting to do but if so I'd look at using a foreign key to ContentType, and storing the pk for associating objects rather than a CharField. The key is using ContentType.model_class() to re-create the class. This allows you to store any object

Re: A Model to store links to other models

2010-11-19 Thread Steve Holden
On 11/19/2010 8:51 PM, Micah Carrick wrote: > I'm having trouble coming up with a pretty solution to a seemingly > simple task. I'm relatively new to Django. > > I want to allow the end user to control various lists of links on the > site used for navigation. The admin should allow the creation of

A Model to store links to other models

2010-11-19 Thread Micah Carrick
I'm having trouble coming up with a pretty solution to a seemingly simple task. I'm relatively new to Django. I want to allow the end user to control various lists of links on the site used for navigation. The admin should allow the creation of "link groups" which have a collection of "links". The