Re: Unit-testing Custom Admin Action, requires request and querysets parameters.

2014-11-25 Thread Azam Alias
Hi Collin, I apologise for the late update. Didnt get any notifications from your reply. I have solved this issue as per your suggestion. Pasting the solution for others' reference. Thanks ! from django.test import TestCase from django.contrib.admin.sites import AdminSite from batch_apps.mod

Unit-testing Custom Admin Action, requires request and querysets parameters.

2014-11-02 Thread Azam Alias
Hi, I would like to unit-test the activate_apps( ) and deactivate_apps( ) functions below, as low-level as possible. How could I do this without going through Selenium (FT) route? In my admin.py: from django.contrib import admin from my_app_listing.models import App class AppAdmin(admin.Mode

Re: Charfield case insensitive sorting in Model Admin

2014-10-31 Thread Azam Alias
Hi Collin, Thanks for the solution ! On Thursday, 30 October 2014 02:39:53 UTC+8, Collin Anderson wrote: > > Hello, > > One way to do it would be to have add an editable=False field name_sort > that's a lower() version of your name field. You can update that field in > the save method. > > In

Charfield case insensitive sorting in Model Admin

2014-10-29 Thread Azam Alias
Hi, I am using Django 1.7 on Python 3.4 and quite new to both Django and Python. I would like to sort a name field (Charfield) in ModelAdmin view in case-insensitive way. The default sorting is case-sensitive. How could I sort it in case-insensitive? Thanks in advance. -- You received this