Definitive (or any) guide to testing Django admin actions with intermediate pages?

2018-05-28 Thread Derek
Looking for some help with a persistent problem. While there are many examples scattered across the internet about how to incorporate intermediate pages (typically with a form involved) into a custom Django admin action, I have not been able to find a complete and definitive guide to how to create

Re: Help with testing of custom Django admin actions

2016-04-24 Thread Derek
Thanks; I understand the testing approach and its working well in other parts of my project. I was looking for something more specifically related to testing custom admin actions though. On 24 April 2016 at 00:33, Camilo Torres wrote: > On Thursday, April 21, 2016 at 9:16:25 AM UTC-4:30, De

Re: Help with testing of custom Django admin actions

2016-04-23 Thread Camilo Torres
On Thursday, April 21, 2016 at 9:16:25 AM UTC-4:30, Derek wrote: > > Hi > > I am looking for help with writing tests for custom Django admin actions; > both with and without intermediate pages (ones containing forms). > > I confess (hangs head in shame) that I have written

Help with testing of custom Django admin actions

2016-04-21 Thread Derek
Hi I am looking for help with writing tests for custom Django admin actions; both with and without intermediate pages (ones containing forms). I confess (hangs head in shame) that I have written lots of actions, but not added any tests for these to my test suite. It would be great if there were

Re: Django Admin actions with select optgroup

2016-03-30 Thread Bernardo Garcia
When you talk about of optgroup you mean the choicegroup? In affirmative case, this can be that you looking .. https://docs.djangoproject.com/en/1.9/ref/models/fields/#choices Also is possible that MultipleSelectField can be useful for you? In affirmative case, this thread can be useful... https

Django Admin actions with select optgroup

2016-03-30 Thread Edgar Gabaldi
Hi everybody, Someone know if is possible or have a way to change the default action select by a select with optgroup? -- 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 ema

selected admin actions for a user, who is owner of one of the tenants in a multi tenant django crm app

2013-06-18 Thread Andrew Stewart
Hi Group, could someone please help me with - http://stackoverflow.com/questions/17184386/providing-admin-actions-to-group-members-in-a-multi-tenant-django-crm-applicatio Thanks! -- You received this message because you are subscribed to the Google Groups "Django users" group. To u

Re: Admin actions -- short_description as doc string?

2012-07-06 Thread Melvyn Sopacua
On 6-7-2012 3:50, Russell Keith-Magee wrote: > On Fri, Jul 6, 2012 at 9:06 AM, Melvyn Sopacua wrote: >> https://docs.djangoproject.com/en/1.4/_images/article_actions.png >> >> Code above states: >> make_published.short_description = "Mark selected stories as published" >> >> Image states: 'Make p

Re: Admin actions -- short_description as doc string?

2012-07-05 Thread Russell Keith-Magee
On Fri, Jul 6, 2012 at 9:06 AM, Melvyn Sopacua wrote: > On 6-7-2012 0:59, Russell Keith-Magee wrote: >> On Thu, Jul 5, 2012 at 9:22 PM, Melvyn Sopacua wrote: >>> On 5-7-2012 2:02, Russell Keith-Magee wrote: The short_description is a label that can be used for display purposes -- a 'hum

Re: Admin actions -- short_description as doc string?

2012-07-05 Thread Melvyn Sopacua
On 6-7-2012 0:59, Russell Keith-Magee wrote: > On Thu, Jul 5, 2012 at 9:22 PM, Melvyn Sopacua wrote: >> On 5-7-2012 2:02, Russell Keith-Magee wrote: >>> The short_description is a label that can be used for display purposes -- >>> a 'human readable' version of the method name. >> >> Where is this

Re: Admin actions -- short_description as doc string?

2012-07-05 Thread Russell Keith-Magee
On Thu, Jul 5, 2012 at 9:22 PM, Melvyn Sopacua wrote: > On 5-7-2012 2:02, Russell Keith-Magee wrote: >> The short_description is a label that can be used for display purposes -- >> a 'human readable' version of the method name. > > Where is this used though? I've had the suspicion that the picture

Re: Admin actions -- short_description as doc string?

2012-07-05 Thread Melvyn Sopacua
On 5-7-2012 2:02, Russell Keith-Magee wrote: > The short_description is a label that can be used for display purposes -- > a 'human readable' version of the method name. Where is this used though? I've had the suspicion that the picture in the documentation needs updating, cause it doesn't show th

Re: Admin actions -- short_description as doc string?

2012-07-04 Thread Russell Keith-Magee
On Wed, Jul 4, 2012 at 8:21 PM, Roy Smith wrote: > I'm just staring to explore admin actions. I'm surprised to see that you > have to set the description by doing: > > my_action_function.short_description = "blah" > > wouldn't it be cleaner to just d

Admin actions -- short_description as doc string?

2012-07-04 Thread Roy Smith
I'm just staring to explore admin actions. I'm surprised to see that you have to set the description by doing: my_action_function.short_description = "blah" wouldn't it be cleaner to just declare a doc string for the action function and have short_description grabbed

Re: how to map admin actions with shortcut keys

2011-01-09 Thread Mikhail Korobov
Hi Rahul, This can be solved using custom javascript. Override ModelAdmin's changelist template ( http://docs.djangoproject.com/en/1.2/ref/contrib/admin/#overriding-admin-templates ) in order to insert the necessary javascript code. On 10 янв, 00:37, rahul jain wrote: > How to m

how to map admin actions with shortcut keys

2011-01-09 Thread rahul jain
How to map admin actions with shortcut keys ? I have an action to perform on rows (objects) which changes the value of one of the columns(fields) to "x" and some to "y" and some to "z". I would like to save some time by not going through the normal route (after sele

Re: distinct doesn't work on admin actions¿?

2010-10-13 Thread Marc Aymerich
On Wed, Oct 13, 2010 at 3:57 AM, Karen Tracey wrote: > On Tue, Oct 12, 2010 at 6:31 AM, Marc Aymerich wrote: > >> I'm writing an action for the django admin site. My model looks like: >> >> class order(models.Model): >> entity = models.ForeignKey(entity) >> [...] >> >> >> I select an arbi

Re: distinct doesn't work on admin actions¿?

2010-10-12 Thread Karen Tracey
On Tue, Oct 12, 2010 at 6:31 AM, Marc Aymerich wrote: > I'm writing an action for the django admin site. My model looks like: > > class order(models.Model): > entity = models.ForeignKey(entity) > [...] > > > I select an arbitrary number of orders and I need to know the different > entitie

distinct doesn't work on admin actions¿?

2010-10-12 Thread Marc Aymerich
Hi! I'm writing an action for the django admin site. My model looks like: class order(models.Model): entity = models.ForeignKey(entity) [...] I select an arbitrary number of orders and I need to know the different entities that they have. It works on shell: >>> queryset = order.objects.

Re: python threading admin actions weird problem

2010-08-14 Thread rahul jain
Sorry one more thing Sometimes it starts with check = False Its happening at random time. --RJ On Sat, Aug 14, 2010 at 7:36 PM, rahul jain wrote: > Hi there ! > > Some weird problem happening with admin actions. > > My admin action create threads which access a shared va

python threading admin actions weird problem

2010-08-14 Thread rahul jain
Hi there ! Some weird problem happening with admin actions. My admin action create threads which access a shared variable. Those threads change the state of the variable for ex check = False (a boolean) One of the thread sets it to True At this time I am done with that entire request. Now if

admin actions

2010-06-16 Thread rahul jain
Hi, I would like to display javascript alert boxes when something goes wrong during admin actions. Is it possible ? --RJ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegrou

Re: Problem with admin actions and i18n

2010-04-06 Thread Vinicius Mendes
Sorry, i am using Django 1.1.1 final >>> import django >>> django.VERSION (1, 1, 1, 'final', 0) __ Vinícius Mendes Solucione Sistemas http://solucione.info/ On Tue, Apr 6, 2010 at 1:09 PM, Ramiro Morales wrote: > On Tue, Apr 6, 2010 at 12:48 PM, Vinicius Mendes > wrote: >

Re: Problem with admin actions and i18n

2010-04-06 Thread Ramiro Morales
On Tue, Apr 6, 2010 at 12:48 PM, Vinicius Mendes wrote: > Hi, > I have a ModelAdmin with two new actions and I added a > locale/pt_BR/LC_MESSAGES to my project folder to change the translation of > the "Delete selected" option. Locally it works but the translated message > user is the provided by

Problem with admin actions and i18n

2010-04-06 Thread Vinicius Mendes
Hi, I have a ModelAdmin with two new actions and I added a locale/pt_BR/LC_MESSAGES to my project folder to change the translation of the "Delete selected" option. Locally it works but the translated message user is the provided by Django. I get my change list with 3 actions, but when I run it in

Re: admin actions bar in django 1.1

2009-10-22 Thread kkerbel
site to read the > media directory to begin with.  ha. > > On Oct 21, 4:53 pm,kkerbel wrote: > > > > > it doesn't appear to be working for any apps.  everything else on the > > admin page shows fine to my knowledge...just not the admin actions > > bar. >

Re: admin actions bar in django 1.1

2009-10-22 Thread kkerbel
e: > it doesn't appear to be working for any apps.  everything else on the > admin page shows fine to my knowledge...just not the admin actions > bar. > > On Oct 21, 4:47 pm, kkerbel wrote: > > > > > within the templates folder for my app (events in this case).

Re: admin actions bar in django 1.1

2009-10-21 Thread kkerbel
it doesn't appear to be working for any apps. everything else on the admin page shows fine to my knowledge...just not the admin actions bar. On Oct 21, 4:47 pm, kkerbel wrote: > within the templates folder for my app (events in this case)...I just > have a folder named events

Re: admin actions bar in django 1.1

2009-10-21 Thread kkerbel
t; the app that isn't working? > > On 21 Oct, 17:22, kkerbel wrote: > > > > > i upgraded django 1.0.2 to 1.1 stable and I cannot see the admin > > actions bar in one of my apps...or any of them for that matter.  My > > fresh install of 1.1 has the bar, howev

Re: admin actions bar in django 1.1

2009-10-21 Thread Peter Bengtsson
What customizations have your done in the templates/admin/ folder of the app that isn't working? On 21 Oct, 17:22, kkerbel wrote: > i upgraded django 1.0.2 to 1.1 stable and I cannot see the admin > actions bar in one of my apps...or any of them for that matter.  My > fresh inst

admin actions bar in django 1.1

2009-10-21 Thread kkerbel
i upgraded django 1.0.2 to 1.1 stable and I cannot see the admin actions bar in one of my apps...or any of them for that matter. My fresh install of 1.1 has the bar, however, I can't seem to find the discrepancy between the two installs. Have any of you experienced this? T

curry to add dynamic methods to admin.ModelAdmin (for admin actions)

2009-09-30 Thread J
Hello, I am attempting to add dynamic actions to the admin actions list. Using the code below, the dynamic actions are added, but when I run any of the dynamic ones, I am getting the error: _set_ACCOUNT() got multiple values for keyword argument 'accountnum' I know I'm doing

Re: custom dynamic admin actions

2009-09-28 Thread J
Joshua Russo wrote: > It sounds like you just want defaults for your relationships. Is that > right? How are you determining which account to use? > No. I want admin actions at the top of my list similar to "Delete selected ..." so that I can select a bunch of records and set

Re: custom dynamic admin actions

2009-09-28 Thread Joshua Russo
I apoligize if I was unclear. I am referring to the admin actions that > one can select from a select box at the top of lists in admin pages. > It's described at > http://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/ > > There is no difficulty in adding static custom a

Re: custom dynamic admin actions

2009-09-28 Thread J
Joshua Russo wrote: > When do you want your "dynamic actions" take place? > I apoligize if I was unclear. I am referring to the admin actions that one can select from a select box at the top of lists in admin pages. It's described at http://docs.djangoproject.com/en/

Re: custom dynamic admin actions

2009-09-28 Thread Joshua Russo
On Mon, Sep 28, 2009 at 4:30 AM, J wrote: > > Hello, > > I need to add custom dynamic admin actions (based on records in a > related table), but I'm not entirely sure how to do this, as it's not > explained in the docs. > > Basically, I have two models: "T

custom dynamic admin actions

2009-09-27 Thread J
Hello, I need to add custom dynamic admin actions (based on records in a related table), but I'm not entirely sure how to do this, as it's not explained in the docs. Basically, I have two models: "Transaction", which has a foreign key to "Account", and I want to de

Re: custom admin actions

2009-07-30 Thread selcukcihan
Thanks Vasil, it works as suggested On Jul 31, 2:52 am, Vasil Vangelovski wrote: > You can get the model class for the modeladmin, it's the model property. So > modeladmin.model will give you the model class. You can just do a > check of equality > modeladmin.model == OurModel. > > On Thu, Jul 3

Re: custom admin actions

2009-07-30 Thread Vasil Vangelovski
You can get the model class for the modeladmin, it's the model property. So modeladmin.model will give you the model class. You can just do a check of equality modeladmin.model == OurModel. On Thu, Jul 30, 2009 at 1:22 PM, selcukcihan wrote: > > Hi, i have django 1.1 > > I have a user profile mod

custom admin actions

2009-07-30 Thread selcukcihan
Hi, i have django 1.1 I have a user profile model, call it OurUser. I have defined a custom action, "send mail". This action is available in OurUser and django auth's User models. It is handled via a global function with this signature def send_mail_to_users(modeladmin, request, queryset): s

admin actions independent of the items selected

2009-05-22 Thread omat
le that functionality. Then I would have some admin actions in the ModelAdmin classes and some in the views and admin templates, which is not a neat solution. Can the ModelAdmin be overridden to let the selected action be executed without caring abou

Re: admin actions bar

2009-04-09 Thread Karen Tracey
> in the "Admin actions" documentation? Or a simple example that works? > What version of Django are you running? Admin actions are a very recent addition, if you are not running the 1.1 beta or a very recent SVN checkout you will not have them. Karen --~--~-~--~~--

Re: admin actions bar

2009-04-09 Thread kidole
n the the simplest app, e.g., > > the tutorial.  Is there some other option that is required that is not > > mentioned > > in the "Admin actions" documentation?  Or a simple example that works? > > What version of Django are you running?  Admin actions are a very re

admin actions bar

2009-04-09 Thread kidole
Having success with admin features, but cannot get the actions bar nor the selection checkboxes to appear even the the simplest app, e.g., the tutorial. Is there some other option that is required that is not mentioned in the "Admin actions" documentation? Or a simple example