Re: Referring to same model records as a parent

2011-11-29 Thread Andre Terra
Just use django-mptt [1][2], especially after version 0.5 It will do
exactly what you need, except better!


Cheers,
AT

[1] http://django-mptt.github.com/django-mptt/
[2]
http://django-mptt.github.com/django-mptt/overview.html#what-is-django-mptt

On Tue, Nov 29, 2011 at 12:22 PM, fabrixxm  wrote:

> On 28 Nov, 20:25, Swaroop Shankar V  wrote:
> > Hi,
> > I am trying to implement a menu system for my project which would enable
> > the admin to create menu's that will be displayed on the webpage. So i
> > should be able to create sub-menus which will have a parent menu.
>
> https://docs.djangoproject.com/en/dev/ref/models/fields/#foreignkey
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Referring to same model records as a parent

2011-11-29 Thread fabrixxm
On 28 Nov, 20:25, Swaroop Shankar V  wrote:
> Hi,
> I am trying to implement a menu system for my project which would enable
> the admin to create menu's that will be displayed on the webpage. So i
> should be able to create sub-menus which will have a parent menu.

https://docs.djangoproject.com/en/dev/ref/models/fields/#foreignkey

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Referring to same model records as a parent

2011-11-28 Thread Swaroop Shankar V
Hi,
I am trying to implement a menu system for my project which would enable
the admin to create menu's that will be displayed on the webpage. So i
should be able to create sub-menus which will have a parent menu. My table
structure will be as follows

id
name
url
parent_id

Here the parent_id will be the id of the menu of the same table. So on the
admin area i want a select box for the parent_id which will display the
already entered records. How can it be done?

Thanks and Regards,
Swaroop Shankar V

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.