I'm trying to use the named group from nested choices in my model as part of the url. I currently have:
model.py class Project(models.Model): PROJECT_CHOICES = ( ('Residential', ( ('public', 'Public Houses'), ('private', 'Private Houses'), ('extensions', 'Extensions'), ) ('Public', ( .... ) type = models.CharField(max_length=1, choices=PROJECT_CHOICES) title = models.CharField(max_length=100, verbose_name="Project Name", unique=True) def get_absolute_url(self): return "/projects/%s/%s/" % (self.type, self.title) This works but I'd like to use the named group to produce urls like: .../projects/residential/private/boldt-castle Obviously, I can do this manually but there should be a way of accessing the named group Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---