def test_update_view(self):
        url = reverse('writeitinstance_basic_update', subdomain=self.writeitinstance.slug)
        request = self.factory.get(url)
        request.user = self.user

        view = WriteItInstanceUpdateView()
        form_class = view.get_form_class()

        self.assertEquals(view.template_name, 'nuntium/writeitinstance_update_form.html')
        self.assertEquals(form_class, WriteItInstanceBasicForm)
Exemplo n.º 2
0
    def test_update_view(self):
        url = reverse('writeitinstance_basic_update',
                      subdomain=self.writeitinstance.slug)
        request = self.factory.get(url)
        request.user = self.user

        view = WriteItInstanceUpdateView()
        form_class = view.get_form_class()

        self.assertEquals(view.template_name_suffix, '_update_form')
        self.assertEquals(form_class, WriteItInstanceBasicForm)
Exemplo n.º 3
0
    WelcomeView,
    WriteItPopitUpdateView,
    WriteItInstanceWebHooksView,
    WriteItInstanceCreateWebHooksView,
)


from nuntium.user_section.stats import StatsView

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
download_attachment_view = ObjectDownloadView.as_view(model=AnswerAttachment, file_field="content")

managepatterns = patterns('',
    url(r'^$', WriteItInstanceUpdateView.as_view(), name='writeitinstance_basic_update'),
    url(r'^settings/moderation/$', WriteItInstanceModerationView.as_view(), name='writeitinstance_moderation_update'),
    url(r'^moderationqueue/$', ModerationQueue.as_view(), name='writeitinstance_moderation_queue'),
    url(r'^recipients/settings/$', WriteItInstanceRecipientsSettingsView.as_view(), name='writeitinstance_recipients_settings_update'),
    url(r'^settings/ratelimiter/$', WriteItInstanceRateLimiterView.as_view(), name='writeitinstance_ratelimiter_update'),
    url(r'^messages/settings/$', WriteItInstanceAnswerNotificationView.as_view(), name='writeitinstance_answernotification_update'),
    url(r'^api/settings/$', WriteItInstanceApiAutoconfirmView.as_view(), name='writeitinstance_api_autoconfirm_update'),
    url(r'^settings/webbased/$', WriteItInstanceWebBasedView.as_view(), name='writeitinstance_webbased_update'),
    url(r'^settings/api/$', WriteItInstanceApiDocsView.as_view(), name='writeitinstance_api_docs'),
    url(r'^settings/webhooks/$', WriteItInstanceWebHooksView.as_view(), name='writeitinstance_webhooks'),
    url(r'^settings/create_webhooks/$', WriteItInstanceCreateWebHooksView.as_view(), name='writeitinstance_create_webhooks'),
    url(r'^settings/sources/$', WriteitPopitRelatingView.as_view(), name='relate-writeit-popit'),
    url(r'^settings/sources/resync/(?P<popolo_source_pk>[-\d]+)/$', ReSyncFromPopit.as_view(), name='resync-from-popit'),
    url(r'^settings/sources/update/(?P<pk>[-\d]+)/$', WriteItPopitUpdateView.as_view(), name='update-popit-writeit-relation'),
    url(r'^settings/templates/$', WriteItInstanceTemplateUpdateView.as_view(), name='writeitinstance_template_update'),
    url(r'^settings/templates/new_answer_notification/$', NewAnswerNotificationTemplateUpdateView.as_view(), name='edit_new_answer_notification_template'),
Exemplo n.º 4
0
    WriteItInstanceWebBasedView, WriteitPopitRelatingView, MessageTogglePublic,
    RejectMessageView, RejectModerationView, ReSyncFromPopit, WelcomeView,
    WriteItPopitUpdateView, WriteItInstanceWebHooksView,
    WriteItInstanceCreateWebHooksView)
from nuntium.user_section.stats import StatsView

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
download_attachment_view = ObjectDownloadView.as_view(model=AnswerAttachment,
                                                      file_field="content")

managepatterns = patterns(
    '',
    url(r'^$',
        WriteItInstanceUpdateView.as_view(),
        name='writeitinstance_basic_update'),
    url(r'^settings/moderation/$',
        WriteItInstanceModerationView.as_view(),
        name='writeitinstance_moderation_update'),
    url(r'^moderationqueue/$',
        ModerationQueue.as_view(),
        name='writeitinstance_moderation_queue'),
    url(r'^recipients/settings/$',
        WriteItInstanceRecipientsSettingsView.as_view(),
        name='writeitinstance_recipients_settings_update'),
    url(r'^settings/ratelimiter/$',
        WriteItInstanceRateLimiterView.as_view(),
        name='writeitinstance_ratelimiter_update'),
    url(r'^messages/settings/$',
        WriteItInstanceAnswerNotificationView.as_view(),
Exemplo n.º 5
0
    RejectModerationView,
    ReSyncFromPopit,
    WelcomeView,
    WriteItPopitUpdateView,
    WriteItInstanceWebHooksView,
    WriteItInstanceCreateWebHooksView
)
from nuntium.user_section.stats import StatsView

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
download_attachment_view = ObjectDownloadView.as_view(model=AnswerAttachment, file_field="content")

managepatterns = patterns('',
    url(r'^$', WriteItInstanceUpdateView.as_view(), name='writeitinstance_basic_update'),
    url(r'^settings/moderation/$', WriteItInstanceModerationView.as_view(), name='writeitinstance_moderation_update'),
    url(r'^moderationqueue/$', ModerationQueue.as_view(), name='writeitinstance_moderation_queue'),
    url(r'^recipients/settings/$', WriteItInstanceRecipientsSettingsView.as_view(), name='writeitinstance_recipients_settings_update'),
    url(r'^settings/ratelimiter/$', WriteItInstanceRateLimiterView.as_view(), name='writeitinstance_ratelimiter_update'),
    url(r'^messages/settings/$', WriteItInstanceAnswerNotificationView.as_view(), name='writeitinstance_answernotification_update'),
    url(r'^api/settings/$', WriteItInstanceApiAutoconfirmView.as_view(), name='writeitinstance_api_autoconfirm_update'),
    url(r'^settings/webbased/$', WriteItInstanceWebBasedView.as_view(), name='writeitinstance_webbased_update'),
    url(r'^settings/api/$', WriteItInstanceApiDocsView.as_view(), name='writeitinstance_api_docs'),
    url(r'^settings/webhooks/$', WriteItInstanceWebHooksView.as_view(), name='writeitinstance_webhooks'),
    url(r'^settings/create_webhooks/$', WriteItInstanceCreateWebHooksView.as_view(), name='writeitinstance_create_webhooks'),
    url(r'^settings/sources/$', WriteitPopitRelatingView.as_view(), name='relate-writeit-popit'),
    url(r'^settings/sources/resync/(?P<popolo_source_pk>[-\d]+)/$', ReSyncFromPopit.as_view(), name='resync-from-popit'),
    url(r'^settings/sources/update/(?P<pk>[-\d]+)/$', WriteItPopitUpdateView.as_view(), name='update-popit-writeit-relation'),
    url(r'^settings/templates/$', WriteItInstanceTemplateUpdateView.as_view(), name='writeitinstance_template_update'),
    url(r'^settings/templates/new_answer_notification/$', NewAnswerNotificationTemplateUpdateView.as_view(), name='edit_new_answer_notification_template'),