Help with M2M/Foreign - Add button to forms like admin panel

2012-09-06 Thread Pablo Catalina
Hi, I want to add a button like admin panel to the M2M or Foreign key fields. With a popup (or something else) to add a new model (like in the admin panel). Ex. #Models class Vendor(models.Model): name = models.CharField(max_length=255,blank=False,unique=True) class Product(models.Model):

Re: re-direction after login successfully

2008-10-07 Thread Pablo Catalina
n <[EMAIL PROTECTED]> wrote: > > > > It's seemd that Django has set /accounts/profile as default page > after > > > > login successfully. > > > > I wonder if we can re-direct it to a custom page? > > > > -- > > GenĂ­s > > I am

Re: Multiple ManyToMany relations with the same class

2008-10-07 Thread Pablo Catalina
or a ManyToManyField is, by default, created from the name of the > model it is contained in, both of those fields will end up with the same > default reverse name (used when you are filtering from a Person back to > a Concert). So you need to set the related_name attribute on one of the > fields