Re: how to manage range of hours in models and forms in django1.4

2012-06-29 Thread Sunny Nanda
One way to store such information can be like this: Create a model "Day". This will hold entries for each day i.e. from Monday till Sunday In the UserProfile model, create a ManyToMany relation to the above defined Day model through an intermediate table (say WorkingHours) which can hold the "fr

Re: Use regular expression to retrieve all image tags from a given content

2012-06-30 Thread Sunny Nanda
You can try the following two suggestions: 1. Try removing the "^" from the pattern and match only r" > Hello, > > am really a noob with regular expressions, I tried to do this on my own > but I couldn't understand from the manuals how to approach it. Am trying to > find all img tags of a given

Re: invalid keyword argument for this function

2012-06-30 Thread Sunny Nanda
Hi Nikhil, You can not use an object's M2M field until it has been saved to the db. So, you would have to call the "save" method on the instance, or use "create" method to create the instance. > category_obj = Category.objects.create( > type = categoryform

Re: invalid keyword argument for this function

2012-06-30 Thread Sunny Nanda
TypeError at /event/createevent/ > Exception Value: 'event_genre' is an invalid keyword argument for this > function > > Any help ? > > Thanks in advance > > > On Sat, Jun 30, 2012 at 7:08 PM, Sunny Nanda wrote: > >> Hi Nikhil, >> >> You can not u

Re: invalid keyword argument for this function

2012-06-30 Thread Sunny Nanda
is traceback:- >> >> >> Exception Type: TypeError at /event/createevent/ >> Exception Value: int() argument must be a string or a number, not >> 'QuerySet' >> >> >> On Sat, Jun 30, 2012 at 8:30 PM, Sunny Nanda wrote: >> >>> H

Re: Handling millions of rows + large bulk processing (now 700+ mil rows)

2012-06-30 Thread Sunny Nanda
Count me in please. On Saturday, June 30, 2012 8:40:27 PM UTC+5:30, Cal Leeming [Simplicity Media Ltd] wrote: > > Hi all, > > As some of you know, I did a live webcast last year (July 2011) on our LLG > project, which explained how we overcome some of the problems associated > with large data

Re: SimpleListFilter filter UserProfile

2012-06-30 Thread Sunny Nanda
In the filter, you are trying the filter User objects on timestamp field which does not exist. In line 42 of admin.py, try filtering on "userprofile__timestamp__gte" -Sandeep On Thursday, June 28, 2012 1:20:03 PM UTC+5:30, yillkid wrote: > > Hi all ! > > I want filter a field of UserProfile (fi

Re: admin panel adding left-right panel

2012-07-02 Thread Sunny Nanda
You can specify a 'filter-horizontal' tuple in the admin model declaration: https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.filter_horizontal -Sandeep On Monday, July 2, 2012 6:56:07 PM UTC+5:30, ledzgio wrote: > > In default admin panel, under group pe