Re: Serious Sessions Flaw/Bug/Error Discovered

2009-02-28 Thread Malcolm Tredinnick
On Sat, 2009-02-28 at 23:21 -0800, James Mowery wrote: > from django.shortcuts import render_to_response > > class FullPageAdMiddleware(object): > def process_view(self, request, view_func, view_args, > view_kwargs): > > request.session['testing'] = request.session['testing'] + 1 >

Serious Sessions Flaw/Bug/Error Discovered

2009-02-28 Thread James Mowery
from django.shortcuts import render_to_response class FullPageAdMiddleware(object): def process_view(self, request, view_func, view_args, view_kwargs): request.session['testing'] = request.session['testing'] + 1 if request.session['testing'] > 10: return None

Re: Populating foreign key fields when displaying forms that extend ModelForm

2009-02-28 Thread Malcolm Tredinnick
On Sun, 2009-03-01 at 06:36 +0200, Ionut Gabriel Stan wrote: > Hi, > > I've decided to play a little more seriously with Django and as many > other people I > begun creating a simple blog application. I've encountered some issues > when > displaying the comments form, where users are able to add

Re: Browser Testing - Selenium or Windmill

2009-02-28 Thread Ryan Kelly
> What's the best tool for doing automated browser testing with Django > apps? I have some personal experience with Selenium (although not when > testing Django), which seems fairly mature, and has a great Firefox > extension, but has some serious problems dealing with frames and > popups. I

Re: Media Root & Templates

2009-02-28 Thread AKK
Thank you. I had forgotten the context instance part but now i've added that as below: "render_to_response('blogSite/index.html', locals(), context_instance=RequestContext(request))" and i get: Exception Type: ValueError Exception Value: Empty module name but if i take out

Re: Media Root & Templates

2009-02-28 Thread Malcolm Tredinnick
On Sat, 2009-02-28 at 15:13 -0800, AKK wrote: > Actually i thought i have but i haven't, i added: > > TEMPLATE_CONTEXT_PROCESSORS = ( > "django.core.context_processors.media" > ) Keep in mind that that will remove all the other context processors, which might not be what you want.

Browser Testing - Selenium or Windmill

2009-02-28 Thread Chris
What's the best tool for doing automated browser testing with Django apps? I have some personal experience with Selenium (although not when testing Django), which seems fairly mature, and has a great Firefox extension, but has some serious problems dealing with frames and popups. I recently

Re: Fixtures with custom constructor

2009-02-28 Thread Malcolm Tredinnick
On Sat, 2009-02-28 at 15:38 -0500, Vitaly Babiy wrote: > I have a model that I have created a custom consturctor now when I use > it in a test or in loaddata, I get this error: Your model constructor must still allow the normal way of calling model constructors. That is, you can only extend the

Re: sporadic mysterious errors

2009-02-28 Thread Malcolm Tredinnick
On Sat, 2009-02-28 at 18:42 +0100, felix wrote: > Mysteriously my site is occasionally throwing errors. When I go check > the URL (not logged in) there is no such error. > > Last night the suddenly site went down for many hours, throwing the > errors below on every response. > Actually I'm not

Re: Media Root & Templates

2009-02-28 Thread AKK
Actually i thought i have but i haven't, i added: TEMPLATE_CONTEXT_PROCESSORS = ( "django.core.context_processors.media" ) to my settings.py (it didn't seem to be in there by default, i don't know if thats supposed to be the case). Then when it didn't work i tried creating a simple

Re: Media Root & Templates

2009-02-28 Thread AKK
Managed to get it working. Thanks for the help. Andrew On 28 Feb, 00:36, Malcolm Tredinnick wrote: > On Fri, 2009-02-27 at 11:53 -0800, AKK wrote: > > Sorry I must mean the media url. Are the media_root and the media_url > > automatically linked? > > No. The

Re: Fixtures with custom constructor

2009-02-28 Thread Alex Gaynor
On Sat, Feb 28, 2009 at 3:47 PM, Vitaly Babiy wrote: > Here is my constructor: > > class EmailVerification(models.Model): > def __init__(self, user, ip, *args, **kargs): > # Build sha1 for email verification > sha1 = sha.new("".join([str(user.id),

Re: Fixtures with custom constructor

2009-02-28 Thread Vitaly Babiy
Here is my constructor: class EmailVerification(models.Model): def __init__(self, user, ip, *args, **kargs): # Build sha1 for email verification sha1 = sha.new("".join([str(user.id), user.email, ip])) self.sha = sha1 self.user = user Vitaly Babiy On Sat,

Re: Fixtures with custom constructor

2009-02-28 Thread Alex Gaynor
On Sat, Feb 28, 2009 at 3:38 PM, Vitaly Babiy wrote: > I have a model that I have created a custom consturctor now when I use it > in a test or in loaddata, I get this error: > > vba...@vbabiy-laptop:~/projects/git-projects/howsthedotcom$ ./manage.py > loaddata

Fixtures with custom constructor

2009-02-28 Thread Vitaly Babiy
I have a model that I have created a custom consturctor now when I use it in a test or in loaddata, I get this error: vba...@vbabiy-laptop:~/projects/git-projects/howsthedotcom$ ./manage.py loaddata email_verification Installing json fixture 'email_verification' from

Re: Django development workflow

2009-02-28 Thread CLIFFORD ILKAY
Gour wrote: > When working on the code for e.g. desktop application, I'd put stuff in > e.g. > > $HOME/projects/project_1 directory under DVCS and regularly push to some > 'centralized' server, provide tarballs for releases etc... > > Now, I wonder what to in case of web development with

sporadic mysterious errors

2009-02-28 Thread felix
Mysteriously my site is occasionally throwing errors. When I go check the URL (not logged in) there is no such error. Last night the suddenly site went down for many hours, throwing the errors below on every response. Actually I'm not sure if its every response or perhaps one misguided process.

Re: reverse question

2009-02-28 Thread adrian
I'm using PINAX and the way I had apache configured it was finding the PINAX apps but not the custom app I built that was in a subdirectory. To be more precise it was seeing the urls.py file for my app because it was included from the main urls.py, but it was not seeing the views.py for my app

Re: Django setup problem when executing syncdb

2009-02-28 Thread Horst Gutmann
As the error message already says: Your missing the MySQLdb module. Depending on your system you should be looking for something like a py26-mysql or python-mysql package or install it manually yourself :-) -- Horst On Sat, Feb 28, 2009 at 3:23 PM, ches wrote: >

Django setup problem when executing syncdb

2009-02-28 Thread ches
Dear All, I have install Python2.6,Django 1.0.2, I'm sure it is installed ok,since there is no errors on "import django" from the interpreter,however when executing syncdb, I got: C:\Django\projects\documenti>manage.py syncdb Traceback (most recent call last): File

Re: populate a form from database and show all item fields in a template

2009-02-28 Thread MarcoS
> It sounds like you're looking for a modelform. I don't think I need modelform 'cause my purpose it's only show books items details with a checkbox for each one. I need to obtain html like this: Book title: "Harry Potter and the Philosopher's Stone" price: "25.00" Book title:

Django development workflow

2009-02-28 Thread Gour
Hi! Being new to Django and web development in general I'm curious to learn about some of its 'best practices'. When working on the code for e.g. desktop application, I'd put stuff in e.g. $HOME/projects/project_1 directory under DVCS and regularly push to some 'centralized' server, provide

Field default value, generic view create_update, field not in template

2009-02-28 Thread Avirt77
I was trying Pastebin example application in the book 'Python Web Development with Django (Covers Django 1.0) ' and got and solved following problem: In models.py a field is defined with a default value: class Paste(models.Model): ... timestamp =

Re: populate a form from database and show all item fields in a template

2009-02-28 Thread join.toget...@gmail.com
It sounds like you're looking for a modelform. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group,

Re: i'm use first time how to use it

2009-02-28 Thread Antoni Aloy
2009/2/28 NK B : > > hello >     i 'm use first  time. so don't know about DJango so u help me how > installed it and  develop it > > Just follow the Django tutorial and the ask in the list any problems you have. Best regards, -- Antoni Aloy López Blog:

i'm use first time how to use it

2009-02-28 Thread NK B
hello i 'm use first time. so don't know about DJango so u help me how installed it and develop it --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to