django

django threadedcomments

Hi folks, I would like to setup a comment systems on my site, using django threadedcomments, and I follow all the steps in the Tutorial, however, I get the following error: No module named newforms.util I am not sure what causing this issue, here is my configuration: #settings.py INSTALLED_APPS = ( 'django.contrib.admin', 'dj...

Django Database design -- Is this a good stragety for overriding defaults

Hi SO's I have a question on good database design practices and I would like to leverage you guys for pointers. The project started out simple. Hey we have a bunch of questions we want answered for every project (no problem) Which turned into... Hey we have so many questions can we group them into sections (yup we can do t...

django copy foreign key data to another model

hi, how can i copy foreign key data from one object to another? e.g. #models.py class ModelA(models.Model) field1 = models.CharField(max_length=10) class ModelB(models.Model) field2 = models.CharField(max_length=10) field3 = models.ForeignKey(ModelA) #views.py a = ModelA(field1 = 'hello') b = ModelB(field2 = 'goodbye', fiel...

ahow can I resolve Django Error: str' object has no attribute 'autoescape'?

Hi have tried to create a inclusion tag on Django but don't work and return str' object has no attribute 'autoescape' this is the code of custom tag: from django import template from quotes.models import Quotes register = template.Library() def show_quote(): quote = Quotes.objects.values('quote', 'author').get(id=0) ...

redirect from example.com at www.example.com

Maybe this is a stupid question. In php application I used to insert properly htaccess in home directory that redirect from example.com at www.example.com. But with django how I have to do ? ...

integrate / build 'weather radar' widget

I'm looking to integrate a 'weather radar' widget into a site I'm building. The only available resource I can find is: http://www.meteoonline.co.uk/gadgets/Europe/Netherlands/135 which basically delivers a flash mov in a iframe ! urrrgh! - and 'permission denied' of course with any javascript interaction on the iframe.. Can anyone s...

Enterprise Platform in Python, Design Advice

I am starting the design of a somewhat large enterprise platform in Python, and was wondering if you guys can give me some advice as to how to organize the various components and which packages would help achieve the goals of scalability, maintainability, and reliability. The system is basically a service that collects data from variou...

how can I restrict django ImageFieldFile to accept input only Image files from browser?

I've used django ImageFieldFile, from django.db.models.fields.files import ImageFieldFile now I want to restrict the user to use only Image files when uploading from browser ...

multiple django projects, mod_wsgi, single domain

I have two distinct Django "projects", which I want to run on a single domain using mod_wsgi. With mod_python, I believe there was a way to do this, where certain url paths would be mapped to one Django project, and other paths mapped to the other project, all at the server level. Is it possible to do this with mod_wsgi, and if so, how...

django+uploadify - don't working

Hi, I'm trying to use an example posted on the "github" the link is http://github.com/tstone/django-uploadify. And I'm having trouble getting work. can you help me? I followed step by step, but does not work. Accessing the "URL" / upload / the only thing is that returns "True" part of settings.py import os PROJECT_ROOT_PATH = os.path....

How do you extend the Site model in django?

What is the best approach to extending the Site model in django? Creating a new model and ForeignKey the Site or there another approach that allows me to subclass the Site model? I prefer subclassing, because relationally I'm more comfortable, but I'm concerned for the impact it will have with the built-in Admin. ...

Django Feeds/Syndication - The functions item_title and item_description do not effect whats displayed?

Ive defined a a class that inherits from django.contrib.syndication.feeds.Feed class Rss(Feed): ... def item_title(self, item): return "Hello" def item_description(self, item): return "Test" The issue is whats returned from the methods item_title and item_description is not what is used in the feed, even when no...

Django 1.2 object level permissions - third party solutions?

Since Django 1.2 final is almost out, I am curious if there are already projects that use the new object level permissions / row level permissions system. [django-authority][1] which is a possible solution for Django up to 1.1 has not been updated for a while, and does not (yet) use the new permissions system. It seems to me that Django-...

Loading from pickled data causes database error with new saves

In order to save time moving data I pickled some models and dumped them to file. I then reloaded them into another database using the same exact model. The save worked fine and the objects kept their old id which is what I wanted. However, when saving new objects I run into nextval errors. Not being very adept with postgres, I'm no...

Need one login for two different sites

I am tasked to create a web site using Django. It will be a 'sister' site to an existing Plone site. The same Apache instance will be the front end to the sites which allows me to use the same domain name. However, the owners want the users to be able to log into one and still be logged into the other one. How can this be accomplishe...

How can I send variables to my forms on init in Django?

I want to send variables to a form in my Django project so that my form's save method associates the correct object with the foreign key in the model. I tried setting it in the init method, but that doesn't seem to work. Here is my Form's init: def __init__(self, rsvp, max_guests=2, *args, **kwargs): super(RSVPForm, self).__init__...

Template does not exist: 500.html

I have created a template for 500 http error. I have insert my template 500.html in: 1) /project/ 2) /project/templates/ 3) /python2.5/ 4) /python2.5/templates/ . but I always get this error: TemplateDoesNotExist: 500.html Same problem for Http 404 error. WHY ??? ...

Django and json request

In a template i have the following code <script> var url="/mypjt/my_timer" $.post(url, paramarr, function callbackHandler(dict) { alert('got response back'); if (dict.flag == 2) { alert('1'); $.jGrowl("Data could not be ...

good django source browser app?

I need that works at least with svn, that reads your svn repository and displays information about files and folders contained in it as well as maybe revision info too. ...

Design question?

I am building music app, where user can do several tasks including but not limited to listening song, like song, recommend song to a friend and extra. currently I have this model: class Activity(models.Model): activity = models.TextField() user = models.ForeignKey(User) date = models.DateTimeField(auto_now=True) so far I t...