django

Is there any list of blog engines, written in Django?

Is there any list of blog engines, written in Django? ...

How do you configure Django for simple development and deployment?

I tend to use SQLite when doing Django development, but on a live server something more robust is often needed (MySQL/PostgreSQL, for example). Invariably, there are other changes to make to the Django settings as well: different logging locations / intensities, media paths, etc. How do you manage all these changes to make deployment a ...

Reasons not to use Django

Have you considered using Django and found good reasons not to do so? ...

RDBMS & OOP-friendly Python web app framework?

Suppose your boss told you to choose a Python web application framework, and you would be wedded to it for at least the next 3 years. What would you recommend? Ground rules: Python: Yes, required. (Ruby+ not an option for reasons irrelevant. Case closed.) Custom/Hybrid Setups: Sure... if they are defensible on technical grounds. Up...

Rails or Django? (or something else?)

I'm interested in learning a web framework. The two big ones, as I gather, are Rails and Django. Which one is better/faster? Is one better designed or more logically consistent than the other? Is there another framework I should look into? How easy is it to set up and administer a Rails or Django server, and how easy is it to find a shar...

Django + FCGID on Fedora Core 9 -- what am I missing?

Fedora Core 9 seems to have FCGID instead of FastCGI as a pre-built, YUM-managed module. [I'd rather not have to maintain a module outside of YUM; so no manual builds for me or my sysadmins.] I'm trying to launch Django through the runfastcgi interface (per the FastCGI deployment docs). What I'm seeing is the resulting page written ...

ASP.NET MVC vs. Django - Which framework should I learn?

I am starting a new web project where using MVC framework seems appropriate. My background is mostly with .Net / ASP.NET, so using ASP.NET MVC looks like the easiest way. I read that django is very powerful and easy to use, but I only have little experience with python. Can anyone with experience in both frameworks tell me their perspe...

How do I use Django templates without the rest of Django?

I want to use the Django template engine in my (Python) code, but I'm not building a Django-based web site. How do I use it without having a settings.py file (and others) and having to set the DJANGO_SETTINGS_MODULE environment variable? If I run the following code: >>> import django.template >>> from django.template import Template, ...

Making a beta code for a public django site

I'm about to put a beta version of the site I'm working on up on the web. It needs to have a beta code to restrict access. The site is written in django. I don't want to change the fundamental Auth system to accommodate a beta code, and I don't care particularly that the security of the beta code is iron-clad, just that it's a significa...

Union and Intersect in Django

class Tag(models.Model): name = models.CharField(maxlength=100) class Blog(models.Model): name = models.CharField(maxlength=100) tags = models.ManyToManyField(Tag) Simple models just to ask my question. I wonder how can i query blogs using tags in two different ways. Blog entries that are tagged with "tag1" or "tag2": Blog.o...

Feedback on using Google App Engine?

Looking to do a very small, quick 'n dirty side project. I like the fact that the Google App Engine is running on Python with Django built right in - gives me an excuse to try that platform... but my question is this: Has anyone made use of the app engine for anything other than a toy problem? I see some good example apps out there, so ...

Change the width of form elements created with ModelForm in Django

How can i change the width of a textarea form element if i used ModelForm to create it? Here is my product class: class ProductForm(ModelForm): long_desc = forms.CharField(widget=forms.Textarea) short_desc = forms.CharField(widget=forms.Textarea) class Meta: model = Product And the template code... {% for f in fo...

Re-ordering entries in a model using drag-and-drop

Say I have a blogging app in Django. How can i re-order the posts using a draggable table in the default admin? It would be best if i didn't have to add any extra fields to the model, but if i really have to i can. ...

Dirty fields in django

In my app i need to save changed values (old and new) when model gets saved. Any examples or working code? I need this for premoderation of content. For example, if user changes something in model, then administrator can see all changes in separate table and then decide to apply them or not. ...

Deploying Django: How do you do it?

I have tried following guides like this one but it just didnt work for me. So my question is this: What is a good guide for deploying Django, and how do you deploy your Django. I keep hearing that capastrano is pretty nifty to use, but i have no idea as to how to work it or what it does (apart from automation of deploying code), or eve...

Where can a save confirmation page be hooked into the Django admin? (similar to delete confirmation)

I want to emulate the delete confirmation page behavior before saving certain models in the admin. In my case if I change one object, certain others should be deleted as they depend upon the object's now out-of-date state. I understand where to implement the actual cascaded updates (inside the parent model's save method), but I do...

Using Pylint with Django

I would very much like to integrate pylint into the build process for my python projects, but I have run into one show-stopper: One of the error types that I find extremely useful--:E1101: *%s %r has no %r member*--constantly reports errors when using common django fields, for example: E1101:125:get_user_tags: Class 'Tag' has no 'objec...

How to get Django AutoFields to start at a higher number

For our Django App, we'd like to get an AutoField to start at a number other than 1. There doesn't seem to be an obvious way to do this. Any ideas? ...

Adding code to __init__.py

I'm taking a look at how the model system in django works and I noticed something that I don't understand. I know that you create an empty __init__.py file to specify that the current directory is a package. And that you can set some variable in __init__.py so that import * works properly. But django adds a bunch of from ... import .....

How do I include a stacktrace in my Django 500.html page?

I'm running Django 1.0 and I'm close to deploying my app. As such, I'll be changing the DEBUG setting to False. With that being said, I'd still like to include the stacktrace on my 500.html page when errors occur. By doing so, users can copy-and-paste the errors and easily email them to the developers. Any thoughts on how best to app...