django

Django/Mod_WSGI 'client denied by server configuration'

I'm attempting to set up Apache 2.2, Django 1.1.2 and Gentoo. I wish to serve my project with the address: /comics I followed the mod_wsgi directions in the django documentation to the letter, coming up with these files: /etc/apache2/modules.d/70_mod_wsgi.conf <IfDefine WSGI> LoadModule wsgi_module modules/mod_wsgi.so </IfDefine> WS...

Problem with model inheritance and polymorphism

Hi, i came with new django problem. The situtaion: i have a model class UploadItemModel, i subcallss it to create uploadable items, like videos, audio files ... class UploadItem(UserEntryModel): category = 'abstract item' file = models.FileField(upload_to=get_upload_directory) i subclass it like this: class Video(UploadItem)...

Wrapper on conneting Sybase ASE using pyodbc in Django?

I wonder any one is conneting Sybase ASE using pyodbc in Django? Any wrapper available for that? Any solution? Currently there are: - sqlany-django (http://code.google.com/p/sqlany-django/) for Sybase SQL Anywhere and not Sybase ASE - django-pyodbc (http://code.google.com/p/django-pyodbc/) for MS SQL Server through pyodbc Thanks. ...

Django, Javascript, JSON and Unicode

I have a frustrating problem. I have a Django web app. The model contains various CharField columns. When I convert these strings into JSON using json.dumps, the strings come out as Unicode like this: "{'field': u'value'}" and so forth. However, I need to pass this to Javascript, and the jQuery parser croaks on this format. What I am ...

Firebug, FirePythonDjango and Graphviz viewer

Hi there, Is anyone using this combination? I am getting the data produced in Firebug Logger screen but when I click on it, it opens Graphviz GVEdit application but the profile data never appears. If I right click on the data line of the Firebug Logger tab it allows me to inspect the DOM. I get the digraph data out of there and paste i...

TypedChoiceField or ChoiceField in Django

When should you use TypedChoiceField with a coerce function over a ChoiceField with a clean method on the form for the field? In other words why would you use MyForm over MyForm2 or vice versa. Is this simply a matter of preference? from django import forms CHOICES = (('A', '1'), ('B', '2'), ('C', '3')) class MyForm(forms.Form): ...

Django query to list

I have a database which has records with several fields containing some info. To get all the data in the table matching some filter I'd do this: records = Record.objects.filter(fieldA='a') records, I suppose, is a QuerySet object and contains a "list" of records. Is that correct? Now let's say I want a list of the values in one fie...

a two or three-pane hierarchical list app with several scrollable areas - what language handles that well?

My question is in bold (see below) but I hope to provide some insight into my issues just in case it helps anyone who could answer my question. I'm not sure which framework or language is the best for this job but I'd like to make an app that has two or three independently scrollable areas, similar to a 2 column template, that are all d...

Adding per-object permissions to django admin

Background I'm developing a django app for a vacation rental site. It will have two types of users, renters and property managers. I'd like the property managers to be able to manage their rental properties in the django admin. However, they should only be able to manage their own properties. I realize the default django admin doesn't...

Google App Engine many-to-many to self

I'm trying to convert a django project for GAE, and I've stumbled upon this: (relational-databse) class Clan(models.Model): wars = models.ManyToManyField('self') How can I do this in a non-relational database(i.e. gae datastore)? ...

Django jQuery post then reload - too many times

I have a bit of a problem. I have ten forms in my app similar to facebooks commenting forms. I have successfully managed to pass the form for processing by making use of jQuery's $.ajax function. All of this works fine, but for some reason the app sends 10 post signals and then reloads ten times, causing the user to experience having ...

django url pattern for %20

In Django what is the url pattern I need to use to handle urlencode characters such as %20 I am using (?P<name>[\w]+) but this only handles alphanumeric characters so % is causing an error ...

My apps not visible when using custom AdminSite

Hello. I'd have a problem with custom AdminSite - my apps are not visible at the admin index and not accessible if i type appropriate URL to view their models. My problem is very similar to this: http://groups.google.com/group/django-users/browse_thread/thread/881feb7eef80853a but it's kind of reverse problem - the bundled models are vis...

Is there an app to create UML from django models ?

Epydoc doesn't work with django models because it needs django settings to be imported and I manage.py graph_models generate some unreadable outputs. Is there some tool to do that? ...

problems using observer pattern in django

I'm working on a website where I sell products (one class Sale, one class Product). Whenever I sell a product, I want to save that action in a History table and I have decided to use the observer pattern to do this. That is: my class Sales is the subject and the History class is the observer, whenever I call the save_sale() method of th...

'datetime.date' object has no attribute 'date'

This code: import datetime d_tomorrow = datetime.date.today() + datetime.timedelta(days=1) class Model(models.Model): ... timeout = models.DateTimeField(null=True, blank=True, default=d_tomorrow) ... resuls in this error: 'datetime.date' object has no attribute 'date' What am I doing wrong? ...

Installing Postfix without MySQL? (all I want is to send mail from Django/PHP)

I'm currently setting up two servers, one for me and one for a client. Mine is purely a Django server with no PHP in sight. The other is a PHP server with no Django in sight. They are both VPSs with Ubuntu Server 10.04 Lucid on them. Both require some sort of mail server so the Django and PHP applications can send mail from the server. ...

django-markitup editor passes empty POST

Hi everyone, I am a total newbie and this is my first post at stackoverflowew although I have found a lot of good info while learning python. I am trying to get this to work since days and I get more and more fustrated. I will try to include as much info as i think is needed. Your hints for debugging this will be appreciated. The edito...

django url path problem

I feel like there is a easy answer to this but I don't know it. I have a app that uses base template with a html link to the user's home page '../home/', but once you get 2 levels into the site, that link can't get back to the home page level. For example, the user logs in and goes to www.yadda.com/home. When a user selects a book (...

Why is Django admin login giving me 403 CSRF error?

I am running Django 1.2.2 and I get the following error when I try to log in to the Django admin: Forbidden (403) CSRF verification failed. Request aborted. Reason given for failure: No CSRF or session cookie. ** I have made NO customization to the barebones admin and when I inspect the source there is a CSRF token in t...