Also read:
http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html
where I explain a bit about startup steps.
Graham
On Jul 5, 4:25 pm, "euan.godd...@googlemail.com"
wrote:
> If you read the source for django.core.management.__init__ you'll find
> a function called "setup_envir
Glad to be of assistance. Let me know when it's finished or if you
want another look over,
Euan
On 3 July, 15:22, Rainy wrote:
> Thanks for great feedback, Euan. I've added some comments below.
>
> On Jul 3, 8:26 am, "euan.godd...@googlemail.com"
>
> wrote:
> > I had a look over your tutorial a
Erm. You don't seem to have specified what to order by. In this case,
surely you want ... .order_by('date_time') However, this field doesn't
seem to appear in your models.
One thing I've found handy for debugging Django's ORM to SQL is
something which I don't think is documented in django docs at
If you read the source for django.core.management.__init__ you'll find
a function called "setup_environ. This is called by all management
commands (i.e. manage.py). If you note here the os.environ is set
unconditionally. I suppose for your setup to work correctly django
should be doing:
if not "DJ
I am trying to write an application that credits a user's account when
a bet is paid. I have an admin form with the bet and a TabularInline
list of bet choices (the choices that can be bet on). To resolve a bet
a ModelAdmin is used to set the status of the bet to True (paid) and
the winner field on
I have DJANGO_SETTINGS_MODULE set in my environment to an alternative
settings file. The alternate file imports the original settings file
and overrides some values for my development environment.
Whenever I try to run ./manage.py runserver, it insists on using the
settings.py on the same path as
I have an update. It turns out that setting the timeout in set_expiry
to a much larger value prevents the immediate timeout. Of course, this
means that people in well-behaved browsers won't time out when they
should. This is despite the fact that I've tried sending both an
integer (for seconds) and
On Sun, Jul 4, 2010 at 5:39 PM, MiddleForkGIS wrote:
> During an update of Debian ("squeeze/sid") last week, something broke
> the previously functional Postgresql schema syntax on my site(s).
>
> Up until the update, this was working fine:
>
> class Meta:
> db_schema = "world"
> db_table = "cou
During an update of Debian ("squeeze/sid") last week, something broke
the previously functional Postgresql schema syntax on my site(s).
Up until the update, this was working fine:
class Meta:
db_schema = "world"
db_table = "country"
Once I performed the update, the following error occurs:
F
Evening all
I've just moved a really old django project of ours over to a new
machine, newer python, and newer mysql.
I'm using a mentally old version of django, revision 5783.
The move has gone tickety boo, we're using nginx instead of lighttpd
as well.
The only oddity I've got is that in the
Hi
anone else have had problem with media.djangoproject.com ?
/.virtualenvs/site.com/bin# ./easy_install django
Searching for django
Reading http://pypi.python.org/simple/django/
Reading http://www.djangoproject.com/
Best match: Django 1.2.1
Downloading http://media.djangoproject.com/releases/1.2/
Hi all,
there have been at least three threads in this list alone from people
asking how to "break" from a for loop in templates, so the following
snippet [1] might be useful to some. Leaving aside the "thou shalt not
use logic in templates" religious debate, it's interesting in that it
is syntact
Is there a way to run a django app that's being served on the local
machine via Apache and mod_wsgi using the integrated debugger in wsgi?
I did a few google searches but nothing popped out as being the
obvious solution, other than a suggestion from google to run apache
httpd -x which I'd take as
On Jul 4, 4:04 pm, Aziz Bookwala wrote:
> Hello World
> I wanted to know how to implement different fieldsets for the add and change
> pages in django admin like a lot of applications do (django-cms for ex)
> Any help would be much appreciated.
>
> --
> - Aziz M. Bookwala
You can override the `ge
> The initial keyword is great when defining a subclass of Form if you
> the initial values is ALWAYS the same.
>
> What if it varies?...I'm guessing I must set it in the view.
From:
http://docs.djangoproject.com/en/1.2/ref/forms/api/#dynamic-initial-values
we have:
Dynamic initial values¶
F
Hallöchen!
I wonder whether it makes sense to disable caching in responses
which used messages from the messages framework. Since they are
consumed by displaying them, I don't see a point in letting upsteam
caches to cache the page.
I added
if request._messages.used:
add_never_cache
How set initial form field value in the view function?
The initial keyword is great when defining a subclass of Form if you
the initial values is ALWAYS the same.
What if it varies?...I'm guessing I must set it in the view.
How set this initial value in the view?
Chris
--
You received this me
Hello World
I wanted to know how to implement different fieldsets for the add and change
pages in django admin like a lot of applications do (django-cms for ex)
Any help would be much appreciated.
--
- Aziz M. Bookwala
--
You received this message because you are subscribed to the Google Groups
hi all; sorry for wasting your preciouse tume.
I'm trouble with the following:
class A(models.Model):
.
.
.
class B(models.Model):
.
.
.
a= models.ForeignKey(A)
class C(models.Model):
.
.
.
b= models.ForeignKey(B)
How can i filter data that belongs to an A instance, while editing
class C in
It work!
Thank you.
On Jul 4, 9:30 pm, Daniel Roseman wrote:
> On Jul 4, 12:01 pm, "David.D" wrote:
>
> > i mean
> > i have a model instance m, and m has a field fd.
> > so i can wrote like this in template
> > {{ m.fd }}
>
> > but, when i got a string s = "fd"
>
> > how could i do the same
On Jul 4, 12:01 pm, "David.D" wrote:
> i mean
> i have a model instance m, and m has a field fd.
> so i can wrote like this in template
> {{ m.fd }}
>
> but, when i got a string s = "fd"
>
> how could i do the same as above?
>
> thanks for any help...
There's no built-in way. A simple custom
I figured out a way to get it working.
### models.py
[...]
class DecTest(models.Model):
dec = models.DecimalField(max_digits=8, decimal_places=2)
class LocalDecForm(forms.ModelForm):
dec = forms.DecimalField(max_digits=8, decimal_places=2,
localize=True)
class Meta:
model = De
i mean
i have a model instance m, and m has a field fd.
so i can wrote like this in template
{{ m.fd }}
but, when i got a string s = "fd"
how could i do the same as above?
thanks for any help...
--
You received this message because you are subscribed to the Google Groups
"Django users" gr
Hello all
I experienced a strange behaviour with my django application when I
wanted to deploy and test on my apache instance on my virtual server.
I could successfully deploy my application but when I wanted to access
any view the browser just took forever to load and it never showed the
view. Ac
For clarification: The output in the admin list view is properly
localized. Only the input doesn't work.
I'm using Django 1.2.1 and a almost vanilla Django project only with
this one test app installed.
On 3 Jul., 22:07, Simon Westphahl wrote:
> Hi,
>
> I tried to implement a localized "DecimalFi
On Sat, Jul 3, 2010 at 8:00 AM, Gath wrote:
> Won't it be nice to start first by learning Django! From my experience
> Django was not build to run on top of AppEngine. There are alot of
> hacks on django to make run on AppEngine that might confuse a
> beginner, e.g Django was built to run on relat
26 matches
Mail list logo