# Path: vpw/sitemaps.py
# class VoerSitemap(sitemaps.Sitemap):
#     priority = 0.5
#     changefreq = 'daily'
# 
#     def items(self):
#         return ['home', 'browse', 'about-us']
# 
#     def location(self, item):
#         return reverse(item)
# 
# class VoerCategoriesSitemap(sitemaps.Sitemap):
#     priority = 0.5
#     changefreq = 'daily'
# 
#     def items(self):
#         #Get all categories
#         return vpr_get_categories()
# 
#     def location(self, obj):
#         return '/browse?categories=%s' % obj['id']
# 
# class VoerTypeSitemap(sitemaps.Sitemap):
#     priority = 0.5
#     changefreq = 'daily'
# 
#     def items(self):
#         return ['1', '2']
# 
#     def location(self, obj):
#         return '/browse?type=%s' % obj
# 
# class VoerLanguagesSitemap(sitemaps.Sitemap):
#     priority = 0.5
#     changefreq = 'daily'
#     def items(self):
#         return ['vi', 'en']
# 
#     def location(self, obj):
#         return '/browse?languages=%s' % obj
# 
# Path: vpw/views.py
# class RecaptchaRegistrationView(RegistrationView):
#     """
#     Subclass of RegistrationView that uses RecaptchaRegistrationForm
#     """
#     form_class = RecaptchaRegistrationForm
# 
#     def get_context_data(self, **kwargs):
#         data = super(RecaptchaRegistrationView, self).get_context_data(**kwargs)
#         data['captcha_site_key'] = settings.RECAPTCHA_PUBLIC_KEY
#         return data


from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic.base import TemplateView
from vpw.sitemaps import VoerSitemap, VoerCategoriesSitemap, VoerTypeSitemap, VoerLanguagesSitemap
from vpw.views import RecaptchaRegistrationView
    url(r'^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
        'django.contrib.auth.views.password_reset_confirm',
        name='password_reset_confirm'),
    url(r'^reset/done/$', 'django.contrib.auth.views.password_reset_complete', name='password_reset_complete'),

    url(r'^language/', include('django.conf.urls.i18n')),
    url(r'^tinymce/', include('tinymce.urls')),
    url(r'^mce_filebrowser/', include('mce_filebrowser.urls')),
    url(r'^profile/(?P<pid>[0-9a-z]+)/delete$', 'vpw.views.delete_profile', name='delete_profile'),

    url(r'^$', 'vpw.views.home', name='home'),
    url(r'^m/(?P<mid>[0-9a-f]{8})(/(?P<version>\d+))?/?$', 'vpw.views.module_detail_old', name='module_detail_old'),
    url(r'^m/(?P<title>[0-9A-Za-z_\-]+)/(?P<mid>[0-9a-f]{8})(/(?P<version>\d+))?/?$', 'vpw.views.module_detail', name='module_detail'),
    url(r'^c/(?P<cid>[0-9a-f]{8})(/(?P<mid>[0-9a-f]{8}))?/?$', 'vpw.views.collection_detail_old', name='collection_detail_old'),
    url(r'^c/(?P<title>[0-9A-Za-z_\-]+)/(?P<cid>[0-9a-f]{8})(/(?P<mid>[0-9a-f]{8}))?/?$', 'vpw.views.collection_detail', name='collection_detail'),
    url(r'^browse/?$', 'vpw.views.browse', name='browse'),
    url(r'^signup/?$', 'vpw.views.signup', name='signup'),
    url(r'^profile/(?P<pid>[0-9a-z]+)/?$', 'vpw.views.view_profile', name='view_profile'),
    # unused link below
    url(r'^about-us/?$', 'vpw.views.aboutus', name='about-us'),

    ## User ###
    url(r'^user/register/?$', RecaptchaRegistrationView.as_view()),
    url(r'^user/', include('registration.backends.default.urls')),
    url(r'^user/authenticate$', 'vpw.views.vpw_authenticate', name='authenticate'),
    url(r'^user/dashboard/?$', 'vpw.views.user_dashboard', name='user_dashboard'),
    url(r'^user/logout$', 'vpw.views.vpw_logout', name='logout'),
    url(r'^user/create/module/?$', 'vpw.views.create_module', name='create_module'),
    url(r'^user/create/collection/?$', 'vpw.views.create_collection', name='create_collection'),
    url(r'^user/create/mass-modules/?$', 'vpw.views.create_mass_modules', name='create_mass_modules'),

# Path: vpw/sitemaps.py
# class VoerSitemap(sitemaps.Sitemap):
#     priority = 0.5
#     changefreq = 'daily'
# 
#     def items(self):
#         return ['home', 'browse', 'about-us']
# 
#     def location(self, item):
#         return reverse(item)
# 
# class VoerCategoriesSitemap(sitemaps.Sitemap):
#     priority = 0.5
#     changefreq = 'daily'
# 
#     def items(self):
#         #Get all categories
#         return vpr_get_categories()
# 
#     def location(self, obj):
#         return '/browse?categories=%s' % obj['id']
# 
# class VoerTypeSitemap(sitemaps.Sitemap):
#     priority = 0.5
#     changefreq = 'daily'
# 
#     def items(self):
#         return ['1', '2']
# 
#     def location(self, obj):
#         return '/browse?type=%s' % obj
# 
# class VoerLanguagesSitemap(sitemaps.Sitemap):
#     priority = 0.5
#     changefreq = 'daily'
#     def items(self):
#         return ['vi', 'en']
# 
#     def location(self, obj):
#         return '/browse?languages=%s' % obj
# 
# Path: vpw/views.py
# class RecaptchaRegistrationView(RegistrationView):
#     """
#     Subclass of RegistrationView that uses RecaptchaRegistrationForm
#     """
#     form_class = RecaptchaRegistrationForm
# 
#     def get_context_data(self, **kwargs):
#         data = super(RecaptchaRegistrationView, self).get_context_data(**kwargs)
#         data['captcha_site_key'] = settings.RECAPTCHA_PUBLIC_KEY
#         return data


# Path: voer/urls.py
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic.base import TemplateView
from vpw.sitemaps import VoerSitemap, VoerCategoriesSitemap, VoerTypeSitemap, VoerLanguagesSitemap
from vpw.views import RecaptchaRegistrationView

    url(r'^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
        'django.contrib.auth.views.password_reset_confirm',
        name='password_reset_confirm'),
    url(r'^reset/done/$', 'django.contrib.auth.views.password_reset_complete', name='password_reset_complete'),

    url(r'^language/', include('django.conf.urls.i18n')),
    url(r'^tinymce/', include('tinymce.urls')),
    url(r'^mce_filebrowser/', include('mce_filebrowser.urls')),
    url(r'^profile/(?P<pid>[0-9a-z]+)/delete$', 'vpw.views.delete_profile', name='delete_profile'),

    url(r'^$', 'vpw.views.home', name='home'),
    url(r'^m/(?P<mid>[0-9a-f]{8})(/(?P<version>\d+))?/?$', 'vpw.views.module_detail_old', name='module_detail_old'),
    url(r'^m/(?P<title>[0-9A-Za-z_\-]+)/(?P<mid>[0-9a-f]{8})(/(?P<version>\d+))?/?$', 'vpw.views.module_detail', name='module_detail'),
    url(r'^c/(?P<cid>[0-9a-f]{8})(/(?P<mid>[0-9a-f]{8}))?/?$', 'vpw.views.collection_detail_old', name='collection_detail_old'),
    url(r'^c/(?P<title>[0-9A-Za-z_\-]+)/(?P<cid>[0-9a-f]{8})(/(?P<mid>[0-9a-f]{8}))?/?$', 'vpw.views.collection_detail', name='collection_detail'),
    url(r'^browse/?$', 'vpw.views.browse', name='browse'),
    url(r'^signup/?$', 'vpw.views.signup', name='signup'),
    url(r'^profile/(?P<pid>[0-9a-z]+)/?$', 'vpw.views.view_profile', name='view_profile'),
    # unused link below
    url(r'^about-us/?$', 'vpw.views.aboutus', name='about-us'),

    ## User ###
    url(r'^user/register/?$', RecaptchaRegistrationView.as_view()),
    url(r'^user/', include('registration.backends.default.urls')),
    url(r'^user/authenticate$', 'vpw.views.vpw_authenticate', name='authenticate'),
    url(r'^user/dashboard/?$', 'vpw.views.user_dashboard', name='user_dashboard'),
    url(r'^user/logout$', 'vpw.views.vpw_logout', name='logout'),
    url(r'^user/create/module/?$', 'vpw.views.create_module', name='create_module'),
    url(r'^user/create/collection/?$', 'vpw.views.create_collection', name='create_collection'),
    url(r'^user/create/mass-modules/?$', 'vpw.views.create_mass_modules', name='create_mass_modules'),

    url(r'^user/create/mass-modules/import/?$', 'vpw.views.import_mass_modules', name='import_mass_modules'),