Hi
I'm using pluging into Django with a binary format based on SOAP (AMF)
into Flex. I'd like to format the date field as DD-MM-YY however the
date object returned from my Django gateway is of the format: Sun Jun
1 01:00:00 GMT+0100 2008. How do I go about changing this in the
model? My views are very simple and just return all models as objects
(I'm not doing any formatting in there).
class Blog(models.Model):
title = models.CharField('Title', maxlength=100)
date = models.DateField('Date')
copy = models.TextField('Copy')
image1 = models.FileField('Image 1', upload_to='uploads/
images/')
image2 = models.FileField('Image 2', upload_to='uploads/
images/', blank=True)
image3 = models.FileField('Image 3', upload_to='uploads/
images/', blank=True)
image4 = models.FileField('Image 4', upload_to='uploads/
images/', blank=True)
image5 = models.FileField('Image 5', upload_to='uploads/
images/', blank=True)
image6 = models.FileField('Image 6', upload_to='uploads/
images/', blank=True)
video = models.CharField('Video', maxlength=256, blank=True)
def __str__(self):
return self.title
class Meta:
verbose_name = "Blog"
verbose_name_plural = "Blogs"
class Admin:
list_display = ('title', 'date')
import django.http as http
from models import Blog
import models
def blog(http_request):
return models.Blog.objects.all()
Thanks
Ben
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---