I found the Django documentation about testing E-mail services
confusing. It says here
http://docs.djangoproject.com/en/1.1/topics/testing/#e-mail-services
"Django's test runner automatically redirects all Django-sent e-mail
to a dummy outbox", but the example code shows using the 'mail' object
I am adding custom validation to my forms and custom fields in my
Django app. I would like to be able to modify the value of a field
when triggering an error. For example, if there is an error, the form
should be redisplayed with the field value corrected by clean() and an
error message "Data has
Hello,
I think the best why to explain my question is with an example. I have
a model T60CursoAdmin and a query string "a21__a21_ano" that I can use
to search with like this:
T60CursoAdmin.objects.filter(a21__a21_ano=2008)
The models look like this:
class T60Curso(models.Model):
a21 =
Sometimes there's nothing like describing a problem to someone else to
help you solve it. :) I should have marked the Python strings as
Unicode like this and everything works now:
def test(request):
return render_to_response("test.html", {
"s1":
Hello,
I'm having problems using {% ifequal s1 "some text" %} to compare
strings with extended characters in Django templates. When string s1
contains ascii characters >127, I get exceptions in the template
rendering. What am I doing wrong? I'm using UTF-8 coding throughout
the rest of
Thank you thank you thank you! I knew I was doing something simple
wrong. :)
I've been enjoying my experience using Django so far, but one thing I
have noticed is that the error messages (or in this case lack of error
messages) can be frustrating. It sometimes takes me quite a while to
figure
I'm having exactly the same problem which I posted about here
http://groups.google.com/group/django-users/browse_thread/thread/bb4c792f13b2eceb#
Have you figured out how to do this? Yours is the third message I've
read by someone trying to customize an inline form without any
solution. I'm
I'm having a similar problem that I posted about here:
http://groups.google.com/group/django-users/browse_thread/thread/bb4c792f13b2eceb#
Did you find a solution that works for you? Sorry, I couldn't figure
out from your post exactly what you did. I tried using
inlineformset_factory() like you
Ok, so I just noticed that the a55_id field which is the primary key,
was declared as an IntegerField instead of an AutoField which is why
it was showing up on the inline form, but I still can't get any of the
other fields excluded from the inline form so the problem is still
there.
Also, if it
I'm trying to customize the inline forms of a model that are displayed
when I'm editing it's parent, but I can't get anything to work! Can
someone help? First, here are my models:
class T22Pais(models.Model):
a22_id = models.AutoField(primary_key=True)
a22_nome_1 = models.CharField("Nome
I've been experimenting with an autocomplete widget for ForeignKey
model fields following the very useful advice from Jannis here:
http://jannisleidel.com/2008/11/autocomplete-form-widget-foreignkey-model-fields/
The basic idea is to create a widget with a hidden text field that
contains the
I figured out the problem. I used inspectdb to import my models from
an existing database. I then marked the primary_key fields with
primary_key=True, but I didn't should have also converted them from
IntegerField to AutoField. Once I did that everything worked fine. I
hope this message saves
Good morning all,
This problem sure seems like a bug, but it's such a common operation
that I must be doing something wrong. I am using the admin interface
to add a new student to my database. At the same time I also want to
add the parents of the student, so I click on the "+" icon on the
13 matches
Mail list logo