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
>
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
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
> 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
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
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.
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
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
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
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
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
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),
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,
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
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
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
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.
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
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:
>
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
> 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:
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
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 =
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,
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:
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
26 matches
Mail list logo