genmap / urls.py

# -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin

from genmap.profile.feeds import LatestMarks
from genmap.blog.feeds import LatestBlogPosts
from genmap.consumer import GenmapConsumer

registration_consumer = GenmapConsumer()

admin.autodiscover()

feeds = {
        'latestmarks':LatestMarks,
        'latestblogposts':LatestBlogPosts
        }

urlpatterns = patterns('',
    #XXX This URL patterns file is a fucking mess
    #Put Urls in the app/urls.py files like they should be

     url(r'^ajax_update/$','genmap.profile.views.do_ajax_update',name='ajax-update-xml'),


     url(r'^profile/$','genmap.profile.views.view_own_profile',name='view-my-profile'),
     url(r'^profile/edit/$','genmap.profile.views.add',name='edit-profile'),
     url(r'^profile/create/$','genmap.profile.views.add',name='add-profile'),

     url(r'^user/(?P<username>\w+)/$','genmap.profile.views.view_profile',name='view-profile'),
     url(r'^view/$','genmap.profile.views.view_blank',name='view-blank'),
     url(r'^country/(?P<code>\w+)/$','genmap.profile.views.view_country',name='view-country'),


     url(r'^accounts/profile/','django.views.generic.simple.redirect_to',{'url':'/'}),
     url(r'^search/', include('genmap.search.urls')),
     (r'^accounts/', include(registration_consumer.urls)),
     (r'^blog/', include('genmap.blog.urls')),

     #Syndication/Feeds
     (r'^feeds/(?P<url>.*)/$','django.contrib.syndication.views.feed',{'feed_dict': feeds}),


     url(r'^about/$','genmap.profile.views.about',name="about"),
     url(r'^privacy/$','genmap.profile.views.privacy',name="privacy"),
     url(r'^$','genmap.profile.views.index',name='index'),

     #admin
     url(r'^admin/', include(admin.site.urls)),

)

from django.conf import settings
if settings.DEBUG:
    urlpatterns += patterns('',
     url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
         {'document_root': settings.MEDIA_ROOT}),
     )
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.