message_set filter

2013-08-16 Thread Karl Arunachal
Hello, I have a model for messaging between the users. models.py: class Message(models.Model): description = models.TextField() date_added = models.DateTimeField(default=datetime.now) sender = models.ForeignKey(User, related_name='sent_set') recipient = models.ForeignKey(User, rel

Re: Django Periodic tasks

2013-08-16 Thread Brian Schott
Also, load the page with a busy animated gif and use something like dajaxice to fetch and replace the computed value.  Several examples and libraries out ther. — Sent from Mailbox for iPad On Fri, Aug 16, 2013 at 11:22 PM, Some Developer wrote: > On 17/08/13 03:43, Christophe Pettus wrote:

Re: Django Periodic tasks

2013-08-16 Thread Some Developer
On 17/08/13 03:43, Christophe Pettus wrote: On Aug 16, 2013, at 7:36 PM, Some Developer wrote: Alternately I could get rid of the hourly period task and just work it out when a customer visits a certain page but that is likely to lead to long load times and heavy database use. Any suggestio

Re: Greyed out models in Django Admin

2013-08-16 Thread Mike Dewhirst
On 16/08/2013 3:37pm, huw_at1 wrote: Hi, I still have this issue and can't really figure out what the problem is. I have found that if I turn on DEBUG then the apps models become active again such that I can add new records via the admin interface. However when turning off DEBUG they become inac

Re: Django Periodic tasks

2013-08-16 Thread Christophe Pettus
On Aug 16, 2013, at 7:36 PM, Some Developer wrote: > Alternately I could get rid of the hourly period task and just work it out > when a customer visits a certain page but that is likely to lead to long load > times and heavy database use. > > Any suggestions on what you would do in this situa

Django Periodic tasks

2013-08-16 Thread Some Developer
I'm aware of django-cron and django-celery, both of which are capable of doing what I want but I was wondering if I was just making a fundamental design mistake and there maybe a better option that someone here could explain. Basically customers pay money into their account in advance so that

Re: Can't seem to get "votes" to work right

2013-08-16 Thread bud
Ah, its always the details. Gotta pay attention to those. Thanks, it works now! -- 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...@googleg

Re: Django 1.5 Feature Suggestion

2013-08-16 Thread JJ Zolper
I didn't want to clutter up the ticket that much so I thought we could discuss through here. Do you think the following package: https://github.com/Liberationtech/django-libtech-emailuser Could be used to merge in a solution to the django core for this? It sounds like when this package was crea

Re: Can't seem to get "votes" to work right

2013-08-16 Thread Daniel Roseman
On Friday, 16 August 2013 21:05:46 UTC+1, bud wrote: > > but now an error page came up when I tried to vote for one of the polls: > > Environment: > > > Request Method: POST > Request URL: http://127.0.0.1:8000/polls/1/vote/ > > Django Version: 1.5.1 > Python Version: 2.7.3 > Installed Application

Re: Can't seem to get "votes" to work right

2013-08-16 Thread bud
I've made some changes to * detail.html* > {{ poll.question }} > > {% if error_message %}{{ error_message }}{% endif > %} > > {% csrf_token %} > {% for choice in poll.choice_set.all %} > > {{ choice.choice_text > }} > {% endfor %} > > > but now an error page came up when I tried

Re: Can't seem to get "votes" to work right

2013-08-16 Thread Daniel Roseman
On Friday, 16 August 2013 16:40:24 UTC+1, bud wrote: > Hi, > > I've finished the Django tutorial but I just can't seem to get my "votes" > function to work right. I would start the server, go to polls, and every > time I try to vote for something, the KeyError message comes up i.e. "You > didn'

Re: RequestContext and request.user

2013-08-16 Thread Lucas Magnum
Robin, RequestContext, includes TEMPLATE_CONTEXT_PROCESSORS results. request is a result of "django.core.context_processors.request". https://docs.djangoproject.com/en/dev/ref/templates/api/#subclassing-context-requestcontext []'s Lucas Magnum. 2013/8/16 Robin Lery > Hello, > I am all confus

Get size of cached item?

2013-08-16 Thread Roy Smith
I'm trying to log some statistics on the sizes of objects I store in memcache, for a specific set of keys. What I'm doing now is pickling the data in my application code, and logging len() of the picked string. This is wasteful because the cache machinery is just going to do the pickling all o

RequestContext and request.user

2013-08-16 Thread Robin Lery
Hello, I am all confused about these two things: context_instance = RequestContext and request.user Are they both equal? I suppose RequestContext includes a user varialble from the given template. And request.user would also give the current user's info, i guess. Can someone please give me insight

Can't seem to get "votes" to work right

2013-08-16 Thread bud
Hi, I've finished the Django tutorial but I just can't seem to get my "votes" function to work right. I would start the server, go to polls, and every time I try to vote for something, the KeyError message comes up i.e. "You didn't select a choice." when I did. Maybe if there was some way to de

Re: My poll doesn't work when I start using related_name, help please.

2013-08-16 Thread Daniel Roseman
On Friday, 16 August 2013 14:06:38 UTC+1, Pepsodent Cola wrote: > ### PART A > > My altword_list template file receives a primary key ID from my Index > template file. > > #___ > *altword_list.html* > > {{ poll.rosword }}

Re: As a New Bee

2013-08-16 Thread Apokalyptica Painkiller
Hello Sujeet try this IDE: http://ninja-ide.org/ I hope you like it! 2013/8/16 Sujeet Buddiga > Hi Djano'ans, >Im a new bee to Django and would like to work with an > IDE. Please suggest proper tutorials with IDE that can make my learning > process simpler,easire and faster

As a New Bee

2013-08-16 Thread Sujeet Buddiga
Hi Djano'ans, Im a new bee to Django and would like to work with an IDE. Please suggest proper tutorials with IDE that can make my learning process simpler,easire and faster. *Please Dont mind if my English is not good. Thanks in Advance, Sujeet -- You received this message

Overriding admin/actions.html

2013-08-16 Thread Chris Stoyles
Hi All, I've been hunting around (without luck) for a way to override the admin/actions.html template in my app. I've tried overriding it globally in templates/admin as well as app specific in [app]/templates/admin. If anyone out there can give me a quick hint on where to look or what I'm doin

My poll doesn't work when I start using related_name, help please.

2013-08-16 Thread Pepsodent Cola
### PART A My altword_list template file receives a primary key ID from my Index template file. #___ *altword_list.html* {{ poll.rosword }} {% if error_message %}{{ error_message }}{% endif %} Filter 5 *{% for choice i

How to store an object in django sessions framework

2013-08-16 Thread shiva krishna
I have an django and i am trying to store an object in django session varaible, and trying to access that in the redirected view, but its showing `keyerror` as below def payment(request): if request.method == 'POST': form = CardForm(request.POST) if form.is_v