annotate gpp/urls.py @ 265:1ba2c6bf6eb7

Closing #98. Animated GIFs were losing their transparency and animated properties when saved as avatars. Reworked the avatar save process to only run the avatar through PIL if it is too big. This preserves the original uploaded file if it is within the desired size settings. This may still mangle big animated gifs. If this becomes a problem, then maybe look into calling the PIL Image.resize() method directly. Moved the PIL image specific functions from bio.forms to a new module: core.image for better reusability in the future.
author Brian Neal <bgneal@gmail.com>
date Fri, 24 Sep 2010 02:12:09 +0000
parents 2ba1a6d3b984
children 8fd4984d5c3b
rev   line source
gremmie@1 1 from django.conf.urls.defaults import *
bgneal@6 2 from django.conf import settings
gremmie@1 3 from django.contrib import admin
bgneal@177 4 from django.views.decorators.cache import cache_page
bgneal@170 5
bgneal@219 6 from haystack.views import SearchView, search_view_factory
bgneal@219 7
gremmie@1 8 from news.feeds import LatestNewsFeed
bgneal@170 9 from forums.feeds import ForumsFeed
gremmie@1 10
bgneal@141 11
gremmie@1 12 admin.autodiscover()
gremmie@1 13
gremmie@1 14 urlpatterns = patterns('',
bgneal@19 15 url(r'^$', 'views.home', name='home'),
gremmie@1 16 (r'^admin/doc/', include('django.contrib.admindocs.urls')),
gremmie@1 17 (r'^admin/', include(admin.site.urls)),
gremmie@1 18 (r'^accounts/', include('accounts.urls')),
bgneal@215 19 (r'^antispam/', include('antispam.urls')),
gremmie@1 20 (r'^calendar/', include('gcalendar.urls')),
gremmie@1 21 (r'^comments/', include('comments.urls')),
gremmie@1 22 (r'^contact/', include('contact.urls')),
bgneal@127 23 (r'^core/', include('core.urls')),
bgneal@35 24 (r'^donations/', include('donations.urls')),
gremmie@1 25 (r'^downloads/', include('downloads.urls')),
bgneal@176 26 url(r'^feeds/news/$',
bgneal@177 27 cache_page(LatestNewsFeed(), 6 * 60 * 60),
bgneal@176 28 name='feeds-news'),
bgneal@176 29 url(r'^feeds/forums/$',
bgneal@177 30 cache_page(ForumsFeed(), 1 * 60 * 60),
bgneal@176 31 {'forum_slug': None},
bgneal@176 32 'feeds-forum_combined'),
bgneal@176 33 url(r'^feeds/forums/(?P<forum_slug>[\w\d-]+)/$',
bgneal@177 34 cache_page(ForumsFeed(), 1 * 60 * 60),
bgneal@176 35 name='feeds-forum'),
bgneal@81 36 (r'^forums/', include('forums.urls')),
gremmie@1 37 (r'^irc/', include('irc.urls')),
gremmie@1 38 (r'^links/', include('weblinks.urls')),
gremmie@1 39 (r'^member_map/', include('membermap.urls')),
gremmie@1 40 (r'^messages/', include('messages.urls')),
gremmie@1 41 (r'^news/', include('news.urls')),
gremmie@1 42 (r'^podcast/', include('podcast.urls')),
gremmie@1 43 (r'^polls/', include('polls.urls')),
gremmie@1 44 (r'^potd/', include('potd.urls')),
gremmie@1 45 (r'^profile/', include('bio.urls')),
gremmie@1 46 (r'^shout/', include('shoutbox.urls')),
bgneal@12 47 (r'^smiley/', include('smiley.urls')),
gremmie@1 48 )
gremmie@1 49
bgneal@219 50 # Haystack search views
bgneal@219 51 urlpatterns += patterns('haystack.views',
bgneal@220 52 url(r'^search/$', search_view_factory(view_class=SearchView, load_all=True),
bgneal@219 53 name='haystack_search'),
bgneal@219 54 )
bgneal@219 55
bgneal@219 56
gremmie@1 57 if settings.DEBUG:
gremmie@1 58 urlpatterns += patterns('',
bgneal@255 59 (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
gremmie@1 60 )