Hi, I tried to install Pinax development version by using pip and virtual environment. It was running on 127.0.0.1:8000 very well. However, when I deployed it on Apache 2 using mod_wsgi, it began to raise exception with the following error :
SystemError: new style getargs format but argument is not a tuple
Any suggestions? I appreci...
I am outputting content from my models to my templates, however some model fields call data stored in other models. This happens only in a few fields. I am wondering whether using an if tag to evaluate this would be more efficient compared to storing the django tags inside the models.
Answers to this question say that storing django ta...
How can one define a dynamic initial value on a foreign key field?
With the code:
from django.db import models
from django.conf import settings
from django.contrib.sites.models import Site
class Example(models.Model):
site = models.ForeignKey(Site, initial=settings.SITE_ID)
I've the following error:
site = models.ForeignKey(Sit...
I'm building a multi user system and I'm creating an somewhat experimental idea for the users to interact.
The site is for professional actors so they can post up their profile and so casting directors can find them. All that is going fine.
What I now want to do it create a wall/twitter group area where people can post short message...
Hi, does anyone know how this could properly be written in Django?
{{ mu.expiry_date|default:"{% trans 'Free User' %}"}}
Obviously, the above does not work since it contains a tag within a tag's filter.
...
Consider a website build using python and django. In many cases it uses 3rd party modules beside standard python library - such as pytz, South, timezones or debug toolbar.
What is standard or just convenient way to deploy such application to production hosting with all the prerequisites (timezones, etc) installed automatically?
I'm new...
Just ported a webapp from TurboGears to Django and going through the process of getting a proper server running (i.e. not runserver). Tried going the recommended Apache + mod_wsgi route that the Django docs talk about, but for some reason the thread stalls out with no error message or anything as soon as you try to import CoreData anywh...
When rebuilding my indices via ./manage.py rebuild_index I get this error:
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_manager(settings)
File "/Library/Python/2.6/site-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/Library/Python/2.6...
I'm trying to use the new readonly_fields in a ModelForm.
class TrainingAddForm(forms.ModelForm):
class Meta:
model = TrainingTasks
readonly_fields = ('trainee_signed','trainee_signed_date')
But this does not work. Am I missing something or is this not possible?
...
I'm having troubles loading fixtures on GAE with google-app-engine-django. I receive an error that says "DeserializationError: Invalid model identifier: 'fcl.User'"
./manage.py loaddata users
I'm trying to load a fixture that has the following data:
- model: fcl.User
fields:
firstname: test
lastname:...
Hello all,
tl:dr
How would a hosted django app correctly transform resource paths to match any hosted location (/ or /test or /testtest)?
Full Description
Let me try to explain what I am trying to do.
I am trying to write a somewhat re-usable django app which I intend to use from within multiple projects. This app is called systems...
I just went to create a new django project and I typed django-admin.py startproject my_project into the command prompt and it opened the django-admin.py file in my ide (komodo edit).
This happens every time I run this command in any form, even if I just try django-admin.py. Any ideas what's going on and how I fix it?
I'm on Win Xp wit...
Been trying to figure this out for a couple of hours now and have gotten nowhere.
class other(models.Model):
user = models.ForeignKey(User)
others = other.objects.all()
o = others[0]
At this point the ORM has not asked for the o.user object, but if I do ANYTHING that touches that object, it loads it from the database.
type(o.us...
Has anyone used Akamai's EdgeCache in front of a Django-based application? Is there anything specific needed in terms of configuration/middleware on the Django side to ensure Akamai is fully utilized?
...
Hi,
I need dynamic translation in django on AppEngine.
I found nice django modul for dynamic translations: django-rosetta, but it open files (django.po...) and it is not allowed on AppEngine.
Exist some other translate modul where is compatibile (or with small fix) with AppEngine?
Thanks. Martin
...
Hello guys !
I have the following model:
model rank(Models.model):
username = models.CharField(max_length=200, default=0)
points = models.IntegerField(default=0)
rank = models.IntegerFiel(default=0)
what i want is, based on 'points' recalc this model, setting the result in 'rank' field.
i=0
user_list = db.Rank.objects...
Hi,
I have problems with importing correctly a module on appengine. My app generally uses django with app-engine-patch, but this part is task queues using only the webapp framework.
I need to import django settings for the app to work properly.
My script starts with:
import os
import sys
sys.path.append('common/')
# Force Django to r...
Hi there,
I have a django model:
class Book(models.Model):
[..]
and I want to have the model name as string: 'Book'. When I try to get it this way:
Book.__class__.__name__
it returns 'ModelBase'.
Any idea?
...
I have to add two custom fields (first name, last name) into my registration form, but I don't know how. I went through this question but values (first name, last name) are not getting stored after registration.
Also some one tell me how to add check box to registration form using "RegistrationFormTermsOfService".
Thanks,
manu
...
Hello,
I have some server startup code that is lying in the "models.py" of one of my Django apps. I need to run that code on server startup time.
The problem is, that code issues a SQL query, which prevents me from running syncdb with psycopg2 (it breaks the transaction, and tables are not created.)
Putting the code in a middleware an...