This can happen of you multiple times price submit button on the page.
That is why it is recommended to issue HttpRedirect after POST.
Read carefully:
http://www.djangoproject.com/documentation/tutorial04/
On Dec 21 2007, 10:06 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I start only
consider using django add-on django-check-constraints
http://code.google.com/p/django-check-constraints/wiki/Features
On Dec 26, 12:34 am, [EMAIL PROTECTED] wrote:
> Hello,
>
> Having the following (Postgre)SQL statement:
>
> CREATE TABLE Games (
> minPlayer integer NOT NULL DEFAULT 1,
> max
django-check-constraints
On Dec 26, 12:34 am, [EMAIL PROTECTED] wrote:
> Hello,
>
> Having the following (Postgre)SQL statement:
>
> CREATE TABLE Games (
> minPlayer integer NOT NULL DEFAULT 1,
> maxPlayer integer NOT NULL DEFAULT 1,
> CHECK (min_player <= max_player)
> )
>
> the consequent
Hi forgems!
Your snippet requires to restart django each time the templates have
changed. Did you try to add checking of template file modification
date in order automatically invalidate cache? What it is performance
of such implementation? Adding this kind of mechanism will increase
performace
> Here's a solution that should give you a list (not a QuerySet) of all
> the blogs. Don't know if this is best practice though. You can get all
> blogs of a user with:
> user.blog_set.all()
> From this QuerySet you want only these without articles:
> blogs = []
> for blog in user.blog_set.all():
Hi django users!
I have two simple models: Blog and Article.
class Blog(models.Model):
title = models.CharField()
content = models.TextField()
user = models.ForeignKey(User)
class Article(models.Model):
title = models.CharField()
content = models.TextField()
blog = models
I am running CherryPy 3.0.1 with django + nginx for static content on
my production server for several months without any issues. It also
shows very well perfomance, even better than apache/mod_python and
very small memory usage. Ideal solution!
On Aug 28, 6:39 pm, Justin Johnson <[EMAIL PROTECTE
I know two options for you:
1. First use django-simpleaggregation plugin, you canfind it on
googlecode.com
2. Or use raw sql to do it. This is example how I count entries in
each blogs
blogs = Blog.objects.all().extra(select={'article_count': "SELECT
COUNT(*) FROM blog_article a WHERE a.blog_id=b
I think you better not disable cache middleware in tests. If tests
fail, so will be in production. I had similar problem, I thought it
was something wrong with tests, but really it was problem in the code.
My site was running well on django built-in server, but not on apache
mod_python.
The probl
Era!
>
> On 8/15/07, Eratothene <[EMAIL PROTECTED]> wrote:
>
> > [Code]
>
> I think I will create a ticket. Maybe Jonathan can integrate
> such a function directly into django-tagging.
--~--~-~--~~~---~--~~
You received this message because you a
/5176
On 16 авг, 02:46, "Kai Kuehne" <[EMAIL PROTECTED]> wrote:
> Hi Erarothene,
>
> On 8/16/07, Eratothene <[EMAIL PROTECTED]> wrote:
>
>
>
> > I am totally confused with CacheMiddleware docs and middleware docs.
>
> > I want to use su
I am totally confused with CacheMiddleware docs and middleware docs.
I want to use such middlewares in project:
ConditionalGetMiddleware
GZipMiddleware - addes Vary on Accept-Encoding
SessionMiddleware - addes Vary on Cookie
CacheMiddleware -
I am trying to find correct order for this middleware
For that I have written by own function, put it where is
usage_for_model is located
def usage_for_models(self, Models=[], counts=False,
min_count=None):
"""
@param Model: the list of models to count. Empty list means
all models.
Inspired by usage_for_model, I needed
I really enjoy django regex-based urlpatterns, but I ran onto the
trouble how to realize such functionality, site uses a lot of domain
name URL dispatch. Some thing like this:
blogs.mysite.com/PATH
wikis.mysite.com/PATH
tags.mysite.com/PATH
And so on.
How to make such in django, need something l
I ran into the problem of Host-based url dispatch.
I need to make something like this:
urls.py:
if request.META["HTTP_HOST"] = 'blogs.example.com'
urlpatterns += (Some patterns)
if request.META["HTTP_HOST"] = 'wikis.example.com'
urlpatterns += (Abosolute different patterns)
I have no ide
There a lot of other features missing in such solution: comments, spam
protection, rss feeds and a lot more. I am searching for full featured
blog engine.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django user
Please, recommend me some full featured blog engines developed in
django.
Though, I have found some posts in this user group about available
blog engines, I still want to ask this question, as all posts are
dated summer 2006.
--~--~-~--~~~---~--~~
You received th
Really dirty way! But IT DOES WORK, and it is so simple.
Thanks a lot Ben van Staveren
--~--~-~--~~~---~--~~
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@googleg
I need to make dictionary out of django.auth.model.User instance in
such format:
{'username':'val1', 'password':'val2', 'email':'',
'first_name':'val3', 'last_name':'val4' ...}
In order to populate this data in to the custom form. I have read all
documentation available in order to resolve this
It did worked!
class A(forms.Form)
a = field
b = field
class B(A)
c = field
def __init__(self):
super(B, self).__init__()
del self.fields[a]
On Jul 15, 7:49 pm, Nathaniel Whiteinge <[EMAIL PROTECTED]> wrote:
> I don't have much experience with sub-classing forms, but I suspect
Fixed examples mistakes:
class A(forms.Form)
a = field
b = field
class B(A)
del a # Is there working equivalent for this?
c = field
Hence, class B inherited only a field b, but not a.
--~--~-~--~~~---~--~~
You received this message because you are subs
A have two newform classes, each with more than 80 fields.
Two forms has a lot of common fields, but not all. In order not to
maitain two sets of fields instead of one I have created third form,
which is base for inheritance to this two, but then the order of
fields in the form is determined by d
22 matches
Mail list logo