Yes, you need to create the slug in your save() method. Something
like:
class Review(models.Model):
...
def save(self):
# add slug if there isn't one already
if not self.slug:
from django.template.defaultfilters import slugify
self.slug = slugify(self.title
The idea is, I would like to detect and abort an upload where the file
size is over a certain limit, or if it's not a video file. Now with
streaming uploads, this should be possible. I've written an upload
handler:
class UploadValidationHandler(FileUploadHandler):
def handle_raw_input(self,
My situation is this: I want to allow my users to upload multiple
userpics and then choose between them. So I have a Profile model with
an ImageField for the userpic. When users upload a file it is
displayed around the site as usual. When they upload a new file, that
file replaces their the "userp
3 matches
Mail list logo