This just doesn't make any sense to me, how can the assertion fail when the arguments are identical?
======================================================================
FAIL: test_register_page_redirects_to_signin_page (forum.tests.test_views.ForumTestCase)
----------------------------------------------------------------------
Traceb...
I've just singed for a free account at alwaysdata.com and I'd like to install a Django app. The problem is I don't know how to deploy it. The docs seem to be in french: http://wiki.alwaysdata.com/wiki/D%C3%A9ployer_une_application_Django
Do you know any guide in english or spanish?
...
Hey,
Ive a problem referencing to my "THROUGH" m2m model extra fields. I
can reference the linked model (User), but not the extra detail on the
"through-model" (listuser)
My Model definition---
User model is the built in User model Untouched.
class joblist(models.Model):
userdetail = models.ManyToManyField(User,through='userextra'...
I'm having a small problem with my setup. I'm quite new to the django world so bare with me.
A friend who is familiar has set up a VPS (Ubuntu) for my project.
I'm now on my own trying to add a new module (south) so I can use manage.py migrate
When the virtualenv was deactivated I installed the module
sudo pip -E /var/www/env/e...
By default when I run a freshen scenario, which contains an undefined given/when/then clause, that test is simply marked as undefined. No further helpful message as to what actually isn't defined is given. Is there a way to change this behavior to get more information what exactly was undefined?
...
so I was wondering if you could return an inclusion tag directly from a view.
The page is a normal page with a list of items. The list of items is rendered using an inclusion tag. If an ajax request is made to the view, I want to return only what the inclusion tag would return so I can append it onto the page via javascript. Is some...
I have a view in my Django application that automatically creates an image using the PIL, stores it in the Nginx media server, and returns a html template with a img tag pointing to it's url.
This works fine, but I notice an issue. For every 5 times I access this view, in 1 of them the image doesn't render.
I did some investigation and...
I read Djangos cms comparison page and it seems
http://www.django-cms.org/
may be what I was looking for.
Any experience with that? Recommendation?
Especially on how to install it. I cant find any installation info for it.
Apart from:
"Make sure that cms, mptt and publisher folders are on your pythonpath. They all should come wit...
hi,
i have in my template:
<select name="meetingTimeDay">
{% for k in days2 %}
<option value="{{ forloop.counter0 }}"{% ifequal c.meetingTime|date:"w", forloop.counter0 %}selected="selected"{% endifequal %}>{{ k }}</option>
{% endfor %}
</select>
where days2 is:
days2 = ('Monday', 'Tuesday', 'Wednesday', 'Thurs...
I started going through The Definitive Guide to Django and now would like to start working on my own project. I have Django set up and everything. I created a project called djangoproject1. Basically what I would like is that the main page is a registration/login page. My urls.py for djangoproject1 looks like this:
urlpatterns = pat...
Hey everyone!
I'm a little stumped here, I can't find what I'm looking for in the Django docs...
What I want, is to be able to override the Save method of an Model. I want it to check for a certain set of conditions - if these conditions are met, it will create the object just fine, but if the conditions are not met, I want to raise an...
I'm sorta having a django / db brainfart.
In words I'm trying to come up with a better way to represent Address objects in my project. I have 5 or 6 different models that have one or more associations to an Address (Billing / Shipping / etc) and I need to allow these addresses to be created/modified/deleted. My first thought was to ...
I'm developing a project management application in Django that requires a somewhat linear response process involving different groups of users (as in Django auth Groups). Each step in the response process has several response options (most options unique to the step) and is assigned to a user within a particular group. The next step in...
I have an Article form that can have 0-5 images attached so I am using a normal form for article and a formset for the images. Is there way to make it optional to fill out any information for the forms in the image formset? When I leave them I get validation errors that I have not field out required fields.
...
I figured out what the problem was while writing this question. I post it anyway in case it could help someone else.
The error: 'FooAdmin.fieldsets[0][1]['fields']' refers to field 'date' that is missing from the form.
With the following code:
# models.py
from django.db import models
class Foo(Base):
date = models.DateField(auto_...
I have a page, index.html, that contains both a login and registration form. I have a couple of questions about getting this to work properly
My URLConfig looks like this:
urlpatterns = patterns('djangoproject1.authentication.views',
(r'^$',direct_to_template,{'template':'authentication/index.html'}),
(r'^register/$','register...
I've made a FileWizard and on the last page I'd like to have a form to upload files. Reading the documentation makes me doubt this is an easy thing to do. My initial thought is to, in the done method, grab the data and pass it into a different form, that will then accept the uploaded files before sending an email.
Is this possible? Is...
I've noticed there's a lot of confusion about what "app" means in Django, due in no small part to the documentation only explaining this abstract concept with more abstraction. ( http://docs.djangoproject.com/en/dev/intro/tutorial01/ )
What are some concrete examples of things that should be turned into apps?
...
I have two 4 tier objects that I am passing to the django template. I am currently for looping through each tier, and going down a level if it exists. I ended up having key, key2 and key3 that represents the current location in the object while looping. I would like to reference the other object that has the same tiers using those variab...
I'm making a form for user registration. Here's what my template looks like:
<h1>Register</h1>
<form action="/register/" method="post">
{{ form.as_p }}
<input type="submit" value="Register">
</form>
And here's my view:
from djangoproject1.authentication import forms
from django.http import HttpResponseRedirec...