from django.conf.urls.defaults import *

urlpatterns = patterns('',
    url(r'^username_autocomplete/$', 'autocomplete_app.views.username_autocomplete_friends', name='profile_username_autocomplete'),
    url(r'^$', 'profiles.views.profiles', name='profile_list'),
    url(r'^profile/(?P<username>[\w\._-]+)/$', 'profiles.views.profile', name='profile_detail'),
    url(r'^profile/(?P<username>[\w\._-]+)/events/$', 'profiles.views.events', name='profile_events'),
    url(r'^profile/(?P<username>[\w\._-]+)/events/admin$', 'profiles.views.admin_events', name='profile_admin_events'),
    url(r'^visibility/(?P<username>[\w\._-]+)/(?P<visibility>\w+)/$', 'profiles.views.hide_from_mentors', name='profile_mentor_visibility'),
    url(r'^edit/general/$', 'profiles.views.profile_edit', {'section': 'general'}, name='profile_edit_general'),
    url(r'^edit/employment/$', 'profiles.views.profile_edit', {'section': 'employment', }, name='profile_edit_employment'),
    url(r'^edit/professional/$', 'profiles.views.profile_edit', {'section': 'professional', }, name='profile_edit_professional'),
    url(r'^edit/additional/$', 'profiles.views.profile_edit', {'section': 'additional', }, name='profile_edit_additional'),
    url(r'^volunteer/remove/(?P<id>\d+)/$', 'profiles.views.volunteer_remove', name='volunteer_remove'),
    url(r'^volunteer/add/$', 'profiles.views.volunteer_add_or_edit', {'type': 'add'}, name='volunteer_add'),
    url(r'^volunteer/edit/(?P<id>\d+)/$', 'profiles.views.volunteer_add_or_edit', {'type': 'edit'}, name='volunteer_edit'),
    url(r'^employment/remove/(?P<id>\d+)/$', 'profiles.views.employment_remove', name='employment_remove'),
    url(r'^employment/add/$', 'profiles.views.employment_add_or_edit', {'type': 'add'}, name='employment_add'),
    url(r'^employment/edit/(?P<id>\d+)/$', 'profiles.views.employment_add_or_edit', {'type': 'edit'}, name='employment_edit'),
    url(r'^research/remove/(?P<id>\d+)/$', 'profiles.views.research_remove', name='research_remove'),
    url(r'^research/add/$', 'profiles.views.research_add_or_edit', {'type': 'add'}, name='research_add'),
    url(r'^research/edit/(?P<id>\d+)/$', 'profiles.views.research_add_or_edit', {'type': 'edit'}, name='research_edit'),
    url(r'^activate/$', 'profiles.views.activate', {'state': 'on'}, name='profile_activate'),
    url(r'^deactivate/$', 'profiles.views.activate', {'state': 'off'}, name='profile_deactivate'),
    url(r'^apply/(?P<username>[\w\._-]+)', 'profiles.views.apply', name='profile_apply'),
    url(r'^application_letters/(?P<invitation_id>\d+)/$', 'profiles.views.view_message', name='message_view'),
)
