# -*- encoding: utf-8 -*-

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 import TemplateView

from savoirs.rss import \
        FilChercheurs, FilRessources, FilActualites, \
        FilAppels, FilEvenements, FilSites, FilMessages

from chercheurs.forms import ReactiverForm


admin.autodiscover()

handler500 = "views.page_500"
handler404 = "views.page_404"

# Les URLs suivantes peuvent être préfixées de la discipline et/ou la
# région. Nous les regroupons donc dans un module qu'on incluera plus bas.
sep_patterns = patterns(
    '',

    # accueil
    url(r'^$', 'savoirs.views.index', name='accueil'),

    # recherche
    url(r'^recherche/$', 'savoirs.views.recherche'),
)

urlpatterns = sep_patterns + patterns(
    '',

    url(r'^informations/$', 'savoirs.views.informations'),

    # agenda
    url(r'^agenda/$', 'savoirs.views.evenement_index', name='agenda'),
    url(r'^agenda/evenements/(?P<id>\d+)/$', 'savoirs.views.evenement',
        name='evenement'),
    url(r'^agenda/evenements/moderer/$', 'savoirs.views.evenement_moderation'),
    url(r'^agenda/evenements/moderer/(.+)/accepter/$',
        'savoirs.views.evenement_accepter'),
    url(r'^agenda/evenements/moderer/(.+)/refuser/$',
        'savoirs.views.evenement_refuser'),
    url(r'^agenda/evenements/utilisation/$', 'savoirs.views.page_statique',
        kwargs={'id': 'conditions-agenda'}, name='conditions-agenda'),
    url(r'^agenda/evenements/creer/$', 'savoirs.views.evenement_ajout',
        name='evenement-ajout'),
    url(r'^agenda/evenements/creer/options_fuseau_horaire/$',
        'savoirs.views.options_fuseau_horaire'),

    # sous-menu droite
    url(r'^a-propos/$', 'savoirs.views.page_statique',
        kwargs={'id': 'a-propos'}, name='a-propos'),
    url(r'^aide/$', 'savoirs.views.page_statique',
        kwargs={'id': 'aide'}, name='aide'),
    url(r'^domaines-de-recherche/$', 'savoirs.views.page_statique',
        kwargs={'id': 'domaines-de-recherche'}, name='domaines-de-recherche'),
    url(r'^legal/$', 'savoirs.views.page_statique',
        kwargs={'id': 'legal'}, name='legal'),
    url(r'^nous-contacter/$', 'savoirs.views.page_statique',
        kwargs={'id': 'contact'}, name='contact'),

    # ressources
    url(r'^ressources/$', 'savoirs.views.ressource_index', name='ressources'),
    url(r'^ressources/(?P<id>\d+)/$', 'savoirs.views.ressource_retrieve',
        name='ressource'),

    # actualités
    url(r'^actualites/$', 'savoirs.views.actualite_index', name='actualites'),
    url(r'^actualites/(?P<id>\d+)/$', 'savoirs.views.actualite',
        name='actualite'),
    url(r'^appels/$', 'savoirs.views.actualite_index',
        kwargs={'type': 'appels'}, name='appels'),

    # sites
    url(r'^sites/$', 'sitotheque.views.index', name='sites'),
    url(r'^sites/(?P<id>\d+)/$', 'sitotheque.views.retrieve', name='site'),
    url(r'^sites/google.xml$', 'sitotheque.views.config_google'),

    # sites AUF
    url(r'^sites-auf/$', 'savoirs.views.sites_auf', name='sites-auf'),

    # chercheurs
    url(r'^chercheurs/$', 'chercheurs.views.index', name='chercheurs'),
    url(r'^chercheurs/(?P<id>\d+)/$', 'chercheurs.views.retrieve',
        name='chercheur'),
    url(r'^chercheurs/(?P<id>\d+)/envoie_courrier/$',
        'chercheurs.views.envoie_courrier',
        name='envoie_courrier'),
    url(r'^chercheurs/inscription/$', 'chercheurs.views.inscription',
        name='inscription'),
    url(r'^chercheurs/inscription_faite/$',
        TemplateView.as_view(
            template_name='chercheurs/inscription_faite.html'
        ),
        name='chercheurs-inscription-faite'),
    url(r'^chercheurs/courrier_envoye/$',
        TemplateView.as_view(
            template_name='chercheurs/courrier_envoye.html'
        ),
        name='chercheurs-courrier-envoye'),
    url(r'^chercheurs/activation/(?P<id_base36>.*)/(?P<token>.*)/$',
        'chercheurs.views.activation',
        name='chercheurs-activation'),
    url(r'^chercheurs/desinscription/$', 'chercheurs.views.desinscription'),
    url(r'^chercheurs/perso/$', 'chercheurs.views.perso'),
    url(r'^chercheurs/edit/$', 'chercheurs.views.edit'),
    url(r'^chercheurs/conversion$', 'savoirs.views.page_statique',
        kwargs={'id': 'table-de-passage'}, name='conversion'),

    url(r'^chercheurs/connexion/$', 'chercheurs.views.login',
        kwargs={'template_name': 'chercheurs/login.html'},
        name='chercheurs-login'),
    url(r'^chercheurs/deconnexion/$', 'django.contrib.auth.views.logout',
        kwargs={'template_name': 'chercheurs/logged_out.html'},
        name='chercheurs-logout'),

    url(r'^chercheurs/changement-mdp/$', 'chercheurs.views.password_change',
        kwargs={
            'template_name': 'chercheurs/password_change_form.html',
            'post_change_redirect': '/chercheurs/changement-mdp-fini/'
        },
        name='chercheurs-password-change'),
    url(r'^chercheurs/changement-mdp-fini/$',
        'django.contrib.auth.views.password_change_done',
        kwargs={'template_name': 'chercheurs/password_change_done.html'},
        name='chercheurs-password-change-done'),

    # Oublié mot de passe
    url(r'^chercheurs/oubli-mdp/$', 'django.contrib.auth.views.password_reset',
        kwargs={
            'template_name': 'chercheurs/password_reset_form.html',
            'email_template_name': 'chercheurs/password_reset_email.txt',
            'post_reset_redirect': '/chercheurs/oubli-mdp-envoye/'
        },
        name='chercheurs-password-reset'),
    url(r'^chercheurs/oubli-mdp-envoye/$',
        'django.contrib.auth.views.password_reset_done',
        kwargs={'template_name': 'chercheurs/password_reset_done.html'},
        name='chercheurs-password-reset-done'),
    url(r'^chercheurs/oubli-mdp-retour/(?P<uidb36>.*)/(?P<token>.*)/$',
        'django.contrib.auth.views.password_reset_confirm',
        kwargs={'template_name': 'chercheurs/password_reset_confirm.html'},
        name='chercheurs-password-reset-confirm'),
    url(r'^chercheurs/oubli-mdp-fini/$',
        'django.contrib.auth.views.password_reset_complete',
        kwargs={'template_name': 'chercheurs/password_reset_complete.html'}),

    # Réactiver fiche
    url(r'^chercheurs/reactiver/$', 'django.contrib.auth.views.password_reset',
        kwargs={
            'template_name': 'chercheurs/reactiver_form.html',
            'email_template_name': 'chercheurs/reactiver_email.txt',
            'post_reset_redirect': '/chercheurs/reactiver-envoye/'
        },
        name='chercheurs-reactiver'),
    url(r'^chercheurs/reactiver-envoye/$',
        'django.contrib.auth.views.password_reset_done',
        kwargs={'template_name': 'chercheurs/reactiver_done.html'},
        name='chercheurs-reactiver-done'),
    url(r'^chercheurs/reactiver-retour/(?P<uidb36>.*)/(?P<token>.*)/$',
        'django.contrib.auth.views.password_reset_confirm',
        kwargs={'template_name': 'chercheurs/reactiver_confirm.html',
                'set_password_form': ReactiverForm},
        name='chercheurs-reactiver-confirm'),
    url(r'^chercheurs/reactiver-fini/$',
        'django.contrib.auth.views.password_reset_complete',
        kwargs={'template_name': 'chercheurs/reactiver_complete.html'}),

    # auto complete
    url(r'^etablissements/autocomplete/$',
        'chercheurs.views.etablissements_autocomplete'),
    url(r'^etablissements/autocomplete/(?P<pays>.*)/$',
        'chercheurs.views.etablissements_autocomplete'),

    # API chercheurs
    url(r'^api/chercheurs/(?P<chercheur_id>\d+)/$', 'chercheurs.api.api'),
    url(r'^api/chercheurs/pays/(?P<pays>.*)/$', 'chercheurs.api.api'),
    url(r'^api/chercheurs/region/(?P<region>.*)/$', 'chercheurs.api.api'),
    url(r'^api/chercheurs/recherche', 'chercheurs.api.recherche'),

    # API Pong
    url(r'^api/pong/', include('auf.django.pong.urls')),


    # groupes
    url(r'^groupes/$', 'chercheurs.views.groupe_index'),
    url(r'^groupes/(?P<id>\d+)/$', 'chercheurs.views.groupe_retrieve',
        name='groupe_retrieve'),
    url(r'^groupes/(?P<id>\d+)/adhesion/$', 'chercheurs.views.groupe_adhesion',
        name='groupe_adhesion'),
    url(r'^groupes/(?P<id>\d+)/membres/$', 'chercheurs.views.groupe_membres',
        name='groupe_membres'),
    url(r'^groupes/(?P<id>\d+)/messages/$', 'chercheurs.views.groupe_messages',
        name='groupe_messages'),

    # section par discipline et/ou région
    url(r'^discipline/(?P<discipline>\d+)/', include(sep_patterns)),
    url(r'^region/(?P<region>\d+)/', include(sep_patterns)),
    url(r'^discipline/(?P<discipline>\d+)/region/(?P<region>\d+)/',
        include(sep_patterns)),

    # traduction disponible dans le frontend sans permissons
    url(r'^jsi18n/$', admin.site.i18n_javascript),

    # Rappels
    url(r'^admin/rappels/$', 'rappels.views.admin_rappels',
        name='admin-rappels'),
    url(r'^rappels/edit/(?P<userid>.*)/(?P<cle>.*)/$',
        'rappels.views.edit_chercheur'),

    # Admin
    url(r'^admin_tools/', include('admin_tools.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^admin/confirmation/(.*)', 'savoirs.admin_views.confirmation'),
    url(r'^admin/assigner_pays', 'savoirs.admin_views.assigner_pays'),
    url(r'^admin/assigner_thematiques',
        'savoirs.admin_views.assigner_thematiques'),
    url(r'^admin/assigner_categorie',
        'savoirs.admin_views.assigner_categorie'),
    url(r'^admin/assigner_cgstatut',
        'chercheurs.admin_views.assigner_cgstatut'),
    url(r'^admin/(?P<app_name>[^/]*)/(?P<model_name>[^/]*)/assigner_regions',
        'savoirs.admin_views.assigner_regions',
        name='assigner_regions'),
    url(r'^admin/(?P<app_name>[^/]*)/(?P<model_name>[^/]*)/'
        r'assigner_disciplines',
        'savoirs.admin_views.assigner_disciplines',
        name='assigner_disciplines'),
    url(r'^admin/chercheurs/chercheur/export',
        'chercheurs.admin_views.export'),
    url(r'^admin/', include(admin.site.urls)),

    # stats
    url(r'^stats/$', 'savoirs.admin_views.stats', name='stats'),


    # rss
    url(r'^rss/chercheurs/$', FilChercheurs(), name='rss_chercheurs'),
    url(r'^rss/ressources/$', FilRessources(), name='rss_ressources'),
    url(r'^rss/actualites/$', FilActualites(), name='rss_actualites'),
    url(r'^rss/appels/$', FilAppels(), name='rss_appels'),
    url(r'^rss/agenda/$', FilEvenements(), name='rss_agenda'),
    url(r'^rss/sites/$', FilSites(), name='rss_sites'),
    url(r'^rss/messages/(?P<groupe_id>\d+)/$', FilMessages(),
        name='rss_messages'),
    url(r'^json/get/$', 'savoirs.views.json_get'),
    url(r'^json/set/$', 'savoirs.views.json_set'),

    # recherches sauvegardées
    url(r'^recherches/$', 'savoirs.views.recherches', name='recherches'),
    url(r'^recherches/(?P<type>[^/]*)/sauvegarder/$',
        'savoirs.views.sauvegarder_recherche',
        name='sauvegarder_recherche'),
    url(r'^recherches/(?P<id>\d+)/supprimer/$',
        'savoirs.views.supprimer_recherche',
        name='supprimer_recherche'),
    url(r'^recherches/(?P<id>\d+)/editer/$',
        'savoirs.views.editer_recherche',
        name='editer_recherche'),
    url(r'^recherches/(?P<id>\d+)/activer-alerte/$',
        'savoirs.views.activer_alerte',
        name='activer_alerte'),
    url(r'^recherches/(?P<id>\d+)/desactiver-alerte/$',
        'savoirs.views.desactiver_alerte',
        name='desactiver_alerte'),

    # API Interface (FAUN)
    url(r'^faun/auteurs/(?P<id>\d+)', 'interfaces.views.faun_auteurs',
        name='faun_auteurs'),

    # Django-selectable
    (r'^djselectable/', include('selectable.urls')),

    # Page statique ?
    url(r'^(?P<id>.*)/$', 'savoirs.views.page_statique'),

) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

89250f62a896e5711bf5372be7fd21be9588dba0
<mask token>

<mask token>
admin.autodiscover()
<mask token>

<mask token>
admin.autodiscover()
handler500 = 'views.page_500'
handler404 = 'views.page_404'
sep_patterns = patterns('', url('^$', 'savoirs.views.index', name='accueil'
    ), url('^recherche/$', 'savoirs.views.recherche'))
urlpatterns = sep_patterns + patterns('', url('^informations/$',
    'savoirs.views.informations'), url('^agenda/$',
    'savoirs.views.evenement_index', name='agenda'), url(
    '^agenda/evenements/(?P<id>\\d+)/$', 'savoirs.views.evenement', name=
    'evenement'), url('^agenda/evenements/moderer/$',
    'savoirs.views.evenement_moderation'), url(
    '^agenda/evenements/moderer/(.+)/accepter/$',
    'savoirs.views.evenement_accepter'), url(
    '^agenda/evenements/moderer/(.+)/refuser/$',
    'savoirs.views.evenement_refuser'), url(
    '^agenda/evenements/utilisation/$', 'savoirs.views.page_statique',
    kwargs={'id': 'conditions-agenda'}, name='conditions-agenda'), url(
    '^agenda/evenements/creer/$', 'savoirs.views.evenement_ajout', name=
    'evenement-ajout'), url(
    '^agenda/evenements/creer/options_fuseau_horaire/$',
    'savoirs.views.options_fuseau_horaire'), url('^a-propos/$',
    'savoirs.views.page_statique', kwargs={'id': 'a-propos'}, name=
    'a-propos'), url('^aide/$', 'savoirs.views.page_statique', kwargs={'id':
    'aide'}, name='aide'), url('^domaines-de-recherche/$',
    'savoirs.views.page_statique', kwargs={'id': 'domaines-de-recherche'},
    name='domaines-de-recherche'), url('^legal/$',
    'savoirs.views.page_statique', kwargs={'id': 'legal'}, name='legal'),
    url('^nous-contacter/$', 'savoirs.views.page_statique', kwargs={'id':
    'contact'}, name='contact'), url('^ressources/$',
    'savoirs.views.ressource_index', name='ressources'), url(
    '^ressources/(?P<id>\\d+)/$', 'savoirs.views.ressource_retrieve', name=
    'ressource'), url('^actualites/$', 'savoirs.views.actualite_index',
    name='actualites'), url('^actualites/(?P<id>\\d+)/$',
    'savoirs.views.actualite', name='actualite'), url('^appels/$',
    'savoirs.views.actualite_index', kwargs={'type': 'appels'}, name=
    'appels'), url('^sites/$', 'sitotheque.views.index', name='sites'), url
    ('^sites/(?P<id>\\d+)/$', 'sitotheque.views.retrieve', name='site'),
    url('^sites/google.xml$', 'sitotheque.views.config_google'), url(
    '^sites-auf/$', 'savoirs.views.sites_auf', name='sites-auf'), url(
    '^chercheurs/$', 'chercheurs.views.index', name='chercheurs'), url(
    '^chercheurs/(?P<id>\\d+)/$', 'chercheurs.views.retrieve', name=
    'chercheur'), url('^chercheurs/(?P<id>\\d+)/envoie_courrier/$',
    'chercheurs.views.envoie_courrier', name='envoie_courrier'), url(
    '^chercheurs/inscription/$', 'chercheurs.views.inscription', name=
    'inscription'), url('^chercheurs/inscription_faite/$', TemplateView.
    as_view(template_name='chercheurs/inscription_faite.html'), name=
    'chercheurs-inscription-faite'), url('^chercheurs/courrier_envoye/$',
    TemplateView.as_view(template_name='chercheurs/courrier_envoye.html'),
    name='chercheurs-courrier-envoye'), url(
    '^chercheurs/activation/(?P<id_base36>.*)/(?P<token>.*)/$',
    'chercheurs.views.activation', name='chercheurs-activation'), url(
    '^chercheurs/desinscription/$', 'chercheurs.views.desinscription'), url
    ('^chercheurs/perso/$', 'chercheurs.views.perso'), url(
    '^chercheurs/edit/$', 'chercheurs.views.edit'), url(
    '^chercheurs/conversion$', 'savoirs.views.page_statique', kwargs={'id':
    'table-de-passage'}, name='conversion'), url('^chercheurs/connexion/$',
    'chercheurs.views.login', kwargs={'template_name':
    'chercheurs/login.html'}, name='chercheurs-login'), url(
    '^chercheurs/deconnexion/$', 'django.contrib.auth.views.logout', kwargs
    ={'template_name': 'chercheurs/logged_out.html'}, name=
    'chercheurs-logout'), url('^chercheurs/changement-mdp/$',
    'chercheurs.views.password_change', kwargs={'template_name':
    'chercheurs/password_change_form.html', 'post_change_redirect':
    '/chercheurs/changement-mdp-fini/'}, name='chercheurs-password-change'),
    url('^chercheurs/changement-mdp-fini/$',
    'django.contrib.auth.views.password_change_done', kwargs={
    'template_name': 'chercheurs/password_change_done.html'}, name=
    'chercheurs-password-change-done'), url('^chercheurs/oubli-mdp/$',
    'django.contrib.auth.views.password_reset', kwargs={'template_name':
    'chercheurs/password_reset_form.html', 'email_template_name':
    'chercheurs/password_reset_email.txt', 'post_reset_redirect':
    '/chercheurs/oubli-mdp-envoye/'}, name='chercheurs-password-reset'),
    url('^chercheurs/oubli-mdp-envoye/$',
    'django.contrib.auth.views.password_reset_done', kwargs={
    'template_name': 'chercheurs/password_reset_done.html'}, name=
    'chercheurs-password-reset-done'), url(
    '^chercheurs/oubli-mdp-retour/(?P<uidb36>.*)/(?P<token>.*)/$',
    'django.contrib.auth.views.password_reset_confirm', kwargs={
    'template_name': 'chercheurs/password_reset_confirm.html'}, name=
    'chercheurs-password-reset-confirm'), url(
    '^chercheurs/oubli-mdp-fini/$',
    'django.contrib.auth.views.password_reset_complete', kwargs={
    'template_name': 'chercheurs/password_reset_complete.html'}), url(
    '^chercheurs/reactiver/$', 'django.contrib.auth.views.password_reset',
    kwargs={'template_name': 'chercheurs/reactiver_form.html',
    'email_template_name': 'chercheurs/reactiver_email.txt',
    'post_reset_redirect': '/chercheurs/reactiver-envoye/'}, name=
    'chercheurs-reactiver'), url('^chercheurs/reactiver-envoye/$',
    'django.contrib.auth.views.password_reset_done', kwargs={
    'template_name': 'chercheurs/reactiver_done.html'}, name=
    'chercheurs-reactiver-done'), url(
    '^chercheurs/reactiver-retour/(?P<uidb36>.*)/(?P<token>.*)/$',
    'django.contrib.auth.views.password_reset_confirm', kwargs={
    'template_name': 'chercheurs/reactiver_confirm.html',
    'set_password_form': ReactiverForm}, name=
    'chercheurs-reactiver-confirm'), url('^chercheurs/reactiver-fini/$',
    'django.contrib.auth.views.password_reset_complete', kwargs={
    'template_name': 'chercheurs/reactiver_complete.html'}), url(
    '^etablissements/autocomplete/$',
    'chercheurs.views.etablissements_autocomplete'), url(
    '^etablissements/autocomplete/(?P<pays>.*)/$',
    'chercheurs.views.etablissements_autocomplete'), url(
    '^api/chercheurs/(?P<chercheur_id>\\d+)/$', 'chercheurs.api.api'), url(
    '^api/chercheurs/pays/(?P<pays>.*)/$', 'chercheurs.api.api'), url(
    '^api/chercheurs/region/(?P<region>.*)/$', 'chercheurs.api.api'), url(
    '^api/chercheurs/recherche', 'chercheurs.api.recherche'), url(
    '^api/pong/', include('auf.django.pong.urls')), url('^groupes/$',
    'chercheurs.views.groupe_index'), url('^groupes/(?P<id>\\d+)/$',
    'chercheurs.views.groupe_retrieve', name='groupe_retrieve'), url(
    '^groupes/(?P<id>\\d+)/adhesion/$', 'chercheurs.views.groupe_adhesion',
    name='groupe_adhesion'), url('^groupes/(?P<id>\\d+)/membres/$',
    'chercheurs.views.groupe_membres', name='groupe_membres'), url(
    '^groupes/(?P<id>\\d+)/messages/$', 'chercheurs.views.groupe_messages',
    name='groupe_messages'), url('^discipline/(?P<discipline>\\d+)/',
    include(sep_patterns)), url('^region/(?P<region>\\d+)/', include(
    sep_patterns)), url(
    '^discipline/(?P<discipline>\\d+)/region/(?P<region>\\d+)/', include(
    sep_patterns)), url('^jsi18n/$', admin.site.i18n_javascript), url(
    '^admin/rappels/$', 'rappels.views.admin_rappels', name='admin-rappels'
    ), url('^rappels/edit/(?P<userid>.*)/(?P<cle>.*)/$',
    'rappels.views.edit_chercheur'), url('^admin_tools/', include(
    'admin_tools.urls')), url('^admin/', include(admin.site.urls)), url(
    '^admin/confirmation/(.*)', 'savoirs.admin_views.confirmation'), url(
    '^admin/assigner_pays', 'savoirs.admin_views.assigner_pays'), url(
    '^admin/assigner_thematiques',
    'savoirs.admin_views.assigner_thematiques'), url(
    '^admin/assigner_categorie', 'savoirs.admin_views.assigner_categorie'),
    url('^admin/assigner_cgstatut',
    'chercheurs.admin_views.assigner_cgstatut'), url(
    '^admin/(?P<app_name>[^/]*)/(?P<model_name>[^/]*)/assigner_regions',
    'savoirs.admin_views.assigner_regions', name='assigner_regions'), url(
    '^admin/(?P<app_name>[^/]*)/(?P<model_name>[^/]*)/assigner_disciplines',
    'savoirs.admin_views.assigner_disciplines', name='assigner_disciplines'
    ), url('^admin/chercheurs/chercheur/export',
    'chercheurs.admin_views.export'), url('^admin/', include(admin.site.
    urls)), url('^stats/$', 'savoirs.admin_views.stats', name='stats'), url
    ('^rss/chercheurs/$', FilChercheurs(), name='rss_chercheurs'), url(
    '^rss/ressources/$', FilRessources(), name='rss_ressources'), url(
    '^rss/actualites/$', FilActualites(), name='rss_actualites'), url(
    '^rss/appels/$', FilAppels(), name='rss_appels'), url('^rss/agenda/$',
    FilEvenements(), name='rss_agenda'), url('^rss/sites/$', FilSites(),
    name='rss_sites'), url('^rss/messages/(?P<groupe_id>\\d+)/$',
    FilMessages(), name='rss_messages'), url('^json/get/$',
    'savoirs.views.json_get'), url('^json/set/$', 'savoirs.views.json_set'),
    url('^recherches/$', 'savoirs.views.recherches', name='recherches'),
    url('^recherches/(?P<type>[^/]*)/sauvegarder/$',
    'savoirs.views.sauvegarder_recherche', name='sauvegarder_recherche'),
    url('^recherches/(?P<id>\\d+)/supprimer/$',
    'savoirs.views.supprimer_recherche', name='supprimer_recherche'), url(
    '^recherches/(?P<id>\\d+)/editer/$', 'savoirs.views.editer_recherche',
    name='editer_recherche'), url(
    '^recherches/(?P<id>\\d+)/activer-alerte/$',
    'savoirs.views.activer_alerte', name='activer_alerte'), url(
    '^recherches/(?P<id>\\d+)/desactiver-alerte/$',
    'savoirs.views.desactiver_alerte', name='desactiver_alerte'), url(
    '^faun/auteurs/(?P<id>\\d+)', 'interfaces.views.faun_auteurs', name=
    'faun_auteurs'), ('^djselectable/', include('selectable.urls')), url(
    '^(?P<id>.*)/$', 'savoirs.views.page_statique')) + static(settings.
    MEDIA_URL, document_root=settings.MEDIA_ROOT)

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 import TemplateView
from savoirs.rss import FilChercheurs, FilRessources, FilActualites, FilAppels, FilEvenements, FilSites, FilMessages
from chercheurs.forms import ReactiverForm
admin.autodiscover()
handler500 = 'views.page_500'
handler404 = 'views.page_404'
sep_patterns = patterns('', url('^$', 'savoirs.views.index', name='accueil'
    ), url('^recherche/$', 'savoirs.views.recherche'))
urlpatterns = sep_patterns + patterns('', url('^informations/$',
    'savoirs.views.informations'), url('^agenda/$',
    'savoirs.views.evenement_index', name='agenda'), url(
    '^agenda/evenements/(?P<id>\\d+)/$', 'savoirs.views.evenement', name=
    'evenement'), url('^agenda/evenements/moderer/$',
    'savoirs.views.evenement_moderation'), url(
    '^agenda/evenements/moderer/(.+)/accepter/$',
    'savoirs.views.evenement_accepter'), url(
    '^agenda/evenements/moderer/(.+)/refuser/$',
    'savoirs.views.evenement_refuser'), url(
    '^agenda/evenements/utilisation/$', 'savoirs.views.page_statique',
    kwargs={'id': 'conditions-agenda'}, name='conditions-agenda'), url(
    '^agenda/evenements/creer/$', 'savoirs.views.evenement_ajout', name=
    'evenement-ajout'), url(
    '^agenda/evenements/creer/options_fuseau_horaire/$',
    'savoirs.views.options_fuseau_horaire'), url('^a-propos/$',
    'savoirs.views.page_statique', kwargs={'id': 'a-propos'}, name=
    'a-propos'), url('^aide/$', 'savoirs.views.page_statique', kwargs={'id':
    'aide'}, name='aide'), url('^domaines-de-recherche/$',
    'savoirs.views.page_statique', kwargs={'id': 'domaines-de-recherche'},
    name='domaines-de-recherche'), url('^legal/$',
    'savoirs.views.page_statique', kwargs={'id': 'legal'}, name='legal'),
    url('^nous-contacter/$', 'savoirs.views.page_statique', kwargs={'id':
    'contact'}, name='contact'), url('^ressources/$',
    'savoirs.views.ressource_index', name='ressources'), url(
    '^ressources/(?P<id>\\d+)/$', 'savoirs.views.ressource_retrieve', name=
    'ressource'), url('^actualites/$', 'savoirs.views.actualite_index',
    name='actualites'), url('^actualites/(?P<id>\\d+)/$',
    'savoirs.views.actualite', name='actualite'), url('^appels/$',
    'savoirs.views.actualite_index', kwargs={'type': 'appels'}, name=
    'appels'), url('^sites/$', 'sitotheque.views.index', name='sites'), url
    ('^sites/(?P<id>\\d+)/$', 'sitotheque.views.retrieve', name='site'),
    url('^sites/google.xml$', 'sitotheque.views.config_google'), url(
    '^sites-auf/$', 'savoirs.views.sites_auf', name='sites-auf'), url(
    '^chercheurs/$', 'chercheurs.views.index', name='chercheurs'), url(
    '^chercheurs/(?P<id>\\d+)/$', 'chercheurs.views.retrieve', name=
    'chercheur'), url('^chercheurs/(?P<id>\\d+)/envoie_courrier/$',
    'chercheurs.views.envoie_courrier', name='envoie_courrier'), url(
    '^chercheurs/inscription/$', 'chercheurs.views.inscription', name=
    'inscription'), url('^chercheurs/inscription_faite/$', TemplateView.
    as_view(template_name='chercheurs/inscription_faite.html'), name=
    'chercheurs-inscription-faite'), url('^chercheurs/courrier_envoye/$',
    TemplateView.as_view(template_name='chercheurs/courrier_envoye.html'),
    name='chercheurs-courrier-envoye'), url(
    '^chercheurs/activation/(?P<id_base36>.*)/(?P<token>.*)/$',
    'chercheurs.views.activation', name='chercheurs-activation'), url(
    '^chercheurs/desinscription/$', 'chercheurs.views.desinscription'), url
    ('^chercheurs/perso/$', 'chercheurs.views.perso'), url(
    '^chercheurs/edit/$', 'chercheurs.views.edit'), url(
    '^chercheurs/conversion$', 'savoirs.views.page_statique', kwargs={'id':
    'table-de-passage'}, name='conversion'), url('^chercheurs/connexion/$',
    'chercheurs.views.login', kwargs={'template_name':
    'chercheurs/login.html'}, name='chercheurs-login'), url(
    '^chercheurs/deconnexion/$', 'django.contrib.auth.views.logout', kwargs
    ={'template_name': 'chercheurs/logged_out.html'}, name=
    'chercheurs-logout'), url('^chercheurs/changement-mdp/$',
    'chercheurs.views.password_change', kwargs={'template_name':
    'chercheurs/password_change_form.html', 'post_change_redirect':
    '/chercheurs/changement-mdp-fini/'}, name='chercheurs-password-change'),
    url('^chercheurs/changement-mdp-fini/$',
    'django.contrib.auth.views.password_change_done', kwargs={
    'template_name': 'chercheurs/password_change_done.html'}, name=
    'chercheurs-password-change-done'), url('^chercheurs/oubli-mdp/$',
    'django.contrib.auth.views.password_reset', kwargs={'template_name':
    'chercheurs/password_reset_form.html', 'email_template_name':
    'chercheurs/password_reset_email.txt', 'post_reset_redirect':
    '/chercheurs/oubli-mdp-envoye/'}, name='chercheurs-password-reset'),
    url('^chercheurs/oubli-mdp-envoye/$',
    'django.contrib.auth.views.password_reset_done', kwargs={
    'template_name': 'chercheurs/password_reset_done.html'}, name=
    'chercheurs-password-reset-done'), url(
    '^chercheurs/oubli-mdp-retour/(?P<uidb36>.*)/(?P<token>.*)/$',
    'django.contrib.auth.views.password_reset_confirm', kwargs={
    'template_name': 'chercheurs/password_reset_confirm.html'}, name=
    'chercheurs-password-reset-confirm'), url(
    '^chercheurs/oubli-mdp-fini/$',
    'django.contrib.auth.views.password_reset_complete', kwargs={
    'template_name': 'chercheurs/password_reset_complete.html'}), url(
    '^chercheurs/reactiver/$', 'django.contrib.auth.views.password_reset',
    kwargs={'template_name': 'chercheurs/reactiver_form.html',
    'email_template_name': 'chercheurs/reactiver_email.txt',
    'post_reset_redirect': '/chercheurs/reactiver-envoye/'}, name=
    'chercheurs-reactiver'), url('^chercheurs/reactiver-envoye/$',
    'django.contrib.auth.views.password_reset_done', kwargs={
    'template_name': 'chercheurs/reactiver_done.html'}, name=
    'chercheurs-reactiver-done'), url(
    '^chercheurs/reactiver-retour/(?P<uidb36>.*)/(?P<token>.*)/$',
    'django.contrib.auth.views.password_reset_confirm', kwargs={
    'template_name': 'chercheurs/reactiver_confirm.html',
    'set_password_form': ReactiverForm}, name=
    'chercheurs-reactiver-confirm'), url('^chercheurs/reactiver-fini/$',
    'django.contrib.auth.views.password_reset_complete', kwargs={
    'template_name': 'chercheurs/reactiver_complete.html'}), url(
    '^etablissements/autocomplete/$',
    'chercheurs.views.etablissements_autocomplete'), url(
    '^etablissements/autocomplete/(?P<pays>.*)/$',
    'chercheurs.views.etablissements_autocomplete'), url(
    '^api/chercheurs/(?P<chercheur_id>\\d+)/$', 'chercheurs.api.api'), url(
    '^api/chercheurs/pays/(?P<pays>.*)/$', 'chercheurs.api.api'), url(
    '^api/chercheurs/region/(?P<region>.*)/$', 'chercheurs.api.api'), url(
    '^api/chercheurs/recherche', 'chercheurs.api.recherche'), url(
    '^api/pong/', include('auf.django.pong.urls')), url('^groupes/$',
    'chercheurs.views.groupe_index'), url('^groupes/(?P<id>\\d+)/$',
    'chercheurs.views.groupe_retrieve', name='groupe_retrieve'), url(
    '^groupes/(?P<id>\\d+)/adhesion/$', 'chercheurs.views.groupe_adhesion',
    name='groupe_adhesion'), url('^groupes/(?P<id>\\d+)/membres/$',
    'chercheurs.views.groupe_membres', name='groupe_membres'), url(
    '^groupes/(?P<id>\\d+)/messages/$', 'chercheurs.views.groupe_messages',
    name='groupe_messages'), url('^discipline/(?P<discipline>\\d+)/',
    include(sep_patterns)), url('^region/(?P<region>\\d+)/', include(
    sep_patterns)), url(
    '^discipline/(?P<discipline>\\d+)/region/(?P<region>\\d+)/', include(
    sep_patterns)), url('^jsi18n/$', admin.site.i18n_javascript), url(
    '^admin/rappels/$', 'rappels.views.admin_rappels', name='admin-rappels'
    ), url('^rappels/edit/(?P<userid>.*)/(?P<cle>.*)/$',
    'rappels.views.edit_chercheur'), url('^admin_tools/', include(
    'admin_tools.urls')), url('^admin/', include(admin.site.urls)), url(
    '^admin/confirmation/(.*)', 'savoirs.admin_views.confirmation'), url(
    '^admin/assigner_pays', 'savoirs.admin_views.assigner_pays'), url(
    '^admin/assigner_thematiques',
    'savoirs.admin_views.assigner_thematiques'), url(
    '^admin/assigner_categorie', 'savoirs.admin_views.assigner_categorie'),
    url('^admin/assigner_cgstatut',
    'chercheurs.admin_views.assigner_cgstatut'), url(
    '^admin/(?P<app_name>[^/]*)/(?P<model_name>[^/]*)/assigner_regions',
    'savoirs.admin_views.assigner_regions', name='assigner_regions'), url(
    '^admin/(?P<app_name>[^/]*)/(?P<model_name>[^/]*)/assigner_disciplines',
    'savoirs.admin_views.assigner_disciplines', name='assigner_disciplines'
    ), url('^admin/chercheurs/chercheur/export',
    'chercheurs.admin_views.export'), url('^admin/', include(admin.site.
    urls)), url('^stats/$', 'savoirs.admin_views.stats', name='stats'), url
    ('^rss/chercheurs/$', FilChercheurs(), name='rss_chercheurs'), url(
    '^rss/ressources/$', FilRessources(), name='rss_ressources'), url(
    '^rss/actualites/$', FilActualites(), name='rss_actualites'), url(
    '^rss/appels/$', FilAppels(), name='rss_appels'), url('^rss/agenda/$',
    FilEvenements(), name='rss_agenda'), url('^rss/sites/$', FilSites(),
    name='rss_sites'), url('^rss/messages/(?P<groupe_id>\\d+)/$',
    FilMessages(), name='rss_messages'), url('^json/get/$',
    'savoirs.views.json_get'), url('^json/set/$', 'savoirs.views.json_set'),
    url('^recherches/$', 'savoirs.views.recherches', name='recherches'),
    url('^recherches/(?P<type>[^/]*)/sauvegarder/$',
    'savoirs.views.sauvegarder_recherche', name='sauvegarder_recherche'),
    url('^recherches/(?P<id>\\d+)/supprimer/$',
    'savoirs.views.supprimer_recherche', name='supprimer_recherche'), url(
    '^recherches/(?P<id>\\d+)/editer/$', 'savoirs.views.editer_recherche',
    name='editer_recherche'), url(
    '^recherches/(?P<id>\\d+)/activer-alerte/$',
    'savoirs.views.activer_alerte', name='activer_alerte'), url(
    '^recherches/(?P<id>\\d+)/desactiver-alerte/$',
    'savoirs.views.desactiver_alerte', name='desactiver_alerte'), url(
    '^faun/auteurs/(?P<id>\\d+)', 'interfaces.views.faun_auteurs', name=
    'faun_auteurs'), ('^djselectable/', include('selectable.urls')), url(
    '^(?P<id>.*)/$', 'savoirs.views.page_statique')) + static(settings.
    MEDIA_URL, document_root=settings.MEDIA_ROOT)

# -*- encoding: utf-8 -*-

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 import TemplateView

from savoirs.rss import \
        FilChercheurs, FilRessources, FilActualites, \
        FilAppels, FilEvenements, FilSites, FilMessages

from chercheurs.forms import ReactiverForm


admin.autodiscover()

handler500 = "views.page_500"
handler404 = "views.page_404"

# Les URLs suivantes peuvent être préfixées de la discipline et/ou la
# région. Nous les regroupons donc dans un module qu'on incluera plus bas.
sep_patterns = patterns(
    '',

    # accueil
    url(r'^$', 'savoirs.views.index', name='accueil'),

    # recherche
    url(r'^recherche/$', 'savoirs.views.recherche'),
)

urlpatterns = sep_patterns + patterns(
    '',

    url(r'^informations/$', 'savoirs.views.informations'),

    # agenda
    url(r'^agenda/$', 'savoirs.views.evenement_index', name='agenda'),
    url(r'^agenda/evenements/(?P<id>\d+)/$', 'savoirs.views.evenement',
        name='evenement'),
    url(r'^agenda/evenements/moderer/$', 'savoirs.views.evenement_moderation'),
    url(r'^agenda/evenements/moderer/(.+)/accepter/$',
        'savoirs.views.evenement_accepter'),
    url(r'^agenda/evenements/moderer/(.+)/refuser/$',
        'savoirs.views.evenement_refuser'),
    url(r'^agenda/evenements/utilisation/$', 'savoirs.views.page_statique',
        kwargs={'id': 'conditions-agenda'}, name='conditions-agenda'),
    url(r'^agenda/evenements/creer/$', 'savoirs.views.evenement_ajout',
        name='evenement-ajout'),
    url(r'^agenda/evenements/creer/options_fuseau_horaire/$',
        'savoirs.views.options_fuseau_horaire'),

    # sous-menu droite
    url(r'^a-propos/$', 'savoirs.views.page_statique',
        kwargs={'id': 'a-propos'}, name='a-propos'),
    url(r'^aide/$', 'savoirs.views.page_statique',
        kwargs={'id': 'aide'}, name='aide'),
    url(r'^domaines-de-recherche/$', 'savoirs.views.page_statique',
        kwargs={'id': 'domaines-de-recherche'}, name='domaines-de-recherche'),
    url(r'^legal/$', 'savoirs.views.page_statique',
        kwargs={'id': 'legal'}, name='legal'),
    url(r'^nous-contacter/$', 'savoirs.views.page_statique',
        kwargs={'id': 'contact'}, name='contact'),

    # ressources
    url(r'^ressources/$', 'savoirs.views.ressource_index', name='ressources'),
    url(r'^ressources/(?P<id>\d+)/$', 'savoirs.views.ressource_retrieve',
        name='ressource'),

    # actualités
    url(r'^actualites/$', 'savoirs.views.actualite_index', name='actualites'),
    url(r'^actualites/(?P<id>\d+)/$', 'savoirs.views.actualite',
        name='actualite'),
    url(r'^appels/$', 'savoirs.views.actualite_index',
        kwargs={'type': 'appels'}, name='appels'),

    # sites
    url(r'^sites/$', 'sitotheque.views.index', name='sites'),
    url(r'^sites/(?P<id>\d+)/$', 'sitotheque.views.retrieve', name='site'),
    url(r'^sites/google.xml$', 'sitotheque.views.config_google'),

    # sites AUF
    url(r'^sites-auf/$', 'savoirs.views.sites_auf', name='sites-auf'),

    # chercheurs
    url(r'^chercheurs/$', 'chercheurs.views.index', name='chercheurs'),
    url(r'^chercheurs/(?P<id>\d+)/$', 'chercheurs.views.retrieve',
        name='chercheur'),
    url(r'^chercheurs/(?P<id>\d+)/envoie_courrier/$',
        'chercheurs.views.envoie_courrier',
        name='envoie_courrier'),
    url(r'^chercheurs/inscription/$', 'chercheurs.views.inscription',
        name='inscription'),
    url(r'^chercheurs/inscription_faite/$',
        TemplateView.as_view(
            template_name='chercheurs/inscription_faite.html'
        ),
        name='chercheurs-inscription-faite'),
    url(r'^chercheurs/courrier_envoye/$',
        TemplateView.as_view(
            template_name='chercheurs/courrier_envoye.html'
        ),
        name='chercheurs-courrier-envoye'),
    url(r'^chercheurs/activation/(?P<id_base36>.*)/(?P<token>.*)/$',
        'chercheurs.views.activation',
        name='chercheurs-activation'),
    url(r'^chercheurs/desinscription/$', 'chercheurs.views.desinscription'),
    url(r'^chercheurs/perso/$', 'chercheurs.views.perso'),
    url(r'^chercheurs/edit/$', 'chercheurs.views.edit'),
    url(r'^chercheurs/conversion$', 'savoirs.views.page_statique',
        kwargs={'id': 'table-de-passage'}, name='conversion'),

    url(r'^chercheurs/connexion/$', 'chercheurs.views.login',
        kwargs={'template_name': 'chercheurs/login.html'},
        name='chercheurs-login'),
    url(r'^chercheurs/deconnexion/$', 'django.contrib.auth.views.logout',
        kwargs={'template_name': 'chercheurs/logged_out.html'},
        name='chercheurs-logout'),

    url(r'^chercheurs/changement-mdp/$', 'chercheurs.views.password_change',
        kwargs={
            'template_name': 'chercheurs/password_change_form.html',
            'post_change_redirect': '/chercheurs/changement-mdp-fini/'
        },
        name='chercheurs-password-change'),
    url(r'^chercheurs/changement-mdp-fini/$',
        'django.contrib.auth.views.password_change_done',
        kwargs={'template_name': 'chercheurs/password_change_done.html'},
        name='chercheurs-password-change-done'),

    # Oublié mot de passe
    url(r'^chercheurs/oubli-mdp/$', 'django.contrib.auth.views.password_reset',
        kwargs={
            'template_name': 'chercheurs/password_reset_form.html',
            'email_template_name': 'chercheurs/password_reset_email.txt',
            'post_reset_redirect': '/chercheurs/oubli-mdp-envoye/'
        },
        name='chercheurs-password-reset'),
    url(r'^chercheurs/oubli-mdp-envoye/$',
        'django.contrib.auth.views.password_reset_done',
        kwargs={'template_name': 'chercheurs/password_reset_done.html'},
        name='chercheurs-password-reset-done'),
    url(r'^chercheurs/oubli-mdp-retour/(?P<uidb36>.*)/(?P<token>.*)/$',
        'django.contrib.auth.views.password_reset_confirm',
        kwargs={'template_name': 'chercheurs/password_reset_confirm.html'},
        name='chercheurs-password-reset-confirm'),
    url(r'^chercheurs/oubli-mdp-fini/$',
        'django.contrib.auth.views.password_reset_complete',
        kwargs={'template_name': 'chercheurs/password_reset_complete.html'}),

    # Réactiver fiche
    url(r'^chercheurs/reactiver/$', 'django.contrib.auth.views.password_reset',
        kwargs={
            'template_name': 'chercheurs/reactiver_form.html',
            'email_template_name': 'chercheurs/reactiver_email.txt',
            'post_reset_redirect': '/chercheurs/reactiver-envoye/'
        },
        name='chercheurs-reactiver'),
    url(r'^chercheurs/reactiver-envoye/$',
        'django.contrib.auth.views.password_reset_done',
        kwargs={'template_name': 'chercheurs/reactiver_done.html'},
        name='chercheurs-reactiver-done'),
    url(r'^chercheurs/reactiver-retour/(?P<uidb36>.*)/(?P<token>.*)/$',
        'django.contrib.auth.views.password_reset_confirm',
        kwargs={'template_name': 'chercheurs/reactiver_confirm.html',
                'set_password_form': ReactiverForm},
        name='chercheurs-reactiver-confirm'),
    url(r'^chercheurs/reactiver-fini/$',
        'django.contrib.auth.views.password_reset_complete',
        kwargs={'template_name': 'chercheurs/reactiver_complete.html'}),

    # auto complete
    url(r'^etablissements/autocomplete/$',
        'chercheurs.views.etablissements_autocomplete'),
    url(r'^etablissements/autocomplete/(?P<pays>.*)/$',
        'chercheurs.views.etablissements_autocomplete'),

    # API chercheurs
    url(r'^api/chercheurs/(?P<chercheur_id>\d+)/$', 'chercheurs.api.api'),
    url(r'^api/chercheurs/pays/(?P<pays>.*)/$', 'chercheurs.api.api'),
    url(r'^api/chercheurs/region/(?P<region>.*)/$', 'chercheurs.api.api'),
    url(r'^api/chercheurs/recherche', 'chercheurs.api.recherche'),

    # API Pong
    url(r'^api/pong/', include('auf.django.pong.urls')),


    # groupes
    url(r'^groupes/$', 'chercheurs.views.groupe_index'),
    url(r'^groupes/(?P<id>\d+)/$', 'chercheurs.views.groupe_retrieve',
        name='groupe_retrieve'),
    url(r'^groupes/(?P<id>\d+)/adhesion/$', 'chercheurs.views.groupe_adhesion',
        name='groupe_adhesion'),
    url(r'^groupes/(?P<id>\d+)/membres/$', 'chercheurs.views.groupe_membres',
        name='groupe_membres'),
    url(r'^groupes/(?P<id>\d+)/messages/$', 'chercheurs.views.groupe_messages',
        name='groupe_messages'),

    # section par discipline et/ou région
    url(r'^discipline/(?P<discipline>\d+)/', include(sep_patterns)),
    url(r'^region/(?P<region>\d+)/', include(sep_patterns)),
    url(r'^discipline/(?P<discipline>\d+)/region/(?P<region>\d+)/',
        include(sep_patterns)),

    # traduction disponible dans le frontend sans permissons
    url(r'^jsi18n/$', admin.site.i18n_javascript),

    # Rappels
    url(r'^admin/rappels/$', 'rappels.views.admin_rappels',
        name='admin-rappels'),
    url(r'^rappels/edit/(?P<userid>.*)/(?P<cle>.*)/$',
        'rappels.views.edit_chercheur'),

    # Admin
    url(r'^admin_tools/', include('admin_tools.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^admin/confirmation/(.*)', 'savoirs.admin_views.confirmation'),
    url(r'^admin/assigner_pays', 'savoirs.admin_views.assigner_pays'),
    url(r'^admin/assigner_thematiques',
        'savoirs.admin_views.assigner_thematiques'),
    url(r'^admin/assigner_categorie',
        'savoirs.admin_views.assigner_categorie'),
    url(r'^admin/assigner_cgstatut',
        'chercheurs.admin_views.assigner_cgstatut'),
    url(r'^admin/(?P<app_name>[^/]*)/(?P<model_name>[^/]*)/assigner_regions',
        'savoirs.admin_views.assigner_regions',
        name='assigner_regions'),
    url(r'^admin/(?P<app_name>[^/]*)/(?P<model_name>[^/]*)/'
        r'assigner_disciplines',
        'savoirs.admin_views.assigner_disciplines',
        name='assigner_disciplines'),
    url(r'^admin/chercheurs/chercheur/export',
        'chercheurs.admin_views.export'),
    url(r'^admin/', include(admin.site.urls)),

    # stats
    url(r'^stats/$', 'savoirs.admin_views.stats', name='stats'),


    # rss
    url(r'^rss/chercheurs/$', FilChercheurs(), name='rss_chercheurs'),
    url(r'^rss/ressources/$', FilRessources(), name='rss_ressources'),
    url(r'^rss/actualites/$', FilActualites(), name='rss_actualites'),
    url(r'^rss/appels/$', FilAppels(), name='rss_appels'),
    url(r'^rss/agenda/$', FilEvenements(), name='rss_agenda'),
    url(r'^rss/sites/$', FilSites(), name='rss_sites'),
    url(r'^rss/messages/(?P<groupe_id>\d+)/$', FilMessages(),
        name='rss_messages'),
    url(r'^json/get/$', 'savoirs.views.json_get'),
    url(r'^json/set/$', 'savoirs.views.json_set'),

    # recherches sauvegardées
    url(r'^recherches/$', 'savoirs.views.recherches', name='recherches'),
    url(r'^recherches/(?P<type>[^/]*)/sauvegarder/$',
        'savoirs.views.sauvegarder_recherche',
        name='sauvegarder_recherche'),
    url(r'^recherches/(?P<id>\d+)/supprimer/$',
        'savoirs.views.supprimer_recherche',
        name='supprimer_recherche'),
    url(r'^recherches/(?P<id>\d+)/editer/$',
        'savoirs.views.editer_recherche',
        name='editer_recherche'),
    url(r'^recherches/(?P<id>\d+)/activer-alerte/$',
        'savoirs.views.activer_alerte',
        name='activer_alerte'),
    url(r'^recherches/(?P<id>\d+)/desactiver-alerte/$',
        'savoirs.views.desactiver_alerte',
        name='desactiver_alerte'),

    # API Interface (FAUN)
    url(r'^faun/auteurs/(?P<id>\d+)', 'interfaces.views.faun_auteurs',
        name='faun_auteurs'),

    # Django-selectable
    (r'^djselectable/', include('selectable.urls')),

    # Page statique ?
    url(r'^(?P<id>.*)/$', 'savoirs.views.page_statique'),

) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
