Пример #1
0
 url(r'^%s$' % pgettext('urls', 'users/'),
     views.users.show_users,
     name='users'),
 url(r'^%s%s(?P<group_id>\d+)/(?P<group_slug>.*)/$' %
     (pgettext('urls', 'users/'), pgettext('urls', 'by-group/')),
     views.users.show_users,
     kwargs={'by_group': True},
     name='users_by_group'),
 # TODO: rename as user_edit, b/c that's how template is named
 url(r'^%s(?P<id>\d+)/%s$' %
     (pgettext('urls', 'users/'), pgettext('urls', 'edit/')),
     views.users.edit_user,
     name='edit_user'),
 service_url(
     r'^%s(?P<id>\d+)/%s(?P<file_name>.+)/$' %
     (pgettext('urls', 'users/'), pgettext('urls', 'download-data/')),
     views.users.download_user_data,
     name='download_user_data'),
 service_url(  #ajax get only
     r'^%s(?P<id>\d+)/%s$' %
     (pgettext('urls',
               'users/'), pgettext('urls', 'get-todays-backup-file-name/')),
     views.users.get_todays_backup_file_name,
     name='get_todays_backup_file_name'),
 service_url(  #ajax post only
     r'^users/set-primary-language$',
     views.users.user_set_primary_language,
     name='user_set_primary_language'),
 service_url(r'^users/get-description$',
             views.users.get_user_description,
             name='get_user_description'),
Пример #2
0
     views.meta.config_variable,
     kwargs={
         'variable_name': 'CUSTOM_CSS',
         'mimetype': 'text/css'
     },
     name='custom_css'),
 url('^custom\.js$',
     views.meta.config_variable,
     kwargs={
         'variable_name': 'CUSTOM_JS',
         'mimetype': 'text/javascript'
     },
     name='custom_js'),
 #no translation for this url!!
 service_url(r'^import-data/$',
             views.writers.import_data,
             name='import_data'),
 service_url(r'^%s$' % _('about/'), views.meta.about, name='about'),
 service_url(r'^%s$' % _('faq/'), views.meta.faq, name='faq'),
 service_url(r'^%s$' % _('privacy/'), views.meta.privacy, name='privacy'),
 service_url(r'^%s$' % _('help/'), views.meta.help, name='help'),
 service_url(r'^%s(?P<id>\d+)/%s$' % (_('answers/'), _('edit/')),
             views.writers.edit_answer,
             name='edit_answer'),
 service_url(r'^%s(?P<id>\d+)/%s$' % (_('answers/'), _('revisions/')),
             views.readers.revisions,
             kwargs={'post_type': 'answer'},
             name='answer_revisions'),
 # END main page urls
 service_url(r'^api/get_questions/',
             views.commands.api_get_questions,
Пример #3
0
                                         pgettext('urls', 'users/'),
                                         pgettext('urls', 'by-group/')
                                     ),
     views.users.show_users,
     kwargs={'by_group': True},
     name='users_by_group'
 ),
 # TODO: rename as user_edit, b/c that's how template is named
 url(
     r'^%s(?P<id>\d+)/%s$' % (pgettext('urls', 'users/'), pgettext('urls', 'edit/')),
     views.users.edit_user,
     name='edit_user'
 ),
 service_url(  # ajax post only
     r'^users/set-primary-language$',
     views.users.user_set_primary_language,
     name='user_set_primary_language'
 ),
 service_url(
     r'^users/get-description$',
     views.users.get_user_description,
     name='get_user_description'
 ),
 service_url(
     r'^users/set-description$',
     views.users.set_user_description,
     name='set_user_description',
 ),
 url(
     r'^%s(?P<id>\d+)/(?P<slug>.+)/%s$' % (
         pgettext('urls', 'users/'),
Пример #4
0
 url(r"^feeds/question/(?P<pk>\d+)/$", RssIndividualQuestionFeed(), name="individual_question_feed"),
 url(r"^%s$" % _("feedback/"), views.meta.feedback, name="feedback"),
 url(
     "^custom\.css$",
     views.meta.config_variable,
     kwargs={"variable_name": "CUSTOM_CSS", "mimetype": "text/css"},
     name="custom_css",
 ),
 url(
     "^custom\.js$",
     views.meta.config_variable,
     kwargs={"variable_name": "CUSTOM_JS", "mimetype": "text/javascript"},
     name="custom_js",
 ),
 # no translation for this url!!
 service_url(r"^import-data/$", views.writers.import_data, name="import_data"),
 service_url(r"^%s$" % _("about/"), views.meta.about, name="about"),
 service_url(r"^%s$" % _("faq/"), views.meta.faq, name="faq"),
 service_url(r"^%s$" % _("privacy/"), views.meta.privacy, name="privacy"),
 service_url(r"^%s$" % _("help/"), views.meta.help, name="help"),
 service_url(r"^%s(?P<id>\d+)/%s$" % (_("answers/"), _("edit/")), views.writers.edit_answer, name="edit_answer"),
 service_url(
     r"^%s(?P<id>\d+)/%s$" % (_("answers/"), _("revisions/")),
     views.readers.revisions,
     kwargs={"post_type": "answer"},
     name="answer_revisions",
 ),
 # END main page urls
 service_url(r"^api/get_questions/", views.commands.api_get_questions, name="api_get_questions"),
 service_url(r"^get-thread-shared-users/", views.commands.get_thread_shared_users, name="get_thread_shared_users"),
 service_url(
Пример #5
0
         'variable_name': 'CUSTOM_CSS',
         'mimetype': 'text/css'
     },
     name = 'custom_css'
 ),
 url(
     '^custom\.js$',
     views.meta.config_variable,
     kwargs = {
         'variable_name': 'CUSTOM_JS',
         'mimetype': 'text/javascript'
     },
     name = 'custom_js'
 ),
 #no translation for this url!!
 service_url(r'^import-data/$', views.writers.import_data, name='import_data'),
 service_url(r'^%s$' % _('about/'), views.meta.about, name='about'),
 service_url(r'^%s$' % _('faq/'), views.meta.faq, name='faq'),
 service_url(r'^%s$' % _('privacy/'), views.meta.privacy, name='privacy'),
 service_url(r'^%s$' % _('help/'), views.meta.help, name='help'),
 service_url(
     r'^%s(?P<id>\d+)/%s$' % (_('answers/'), _('edit/')),
     views.writers.edit_answer,
     name='edit_answer'
 ),
 service_url(
     r'^%s(?P<id>\d+)/%s$' % (_('answers/'), _('revisions/')),
     views.readers.revisions,
     kwargs = {'post_type': 'answer'},
     name='answer_revisions'
 ),
Пример #6
0
    url(r'^%s$' % pgettext('urls', 'users/'),
        views.users.show_users,
        name='users'),
    url(r'^%s%s(?P<group_id>\d+)/(?P<group_slug>.*)/$' %
        (pgettext('urls', 'users/'), pgettext('urls', 'by-group/')),
        views.users.show_users,
        kwargs={'by_group': True},
        name='users_by_group'),

    # TODO: rename as user_edit, b/c that's how template is named
    url(r'^%s(?P<id>\d+)/%s$' %
        (pgettext('urls', 'users/'), pgettext('urls', 'edit/')),
        views.users.edit_user,
        name='edit_user'),
    service_url(r'^users/set-primary-language$',
                views.users.user_set_primary_language,
                name='user_set_primary_language'),  # ajax post only
    url(r'^%s(?P<id>\d+)/(?P<slug>.+)/%s$' %
        (pgettext('urls', 'users/'), pgettext('urls', 'subscriptions/')),
        views.users.user,
        kwargs={'tab_name': 'email_subscriptions'},
        name='user_subscriptions'),
    url(r'^%s(?P<id>\d+)/(?P<slug>.+)/%s$' %
        (pgettext('urls', 'users/'), pgettext('urls', 'select_languages/')),
        views.users.user_select_languages,
        name='user_select_languages'),
    url(r'^%s(?P<id>\d+)/(?P<slug>.+)/$' % pgettext('urls', 'users/'),
        views.users.user,
        name='user_profile'),
    url(r'^%s$' % pgettext('urls', 'groups/'),
        views.users.groups,