Login

Snippets by pafa

Snippet List

ClearableFileInput with image preview

This widget allows you to display preview images with adjustable width and length of the link: [example](http://img526.imageshack.us/img526/6588/screenshotat20111026215.png) AdvancedFileInput(preview=True, image_width=200) For other files, you can adjust the length of the link without preview: [example](http://img845.imageshack.us/img845/6588/screenshotat20111026215.png) AdvancedFileInput(preview=False, url_length=30) by default, parameters are: preview = True url_length = 30 image_width = 200

  • imagefield
  • preview
  • imagepreview
  • previews-on-imagefield
Read More

django-pagination with "clean url"

To enable "clean url" mode, install [django-pagination](http://code.google.com/p/django-pagination/), then just add to settings.py PAGINATION_CLEAN_URL = True and replace '.../pagination/templatetags/pagination_tags.py' with follow, and so add to 'pagination/templates/pagination/' folder pagination_clean_url.html file, with following code **Note:** in urls.py should be like this: url(r'^/foo/bar/\d*/?$', foobar_list_handle),

  • pagination
  • clean url
Read More

pafa has posted 2 snippets.