Yes it is possible and quite easy to do.  Take a look at
https://docs.djangoproject.com/en/1.6/ref/contrib/admin/actions/

Cheers,
Tim


On Sat, Oct 26, 2013 at 12:17 AM, Kristofer Pettijohn <
kristo...@cybernetik.net> wrote:

> I am using the following type of model setup:
>
> class Product(models.Model):
>     name = models.CharField(max_length=40)
>     description = models.TextField(blank=True)
>     active = models.BooleanField(default=True)
>     priority = models.IntegerField(default=100)
>     size_chart = models.ForeignKey(SizeChart)
>     designer = models.ForeignKey(Designer)
>     collections = models.ManyToManyField(Collection)
>     categories = models.ManyToManyField(Category)
>     price = models.DecimalField(max_digits=6, decimal_places=2)
>     def __unicode__(self):
>         return self.name
>
> class Variation(models.Model):
>     color = models.ForeignKey(Color)
>     size = models.ForeignKey(Size)
>     product = models.ForeignKey(Product)
>     price_override = models.DecimalField(max_digits=6, decimal_places=2,
> blank=True)
>
> I have Variations setup as TabularInline in Django admin.  However, there
> are > 200 different colors, and about 20 sizes.  Adding 10 different colors
> with 15 sizes is a lot of clicking for someone.  What I would like to do is
> add some type of dropdown where multiple colors, along with multiple Sizes,
> can be selected, and then all of the Variations will be created for the
> cross product of those two selections.
>
> What I envision is having an area somewhere in the Django Admin for
> Product that is titled "Bulk Add" with drop down boxes for both Color and
> Size where multiple values for each can be selected.  When the user is
> happy with their selection, they will click a button and all of the
> Variations will be created and the user will be back to the product page
> with all of the options now visible in the TabularInline section.
>
> Is this type of action possible?
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1899431826.178951.1382753821780.JavaMail.zimbra%40cybernetik.net
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
MLHIM VIP Signup: http://goo.gl/22B0U
============================================
Timothy Cook, MSc           +55 21 94711995
MLHIM http://www.mlhim.org
Like Us on FB: https://www.facebook.com/mlhim2
Circle us on G+: http://goo.gl/44EV5
Google Scholar: http://goo.gl/MMZ1o
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3Xw559kzc5YNk%3DJQMBQEPxYP4uc%3DGW3Jj_C04xwUqMSAw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to