Hi everybody,
I have a strange effect using pagination.
I have a model with events that have a date, time, title, description
field and so on. I display the events using pagination. In the model's
Meta class I tell Django to order by date.
I create a queryset like this:
events = Event.objects.f
After some digging, I finally worked it out. In case anyone is
interested, here is the code for Django:
from django.core.files.uploadedfile import SimpleUploadedFile
def set_user_image(request, img_id):
"""
set/update a user's image
"""
if not request.user.is_authenticated():
return H
Hi,
I'm trying to save binary POST data to an ImageFile field - so far
with no satisfying success.
I can't seem to convince the client (Flex based image editor) to send
binary data as correct "multipart/form-data"; I only have the option
to send as raw binary data or with POST variables.
My view
That's it - thanks a lot!!!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to
djang
Thanks for your reply!
Your approach returns a list of dictionaries (or tuples if values_list
() is used).
Do you know of a straight forward way that returns a list of model
objects, like filter() or all()?
(I mean something smarter than looping the returned list of tuples and
creating a new list
Hi,
I have two simple models:
class Country(models.Model):
name = models.CharField(_("Name"), max_length=50,
unique=True)
class Profile(models.Model):
name = models.CharField(_("Name"), max_length=50,
unique=True)
country = models.ForeignKey(Country)
If I want to
if x > y:
should read
except:
of course...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, se
David,
for me, these two links did the trick:
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#adding-custom-validation-to-the-admin
http://docs.djangoproject.com/en/dev/ref/forms/validation/#ref-forms-validation
However, validation as described in the Django docs does not happen in
the m
8 matches
Mail list logo