an inline field inclusion.
I think a possible solution is to create a custom admin form and add
the site from here.
On 13 mai, 00:03, ksamuel wrote:
> I overrided the save method of one of my model to it sync its sites
> with its parent sites:
>
> def save(self, *args, **kwargs):
I overrided the save method of one of my model to it sync its sites
with its parent sites:
def save(self, *args, **kwargs):
ret = models.Model.save(self, *args, **kwargs)
if self.id:
for site in self.parent.sites.all():
self.sites.add(site.id)
This code work, except
Thanks Karen.
On May 5, 2:08 pm, Karen Tracey wrote:
> On Thu, May 5, 2011 at 6:43 AM, ksamuel wrote:
> > I encountered a behavior I can't explain in the site framework and
> > wonder if I should report this as a bug.
>
> > class Video(models.Model):
>
> >
I encountered a behavior I can't explain in the site framework and
wonder if I should report this as a bug.
class Video(models.Model):
sites = models.ManyToManyField(Site)
on_site = CurrentSiteManager()
objects = models.Manager()
In manage.py shell, USING A SETTINGS FILE WITH SITE_ID
4 matches
Mail list logo