django

How do I handle the messages for a simple web-based live chat, on the server side?

I'm building a simple live chat into a web application running on Django, but one thing I'm confused about is how I should store the messages between users. The chat will support multiple users, and a chat "session" is composed of users connected to one user that is the "host." The application is a sort of online document collaboration...

Message framework: no module messages

I am following this tutorial: http://docs.djangoproject.com/en/dev/ref/contrib/messages/ but I get this error: Error: No module named messages . And in django/contrib folder effectively there isn't a messages app. How can I get work message framework ? ...

Django admin - how to make "inlines" collapsible?

Hi, With "fieldsets" you can make it collapsible by specifying the CSS class "collapse". How to do the same with "inlines"? Thank you! ...

Need "starting point" hints about adding "tabbed" interface to Django admin

Hi, I'm new to the web development world - that means I'm new to javaScript/CSS. Now I'm building a web system with Python Django. I'm wondering would you like to give me some hints as the starting point for adding "tabbed" interface to Django admin? For example, there are 3 detail table for a master table, and I want to use 3 differen...

django-multilingual-ng / Django 1.1.1 incompatibility?

I am getting "cannot import name connections" exception while trying to use django-multilingual-ng 0.1.20 with Django 1.1.1. The exception comes from the line 15 of query.py where it tries to: from django.db import connections, DEFAULT_DB_ALIAS Is it not compatible with Django 1.1.1? Does anybody tried this combination and have any s...

Django WebServices returning '\u' codes

Hey there, I have a Django database & backend and my WebService is returning \u codes in place of what should be UTF-8 characters. For example, the bullet mark character is '•' returned as '\u00ae'. My front end (an iPhone App) doesn't understand this as a bullet mark (•), and prints the UTF-8 code. I understand I need to somehow deco...

djaongo or zope ?

i want to create a website n i am confused which web framework to use plz recommend me which framework is better ,django or zope .i am using Python . ...

ManyToManyField error when having recursive structure. How to solve it?

Hello, I have the following table in the model with a recursive structure (a page can have children pages) class DynamicPage(models.Model): name = models.CharField("Titre",max_length=200) parent = models.ForeignKey('self',null=True,blank=True) I want to create another table with ManyToMany relation with this one. class...

Dynamically generate PDF and email it using django

I have a django app that dynamically generates a PDF (using reportlab + pypdf) from user input on an HTML form, and returns the HTTP response with an application/pdf MIMEType. I want to have the option between doing the above, or emailing the generated pdf, but I cannot figure out how to use the EmailMessage class's attach(filename=None...

Content based website: Django project layout/architecture

I'm taking over a project with which the company are pretty unhappy with the usability of the website. It's using django, and the website is a very content based, user driven website. Having looked through the layout of the django folders, I'm beginning to question its structure. There are many different types of content in the website...

Django Admin Actions missing

One of my Django sites is missing the Django Admin Action bar shown here: http://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/#ref-contrib-admin-actions There is no checkbox next to each row and no Action select box near the top of the page. This is happening on every model. I have several sites running Django 1.1, and the...

Why do you need this method inside a Django model ?

Class mytable(models.Model): abc = ... xyz = ... def unicode(self): Why is the def ___unicode___ necessary? ...

Best Practice for Context Processors vs. Template Tags?

In which cases is it better to create template tags (and load them into the template), than creating a context processor (which fills the request automatically)? e.g. I have a dynamic menu that has to be included into all templates, so I'm putting it into my base.html. What is the preferred usage: context processor or custom template ta...

Django-pyodbc SQL Server/freetds server connection problems on linux

Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnectW)') I'm migrating from developing on a windows development machine to Linux machine in production and I'm having issues with the freetds driver. As far as I can tell that error message means it ...

Activating Eclipse Django Editor on OS X

I installed a plugin for Eclipse called Django Editor. I can't figure out how to use it. The editor is not in my list of editors so I cannot do "Open with Django Editor" on a file nor associate a file extension with it. It appears nowhere in my preferences. How can I activate this editor? I am running Mac OS X 10.5.8 and Eclipse 3.5...

Django admin clear button for form

I was wondering if there is a way to put a "Clear Form" button on the admin forms of the apps in django? ...

Django ModelAdmin.save_model() -vs- ModelAdmin.save_formset()

I want to ensure that a user editing a particular model is saved in that models updated_by (FK User) field. I'm using mostly ModelForms (not necessarily the built in Admin), and wondering: In what cases would I need to override ModelAdmin.save_model() or ModelAdmin.save_formset()? Or, is that doing it wrong? If it's just the models...

How do I query for this in Django?

| random_code | varchar(200) | YES | UNI | NULL | | MyTable.objects.filter(random_code = None) Is this correct? Will this SELECT where there is no random code set? Above is my table. ...

use qt and django to create desktop apps

Hi guys, I had this idea of creating desktop apps using django. The principe being: - Write the django app, and use something like cherrypy to serve it. - Write a Qt app in C++ to access it and this by using QtWebview (webkit) I'd like to "bundle" this in a single app. The lighter, the better :) So here are my questions and if you have...

Django code organization

I am working on a Django app and I have a class which reads the contents of a file and returns a Django model. My question is where do I store this class in the file system? All this does is reads the file, populates a Django model and returns it. Thanks ...