Hi!
Thanks for your help..
more informations :
I have downloaded the latest trunk this morning (0.97-pre-SVN-7947),
but nothing changed...
I run django on ubuntu server, python 2.5.1 and mysql 5 (apache +
mod_python).
I have copied the wrong urlPattern, this is the right one:
(r'(?P<section_name>[^/]+)/(?P<boxdossier_id>\d+)/$',
'views.box_detail'),
called by:
(r'^dossiers/', include('jungle.dossiers.urls')),
this is the url..
http://elvis.sinedita.it/dossiers/Comunità/1/
I'm sure that last week, before I downloaded a new trunk all works
well...
Now, that's my models and views:
---- sections/models.py
from django.db import models
from django.contrib.sites.models import Site
class Section(models.Model):
id_site = models.ForeignKey(Site,verbose_name="Sito")
section_name = models.CharField(max_length=100,core=True,
verbose_name="Nome")
template_name = models.CharField(max_length=100,verbose_name="Nome
template",blank=True,null=True)
section_father = models.ForeignKey('self',blank=True,null=True,
verbose_name="Sezione superiore")
---- dossiers/models.py
class Dossier(models.Model):
title = models.TextField(verbose_name =
"titolo" ,max_length=200,core=True)
abstract = models.TextField('sommario',max_length=400,core=True)
section =
models.ManyToManyField(Section,verbose_name="Sezione",filter_interface=models.HORIZONTAL,
null = False)
site = models.ManyToManyField(Site,verbose_name="Sito",
filter_interface=models.HORIZONTAL)
--- dossiers/views.py
def box_detail(request, section_name,boxdossier_id):
my_section =
Section.objects.get(section_name=section_name,id_site=Site.objects.get_current().id)
....
Thanks Davide
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---