django-contrib

Should I use Django's contrib applications or build my own?

The Django apps come with their own features and design. If your requirements don't match 100% with the features of the contib app, you end up customizing and tweaking the app. I feel this involves more effort than just building your own app to fit your requirements. What do you think? ...

django comments: how to prevent form errors from redirecting the user to the preview page?

Currently, django.contrib.comments sends the user to the preview page if there is any error on the form. I am using comments in the context of a blog and I would much rather that the user stayed on the page they were on if something went wrong with the submission. As far as I can tell though, this is hard-coded in django.contrib.commen...

Django comments framework

Hi I am quite new to Django and am trying to get to grips with a few things. I would like to know if the comments framework that is bundled with django can redirect to the refering page if the comment form contains errors? Also if I were to make a rating framework how would I go about achieving this functionality. Would I simply pass t...

Django, BigIntegerField, and django.contrib.auth.user.id

Django now provides a BigIntegerField for use in django models (available in svn trunk and also 1.2 alpha-1 release). I need my django.contrib.auth.user model to have a BigIntegerField as its auto-incrementing primary key, whereas it currently uses an auto-incrementing IntegerField as its primary key. Also, wherever contrib.auth.user is...

manage.py syncbd not syncing django.contrib apps

This is probably a setting error somewhere. I have a django app that works fine on my desktop with the developer server and sqlite3. I upload it to my server and syncdb and it only syncs my custom apps to my database, not the django.contrib apps. My apache config: ServerRoot "/home/myusername/webapps/accounting/apache2" LoadModule ...

django: failing tests from django.contrib.auth

When I run my django test I get following errors, that are outside of my test suite: ====================================================================== ERROR: test_known_user (django.contrib.auth.tests.remote_user.RemoteUserCustomTest) ---------------------------------------------------------------------- Traceback (most recent call...

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 1.2 : Multiple database and Generic Content Types

I am working on one project with django 1.2. I have 2 databases : - First, for users, user's profile, session ... - Second is to store data from my specifics models like post of blog, pictures, files ... I made a router (dbrouter.py) to manage where each models are stored (instead of using 'using' for each queryset). When I sync my ...

Using Django Cache Middleware causes contrib.auth unit tests to fail

Problem: When I add UpdateCacheMiddleware and FetchFromCacheMiddleware to my Django project, I get unittest failures. This is regardless of the CACHE_BACKEND I use (right now I am using locmem://, but the errors are the same when I use file:///path_to_cache) My Middleware: MIDDLEWARE_CLASSES = ( 'django.middleware.cache.UpdateCache...

Should I place custom registration code in Views, Models or Managers?

I'm rolling my own custom registration module in Django based on django.contrib.auth. My registration module will have some extra functionality and help me reduce my dependency on other django modules that I'm currently using like django-registration and django-emailchange. I've run into a what-the-best-way-to-do-it problem here. Note: ...

Spurious failures in django.contrib.messages.tests when running manage.py test

I've recently added authentication (via django.contrib.auth of course) to my application, along with appropriate "signin"/"signup" links to my base.html. The problem comes when I run manage.py tests, and I get 4 failures, all from django.contrib.messages.tests: ERROR: test_middleware_disabled_anon_user (django.contrib.messages.tests.co...