Example #1
0
    def test_view_IndexView(self):
        """
        Funcion que realiza el test sobre la vista UserIndexView que genera
        lista de usuarios
        """
        # se loguea el usuario testuser
        user = self.client.login(username='******', password='******')
        self.assertTrue(user)
        user2 = User.objects.create_user(username='******', email='*****@*****.**', password='******')
        # se crean 10 proyectos para controlar que se retorne la lista completa de usuarios, que seran 11 en total
        for i in range(10):
            proyecto = Proyecto.objects.create(codigo='co%s' % i, nombre_corto='test%s' % i,
                                               nombre_largo='test%s' % i, cancelado=False, scrum_master=user2)


        # verificamos que la vista devuelva el template adecuado
        request = self.factory.get('/proyectos/')
        view = IndexView.as_view()
        response = view(request)
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.template_name[0], 'proyectos/index.html')
        # verificamos los usuarios retornados
        self.assertEqual(len(response.context_data['object_list']), 10)

        print 'Test de IndexView de Proyecto realizado exitosamente'
Example #2
0
    def test_view_IndexView(self):
        """
        Funcion que realiza el test sobre la vista UserIndexView que genera
        lista de usuarios
        """
        # se loguea el usuario testuser
        user = self.client.login(username='******', password='******')
        self.assertTrue(user)
        user2 = User.objects.create_user(username='******',
                                         email='*****@*****.**',
                                         password='******')
        # se crean 10 proyectos para controlar que se retorne la lista completa de usuarios, que seran 11 en total
        for i in range(10):
            proyecto = Proyecto.objects.create(codigo='co%s' % i,
                                               nombre_corto='test%s' % i,
                                               nombre_largo='test%s' % i,
                                               cancelado=False,
                                               scrum_master=user2)

        # verificamos que la vista devuelva el template adecuado
        request = self.factory.get('/proyectos/')
        view = IndexView.as_view()
        response = view(request)
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.template_name[0], 'proyectos/index.html')
        # verificamos los usuarios retornados
        self.assertEqual(len(response.context_data['object_list']), 10)

        print 'Test de IndexView de Proyecto realizado exitosamente'
Example #3
0
File: tests.py Project: rodiaz/sigp
    def test_view_IndexView(self):
        """
        Funcion que realiza el test sobre la vista IndexView que genera
        lista de sprints
        """
        # se loguea el usuario testuser
        user = self.client.login(username='******', password='******')
        self.assertTrue(user)
        user2 = User.objects.create_user(username='******', email='*****@*****.**', password='******')

        proyecto = Proyecto.objects.create(codigo='codi', nombre_corto='test',
                                           nombre_largo='test', cancelado=False, scrum_master=user2)
        proyecto.save()

        # se crean 10 sprints para controlar que se retorne la lista completa de sprints, que seran 10 en total
        for i in range(10):
            sprint = Sprint.objects.create(nombre='sprint%s' % i, duracion='%d' % i, proyecto=proyecto)
            sprint.save()

        # verificamos que la vista devuelva el template adecuado
        request = self.factory.get(reverse('sprints:index', args=[proyecto.pk]))
        request.user = self.user

        response = IndexView.as_view()(request, pk_proyecto=proyecto.pk)
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.template_name[0], 'sprints/index.html')
        # verificamos los user stories retornados
        self.assertEqual(len(response.context_data['object_list']), 10)

        print 'Test de IndexView de Sprints realizado exitosamente'
Example #4
0
 def test_should_redirects_if_user_is_not_logged_in(self):
     request = RequestFactory().get("/")
     user = User()
     user.is_authenticated = lambda: False
     request.user = user
     result = IndexView.as_view()(request)
     self.assertEqual(302, result.status_code)
Example #5
0
    def test_view_IndexView(self):
        """
        Funcion que realiza el test sobre la vista IndexView que genera
        lista de roles de sistema
        """
        # se loguea el usuario testuser
        user = self.client.login(username='******', password='******')
        self.assertTrue(user)

        # se crean 10 roles para controlar que se retorne la lista completa de roles, que seran 10 en total
        for i in range(10):
            group = Group.objects.create(name='grupo%s' % i)
            group.save()

        # verificamos que la vista devuelva el template adecuado
        request = self.factory.get(reverse('roles:index'))
        request.user = self.user

        response = IndexView.as_view()(request)
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.template_name[0], 'roles/index.html')
        # verificamos los user stories retornados
        self.assertEqual(len(response.context_data['object_list']), 10)

        print 'Test de IndexView de Roles realizado exitosamente'
Example #6
0
    def test_view_IndexView(self):
        """
        Funcion que realiza el test sobre la vista IndexView que genera
        lista de roles de sistema
        """
        # se loguea el usuario testuser
        user = self.client.login(username='******', password='******')
        self.assertTrue(user)

        # se crean 10 roles de proyecto para controlar que se retorne la lista completa de roles, que seran 10 en total
        for i in range(10):
            group = Group.objects.create(name='grupo%s' % i)
            group.save()
            rolProyecto = RolProyecto(group=group, es_rol_proyecto=True)
            rolProyecto.save()

        # verificamos que la vista devuelva el template adecuado
        request = self.factory.get(reverse('roles_proyecto:index'))
        request.user = self.user

        response = IndexView.as_view()(request)
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.template_name[0], 'roles_proyecto/index.html')
        # verificamos los user stories retornados
        self.assertEqual(len(response.context_data['object_list']), 10)

        print 'Test de IndexView de Roles de Proyecto realizado exitosamente'
Example #7
0
def register_urls(app: Flask):
    app.add_url_rule('/', view_func=IndexView.as_view('index'))
    app.add_url_rule('/hotdogs/', view_func=HotDogsView.as_view('hotdogs'))
    app.add_url_rule('/hotdog/<pk>/', view_func=HotDogView.as_view('hotdog'))
    app.add_url_rule('/hotdogs/create/',
                     view_func=CreateHotDogView.as_view('create'))
    app.add_url_rule('/hotdog/<pk>/edit/',
                     view_func=EditHotDogView.as_view('edit'))
    app.add_url_rule('/hotdog/<pk>/delete/',
                     view_func=DeleteHotDogView.as_view('delete'))
Example #8
0
    def test_view_IndexView(self):
        """
        Funcion que realiza el test sobre la vista UserIndexView que genera
        lista de user stories
        """
        # se loguea el usuario testuser
        user = self.client.login(username='******', password='******')
        self.assertTrue(user)
        user2 = User.objects.create_user(username='******',
                                         email='*****@*****.**',
                                         password='******')

        proyecto = Proyecto.objects.create(codigo='codi',
                                           nombre_corto='test',
                                           nombre_largo='test',
                                           cancelado=False,
                                           scrum_master=user2)
        proyecto.save()

        lista = Proyecto.objects.all()
        #print lista

        #crear rolProyecto y rolProyecto_Proyecto
        group = Group.objects.create(name='grupo')
        group.save()
        rolProyecto = RolProyecto(group=group, es_rol_proyecto=True)
        rolProyecto.save()
        rolProyecto_Proyecto = RolProyecto_Proyecto.objects.create(
            user=self.user, rol_proyecto=rolProyecto, proyecto=proyecto)
        rolProyecto_Proyecto.save()

        # se crean 10 user stories para controlar que se retorne la lista completa de user stories, que seran 10 en total
        for i in range(10):
            user_story = UserStory.objects.create(nombre='us%s' % i,
                                                  descripcion='desc%s' % i,
                                                  valor_negocio='%d' % i,
                                                  proyecto=proyecto)
            user_story.save()

        # verificamos que la vista devuelva el template adecuado
        request = self.factory.get(
            reverse('user_stories:index', args=[proyecto.pk]))
        request.user = self.user

        response = IndexView.as_view()(request, pk_proyecto=proyecto.pk)
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.template_name[0], 'user_stories/index.html')
        # verificamos los user stories retornados
        self.assertEqual(len(response.context_data['object_list']), 10)

        print 'Test de IndexView de User Story realizado exitosamente'
Example #9
0
    def test_view_IndexView(self):
        """
        Funcion que realiza el test sobre la vista UserIndexView que genera
        lista de user stories
        """
        # se loguea el usuario testuser
        user = self.client.login(username='******', password='******')
        self.assertTrue(user)
        user2 = User.objects.create_user(username='******', email='*****@*****.**', password='******')

        proyecto = Proyecto.objects.create(codigo='codi', nombre_corto='test',
                                           nombre_largo='test', cancelado=False, scrum_master=user2)
        proyecto.save()

        lista = Proyecto.objects.all()
        #print lista

        #crear rolProyecto y rolProyecto_Proyecto
        group = Group.objects.create(name='grupo')
        group.save()
        rolProyecto = RolProyecto(group=group, es_rol_proyecto=True)
        rolProyecto.save()
        rolProyecto_Proyecto = RolProyecto_Proyecto.objects.create(user=self.user, rol_proyecto=rolProyecto,
                                                                   proyecto=proyecto)
        rolProyecto_Proyecto.save()

        # se crean 10 user stories para controlar que se retorne la lista completa de user stories, que seran 10 en total
        for i in range(10):
            user_story = UserStory.objects.create(nombre='us%s' % i, descripcion='desc%s' % i,
                                                  valor_negocio='%d' % i, proyecto=proyecto)
            user_story.save()



        # verificamos que la vista devuelva el template adecuado
        request = self.factory.get(reverse('user_stories:index', args=[proyecto.pk]))
        request.user = self.user

        response = IndexView.as_view()(request, pk_proyecto=proyecto.pk)
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.template_name[0], 'user_stories/index.html')
        # verificamos los user stories retornados
        self.assertEqual(len(response.context_data['object_list']), 10)

        print 'Test de IndexView de User Story realizado exitosamente'
    def init_app(self, app):
        """Initializes the App.

    Args:
        app (TYPE): Description

    Returns:
        TYPE: Description
    """

        config = app.config.copy()
        self.debug = config.get('PONYWHOOSH_DEBUG', self.debug)
        self.indexes_path = config.get('PONYWHOOSH_INDEXES_PATH',
                                       self.indexes_path)
        self.search_string_min_len = config.get('PONYWHOOSH_MIN_STRING_LEN',
                                                self.search_string_min_len)
        self.writer_timeout = config.get('PONYWHOOSH_WRITER_TIMEOUT',
                                         self.writer_timeout)
        self.url_route = config.get('PONYWHOOSH_URL_ROUTE', self.url_route)
        self.template_path = config.get('PONYWHOOSH_TEMPLATE_PATH',
                                        self.template_path)

        if self.debug:
            print 'PONYWHOOSH_DEBUG -> ', self.debug
            print 'PONYWHOOSH_INDEXES_PATH  -> ', self.indexes_path
            print 'PONYWHOOSH_MIN_STRING_LEN  -> ', self.search_string_min_len
            print 'PONYWHOOSH_TEMPLATE_PATH -> ', self.template_path
            print 'PONYWHOOSH_URL_ROUTE -> ', self.url_route
            print 'PONYWHOOSH_WRITER_TIMEOUT -> ', self.writer_timeout

        loader = jinja2.ChoiceLoader(
            [app.jinja_loader,
             jinja2.FileSystemLoader(self.template_path)])

        # indexView = IndexView()

        app.jinja_loader = loader
        app.add_url_rule(self.url_route,
                         view_func=IndexView.as_view(
                             self.url_route,
                             pw=self,
                             action_url_form=self.url_route))
Example #11
0
    def test_view_IndexView(self):
        """
        Funcion que realiza el test sobre la vista IndexView que genera
        lista de sprints
        """
        # se loguea el usuario testuser
        user = self.client.login(username='******', password='******')
        self.assertTrue(user)
        user2 = User.objects.create_user(username='******',
                                         email='*****@*****.**',
                                         password='******')

        proyecto = Proyecto.objects.create(codigo='codi',
                                           nombre_corto='test',
                                           nombre_largo='test',
                                           cancelado=False,
                                           scrum_master=user2)
        proyecto.save()

        # se crean 10 sprints para controlar que se retorne la lista completa de sprints, que seran 10 en total
        for i in range(10):
            sprint = Sprint.objects.create(nombre='sprint%s' % i,
                                           duracion='%d' % i,
                                           proyecto=proyecto)
            sprint.save()

        # verificamos que la vista devuelva el template adecuado
        request = self.factory.get(reverse('sprints:index',
                                           args=[proyecto.pk]))
        request.user = self.user

        response = IndexView.as_view()(request, pk_proyecto=proyecto.pk)
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.template_name[0], 'sprints/index.html')
        # verificamos los user stories retornados
        self.assertEqual(len(response.context_data['object_list']), 10)

        print 'Test de IndexView de Sprints realizado exitosamente'
Example #12
0
    def test_view_IndexView(self):
        """
        Funcion que realiza el test sobre la vista IndexView que genera
        lista de plantillas de flujo
        """
        # se loguea el usuario testuser
        user = self.client.login(username='******', password='******')
        self.assertTrue(user)
        user2 = User.objects.create_user(username='******', email='*****@*****.**', password='******')

        proyecto = Proyecto.objects.create(codigo='codi', nombre_corto='test',
                                           nombre_largo='test', cancelado=False, scrum_master=user2)
        proyecto.save()

        lista_actividades = []
        # se crean 3 actividades para controlar que se retorne la lista completa de sprints, que seran 3 en total
        for i in range(3):
            actividad_plantilla_flujo = ActividadFlujoPlantilla.objects.create(nombre='actividad_p%s' % i)
            actividad_plantilla_flujo.save()
            lista_actividades.append(actividad_plantilla_flujo)

        # se crean 10 plantillas de flujo para controlar que se retorne la lista completa de plantillas de flujo, que seran 10 en total
        for i in range(10):
            plantilla_flujo = PlantillaFlujo.objects.create(nombre='p_flujo%s' % i)
            plantilla_flujo.actividades = lista_actividades
            plantilla_flujo.save()

        # verificamos que la vista devuelva el template adecuado
        request = self.factory.get(reverse('flujos:index'))
        request.user = self.user

        response = IndexView.as_view()(request)
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.template_name[0], 'flujos/index.html')
        # verificamos las plantillas de flujo retornados
        self.assertEqual(len(response.context_data['object_list']), 10)

        print 'Test de IndexView de Plantillas de flujo realizado exitosamente'
Example #13
0
    def init_app(self, app):
        """Initializes the App.

        Args:
            app (TYPE): Description

        Returns:
            TYPE: Description
        """

        config = app.config.copy()

        self.debug = config.get('PONYWHOOSH_DEBUG', self.debug)
        self.indexes_path = config.get('PONYWHOOSH_INDEXES_PATH',  self.indexes_path)
        self.search_string_min_len = config.get('PONYWHOOSH_MIN_STRING_LEN', self.search_string_min_len)
        self.writer_timeout = config.get('PONYWHOOSH_WRITER_TIMEOUT', self.writer_timeout)
        self.url_route = config.get('PONYWHOOSH_URL_ROUTE', self.url_route)
        self.template_path = config.get('PONYWHOOSH_TEMPLATE_PATH', self.template_path)

        if self.debug:
            print 'PONYWHOOSH_DEBUG -> ', self.debug
            print 'PONYWHOOSH_INDEXES_PATH  -> ', self.indexes_path
            print 'PONYWHOOSH_MIN_STRING_LEN  -> ', self.search_string_min_len
            print 'PONYWHOOSH_WRITER_TIMEOUT -> ', self.writer_timeout
            print 'PONYWHOOSH_TEMPLATE_PATH -> ', self.template_path
            print 'PONYWHOOSH_URL_ROUTE -> ',  self.url_route

        loader = jinja2.ChoiceLoader([
            app.jinja_loader,
            jinja2.FileSystemLoader(self.template_path)
        ])

        app.jinja_loader = loader
        app.add_url_rule(
            self.url_route,
            view_func=IndexView.as_view('ponywhoosh/', pw=self)
        )
Example #14
0
# encoding: utf-8

from django.conf.urls.defaults import patterns, include

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from django.conf import settings

from views import IndexView

admin.autodiscover()

urlpatterns = patterns(
    '', (r'^admin/', include(admin.site.urls)),
    (r'^index.html$', IndexView.as_view()),
    (r'^static/(?P<path>.*)$', 'django.views.static.serve', {
        'document_root': settings.MEDIA_ROOT
    }))
Example #15
0
File: urls.py Project: nigma/pybbm
    OpenTopicView,
    ModeratePost,
)


urlpatterns = patterns(
    "",
    # Syndication feeds
    url("^feeds/posts/$", LastPosts(), name="feed_posts"),
    url("^feeds/topics/$", LastTopics(), name="feed_topics"),
)

urlpatterns += patterns(
    "pybb.views",
    # Index, Category, Forum
    url("^$", IndexView.as_view(), name="index"),
    url("^category/(?P<pk>\d+)/$", CategoryView.as_view(), name="category"),
    url("^forum/(?P<pk>\d+)/$", ForumView.as_view(), name="forum"),
    # User
    url("^users/(?P<username>[^/]+)/$", UserView.as_view(), name="user"),
    url("^block_user/([^/]+)/$", "block_user", name="block_user"),
    # Profile
    url("^profile/edit/$", ProfileEditView.as_view(), name="edit_profile"),
    # Topic
    url("^topic/(?P<pk>\d+)/$", TopicView.as_view(), name="topic"),
    url("^topic/(?P<pk>\d+)/stick/$", StickTopicView.as_view(), name="stick_topic"),
    url("^topic/(?P<pk>\d+)/unstick/$", UnstickTopicView.as_view(), name="unstick_topic"),
    url("^topic/(?P<pk>\d+)/close/$", CloseTopicView.as_view(), name="close_topic"),
    url("^topic/(?P<pk>\d+)/open/$", OpenTopicView.as_view(), name="open_topic"),
    # Add topic/post
    url("^forum/(?P<forum_id>\d+)/topic/add/$", AddPostView.as_view(), name="add_topic"),
Example #16
0
from views import IndexView, DeploymentDetailsView
from views import Services
from views import CreateEnvironmentView
from views import DetailServiceView
from views import DeploymentsView
from views import Wizard, EditEnvironmentView
from forms import FORMS
from muranodashboard.panel.services import get_service_checkers
from openstack_dashboard.dashboards.project.instances.views import DetailView

VIEW_MOD = 'openstack_dashboard.dashboards.project.murano.views'
ENVIRONMENT_ID = r'^(?P<environment_id>[^/]+)'

urlpatterns = patterns(
    VIEW_MOD,
    url(r'^environments$', IndexView.as_view(), name='index'),

    url(r'^create/$',
        Wizard.as_view(FORMS,
                       condition_dict=dict(get_service_checkers())),
        name='create'),

    url(r'^create_environment/$', CreateEnvironmentView.as_view(),
        name='create_environment'),

    url(ENVIRONMENT_ID + r'/update_environment$',
        EditEnvironmentView.as_view(),
        name='update_environment'),

    url(ENVIRONMENT_ID + r'/services$', Services.as_view(),
        name='services'),
Example #17
0
from django.conf.urls import patterns, url

from views import IndexView, DetailView, AboutView, ContactView

urlpatterns = patterns(
    'immuno.views',
    url(r'^$', IndexView.as_view(), name='immuno'),
    url(r'^about/$',
        AboutView.as_view(), {'slug': 'about-immunology-lab'},
        name='immuno-about'),
    url(r'^contact/$',
        ContactView.as_view(), {'slug': 'contact-immunology-lab'},
        name='immuno-contact'),
    url(r'^(?P<slug>.+)', DetailView.as_view(), name='immuno-entry'),
)
Example #18
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()

from views import IndexView
from accounts.forms import CustomSignupForm, CustomSigninForm, CustomEditProfileForm, CustomMessageForm, CustomPasswordForm, CustomEmailChangeForm
from accounts.views import CustomProfileListView
from userena import views as userena_views
from userena.contrib.umessages import views as messages_views
urlpatterns = patterns(
    '',
    url(r'^$', IndexView.as_view(), name='landing'),  #Index, first page
    url(r'^admin/', include(admin.site.urls)),
    url(r'^accounts/$', CustomProfileListView.as_view()),
    url(r'^accounts/signup/$', userena_views.signup, {
        'signup_form': CustomSignupForm,
        'success_url': 'landing'
    }),
    url(r'^accounts/signin/$', userena_views.signin,
        {'auth_form': CustomSigninForm}),
    url(r'^accounts/(?P<username>[\.\w-]+)/edit/$', userena_views.profile_edit,
        {'edit_profile_form': CustomEditProfileForm}),
    url(r'^accounts/(?P<username>[\.\w-]+)/profile_detail/$',
        userena_views.profile_detail),
    url(r'^accounts/(?P<username>[\.\w-]+)/password/$',
        userena_views.password_change, {'pass_form': CustomPasswordForm}),
    url(r'^accounts/(?P<username>[\.\w-]+)/email/$',
        userena_views.email_change, {'email_form': CustomEmailChangeForm}),
    url(r'^accounts/', include('userena.urls')),
    url(r'^activities/', include('activitynetwork.urls',
                                 namespace="activities")),
Example #19
0
"""sweethearts URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from django.views.generic import TemplateView
from views import IndexView, DeAuthView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('accounts/', include('allauth.urls')),
    path('de-auth/', DeAuthView.as_view(), name='de-auth'),
    path('privacy', TemplateView.as_view(template_name='privacy.html')),
    path('', IndexView.as_view(), name='index'),
]
Example #20
0
# -*- encoding: utf-8 -*-
"""Defines all urls conf."""
from django.conf.urls import patterns, url
from views import IndexView, ProjectView, ContactView, ThanksView, ResultView, ResultByIndexView, WordView

urlpatterns = patterns('',
	url(r'^$', IndexView.as_view(), name='dictionary-index'), # index web
	url(r'^contact/$', ContactView.as_view(), name='dictionary-contact'), # contact page
	url(r'^project/$', ProjectView.as_view(), name='dictionary-project'), # project page
	url(r'^search/$', ResultView.as_view(), name='dictionary-search'), # search a word
	url(r'^index/(?P<letter>\w{1})/$', ResultByIndexView.as_view(), name='dictionary-search-by-index'), # search by index
	url(r'^word/(?P<word>\d+)/$', WordView.as_view(), name='dictionary-word'), # view a info word
	url(r'^thanks/$', ThanksView.as_view(), name='dictionary-thanks'), # response to sent message
)
Example #21
0
"""s3proxytest URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin
from views import ListBucketView, IndexView

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^list', ListBucketView.as_view()),
    url(r'^$', IndexView.as_view())
]
Example #22
0
# coding:utf8

from django.conf.urls import url

from views import IndexView, LoginView, ShenQing, GuiHuan, QueRen

urlpatterns = [
    url(r'^$', IndexView.as_view(), name='index1.html'),
    url(r'^login/', LoginView.as_view(), name='login'),
    url(r'^shenqing/', ShenQing.as_view(), name='shenqing'),
    url(r'^guihuan/', GuiHuan.as_view(), name='guihuan'),
    url(r'^queren/', QueRen.as_view(), name='queren'),
]
Example #23
0
# -*- coding: utf-8 -*-
__author__ = 'Dmitry Astrikov'

from django.conf.urls import patterns, url, include
from django.contrib import admin

admin.autodiscover()

from views import IndexView, MCreateView

urlpatterns = patterns(
    '',
    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', IndexView.as_view()),
    url(r'^create/$', MCreateView.as_view()),
    url(r'^get-model/(?P<model_name>\w+)/$', IndexView.as_view()),
)
Example #24
0
import os

from flask import Flask
from views import PredictDigitView, IndexView

app = Flask(__name__)

app.add_url_rule(
    '/api/predict',
    view_func=PredictDigitView.as_view('predict_digit'),
    methods=['POST']
)

app.add_url_rule(
    '/',
    view_func=IndexView.as_view('index'),
    methods=['GET']
)

if __name__ == 'main':
    port = int(os.environ.get("PORT", 5000))
    app.run(host='0.0.0.0', port=port)
Example #25
0
from django.conf.urls import url, include
from rest_framework_nested import routers
from authentication.views import AccountViewSet, LoginView, LogoutView
from posts.views import PostViewSet, AccountPostsViewSet
from views import IndexView
router = routers.SimpleRouter()
router.register(r'accounts', AccountViewSet)

router.register(r'posts', PostViewSet)

accounts_router = routers.NestedSimpleRouter(router,
                                             r'accounts',
                                             lookup='account')
accounts_router.register(r'posts', AccountPostsViewSet)

urlpatterns = (
    url(r'^api/v1/auth/login/$', LoginView.as_view(), name='login'),
    url(r'^api/v1/auth/logout/$', LogoutView.as_view(), name='logout'),
    url(r'^api/v1/', include(router.urls)),
    url(r'^api/v1/', include(accounts_router.urls)),
    url('^.*$', IndexView.as_view(), name='index'),
)
Example #26
0
# pylint: disable=E1120

from django.conf.urls import patterns, url, include
from django.contrib import admin
from django.conf import settings
from views import IndexView, SecureView
from django.views.decorators.cache import never_cache
from django.contrib.auth.decorators import login_required

admin.autodiscover()

urlpatterns = patterns(
    '',

    # Home Page
    url(r'^$', never_cache(IndexView.as_view()), name="sp_demo_home_page"),

    # Secure Page
    url(r'^secure/$',
        never_cache((login_required(SecureView.as_view()))),
        name="sp_demo_secure_page"),

    # Secure Page Too
    url(r'^securetoo/$',
        never_cache(
            login_required(
                SecureView.as_view(template_name="securetoo.html"))),
        name="sp_demo_secure_page_too"),

    # Social Profiles
    url(r'^socialprofile/', include('socialprofile.urls')),
Example #27
0
from django.conf.urls import patterns, url, include
from django.contrib import admin
from django.conf import settings
from views import TermsRequiredView, SecureView, IndexView
from django.views.generic import RedirectView, TemplateView
from django.views.decorators.cache import never_cache
from termsandconditions.decorators import terms_required
from django.contrib.auth.decorators import login_required

admin.autodiscover()

urlpatterns = patterns(
    '',

    # Home Page
    url(r'^$', never_cache(IndexView.as_view()), name="tc_demo_home_page"),

    # Home Page
    url(r'^anon/$',
        never_cache(IndexView.as_view(template_name="index_anon.html")),
        name="tc_demo_home_anon_page"),  #used for pipeline user test

    # Secure Page
    url(r'^secure/$',
        never_cache((login_required(SecureView.as_view()))),
        name="tc_demo_secure_page"),

    # Secure Page Too
    url(r'^securetoo/$',
        never_cache(
            login_required(
Example #28
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.contrib.auth import views as auth_views
from views import IndexView, RedirectToIndexView, ProfileView, DomainEditView, DomainAddView, EmailListView, \
EmailEditView, EmailAddView, EmailEnableView, EmailDisableView, DNSRecordListView

admin.autodiscover()

urlpatterns = patterns('',
    url(r'^$', IndexView.as_view(), name="index"),
    url(r'^login/$', auth_views.login, {'template_name': 'auth/login.html'}, name="auth_login"),
    url(r'^logout/$', RedirectToIndexView.as_view(), name="auth_logout"),
    url(r'^hosting/', include('hosting.urls')),
    url(r'^domain/(?P<pk>\d+)/edit/$', DomainEditView.as_view(), name="edit-domain"),
    url(r'^domain/add/$', DomainAddView.as_view(), name="add-domain"),
    url(r'^domain/(?P<domain_id>\d+)/emails/$', EmailListView.as_view(), name="email-index"),
    url(r'^domain/(?P<domain_id>\d+)/email/add/$', EmailAddView.as_view(), name="email-add"),
    url(r'^domain/(?P<domain_id>\d+)/email/(?P<pk>\d+)/edit/$', EmailEditView.as_view(), name="email-edit"),
    url(r'^domain/(?P<domain_id>\d+)/email/(?P<email_id>\d+)/enable/$', EmailEnableView.as_view(), name="email-enable"),
    url(r'^domain/(?P<domain_id>\d+)/email/(?P<email_id>\d+)/disable/$', EmailDisableView.as_view(), name="email-disable"),
    url(r'^domain/(?P<domain_id>\d+)/dns/records/$', DNSRecordListView.as_view(), name="dns-index"),
    url(r'^profile/(?P<pk>\d+)/$', ProfileView.as_view(), name="profile"),
    url(r'^admin/', include(admin.site.urls)),
)
Example #29
0
from django.conf.urls import patterns, url

from views import IndexView, DetailView, AboutView, ContactView


urlpatterns = patterns(
    "immuno.views",
    url(r"^$", IndexView.as_view(), name="immuno"),
    url(r"^about/$", AboutView.as_view(), {"slug": "about-immunology-lab"}, name="immuno-about"),
    url(r"^contact/$", ContactView.as_view(), {"slug": "contact-immunology-lab"}, name="immuno-contact"),
    url(r"^(?P<slug>.+)", DetailView.as_view(), name="immuno-entry"),
)
Example #30
0
__author__ = 'dheerendra'

from django.conf.urls import url, include
from views import LoginView, IndexView, LogoutView, AddNoticeView, UserNoticeViewset, UserEventsViewset, AddEventView, \
    AddNewsView, UserNewsViewset
from rest_framework.routers import DefaultRouter

router = DefaultRouter()
router.register('notice', UserNoticeViewset, base_name='content_notice')
router.register('event', UserEventsViewset, base_name='content_event')
router.register('news', UserNewsViewset, base_name='content_news')

urlpatterns = [
    url(r'^$', IndexView.as_view(), name='content_home'),
    url(r'^login/', LoginView.as_view(), name='login_page'),
    url(r'^logout/', LogoutView.as_view(), name='logout_page'),
    url(r'^add_notice/', AddNoticeView.as_view(), name='add_content_notice'),
    url(r'^add_event/', AddEventView.as_view(), name='add_content_event'),
    url(r'^add_news/', AddNewsView.as_view(), name='add_content_news'),
    url(r'^api/', include(router.urls)),
]
from django.conf.urls.defaults import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf.urls.static import static
from django.conf import settings
from views import IndexView


from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^i18n/', include('django.conf.urls.i18n')),
    url(r'^$', IndexView.as_view(), name='home' ),
    url(r'^doc_engine/', include('doc_engine.urls', namespace='doc_engine')),
    url(r'^accounts/', include('accounts.urls')),
)

urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(settings.DOCUMENT_URL, document_root=settings.DOCUMENTATION_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
    
js_info_dict = {
    'domain': 'djangojs',
    'packages': ('kavalan',)
}
urlpatterns += patterns('',
    (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
)
Example #32
0
from django.conf.urls import url, include
from django.contrib import admin
from views import IndexView

urlpatterns = [
    url(r'^', IndexView.as_view())
]
Example #33
0
# -*- coding:utf-8 -*-

from django.conf.urls import url
from django.contrib.auth.decorators import login_required

from views import IndexView, PaperView, PaperDetailView, PaperReferenceView

urlpatterns = [
    url('^index/$', IndexView.as_view(), name='paperdb.index'),
    url('^paper/$', login_required(PaperView.as_view()), name='paperdb.paper'),
    url('^paper/reference/(?P<paper_uuid>.+?)/$', PaperReferenceView.as_view(), name='paperdb.paper.reference'),
    url('^paper/detail/(?P<paper_uuid>.+?)/$', PaperDetailView.as_view(), name='paperdb.detail')
]
Example #34
0
# coding: utf-8

from django.conf.urls import patterns, include, url
from views import IndexView, ArticleDetailView
# admin
from django.contrib import admin
admin.autodiscover()

# xadmin
import xadmin
xadmin.autodiscover()


urlpatterns = patterns('',
    # Examples:
    url(r'^$', 'doit.views.home', name='home'),
    url(r'^index/', IndexView.as_view(), name='index_view'),
    url(r'^article/(?P<pk>[0-9]+)/$', ArticleDetailView.as_view(), name='article_detail'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^admin/', include(admin.site.urls)),
    url(r'^xadmin/', include(xadmin.site.urls)),
)
Example #35
0
from django.conf.urls import patterns, url, include
from django.contrib import admin
from django.contrib import databrowse
from django.db.models import get_models
from jadro_droid import urls as droid_urls
from views import IndexView

admin.autodiscover()

index_urls = (
    {'name': 'Databrowse', 'href': '/databrowse/'},
    {'name': 'Admin', 'href': '/admin/'},
    {'name': 'API form', 'href': '/droid/form'},
    )

databrowse.site.register(*get_models())
urlpatterns = patterns('',
    url(r'^$', IndexView.as_view(urls=index_urls)),
    url(r'^admin/', include(admin.site.urls), name='xxxx'),
    url(r'^droid/', include(droid_urls)),
    url(r'^databrowse/(.*)', databrowse.site.root),
)
Example #36
0
from views import IndexView, PrepareModel
from model import User

app = Flask(__name__)

# Database configurations
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://{}:{}@{}/{}'.format(
    os.environ["MYSQL_USER"], os.environ["MYSQL_PASSWORD"],
    os.environ["MYSQL_HOST"], os.environ["MYSQL_DATABASE"])
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False

print(app.config['SQLALCHEMY_DATABASE_URI'])
db = SQLAlchemy(app)

app.add_url_rule('/index', view_func=IndexView.as_view('index'))

app.add_url_rule('/', view_func=PrepareModel.as_view('preparemodel'))


@app.route('/test')
def insert_user():
    try:
        user = User(username='******', email='*****@*****.**')
        db.session.add(user)
        db.session.commit()
        return jsonify({'status': True})
    except IntegrityError:
        return jsonify({'status': False})

Example #37
0
from django.conf.urls import patterns, url
from views import IndexView, DeleteReservationView, ModifyReservationView, HostnamesView

urlpatterns = patterns('',
    url(r"^$", IndexView.as_view(), name="iprange_index"),
    url(r"^rsrv/(?P<pk>.*)/delete/$",DeleteReservationView.as_view(), name="iprange-reservation-delete"),
    url(r"^rsrv/add", ModifyReservationView.as_view(), name="iprange-reservation-modify"),
    url(r"^get_hostames", HostnamesView.as_view(), name="iprange-gethostnames")
)
Example #38
0
from django.conf.urls import patterns, url

from views import (
    ResourceView,
    PersonView,
    OrganizationView,
    IndexView,
    FASTTopicAutocompleteView,
    FASTPlaceAutocompleteView,
    FASTOrganizationAutocompleteView,
    VIVOCollaboratorsAutocompleteView
)


urlpatterns = patterns('',
    url(r'^people/$', IndexView.as_view(), name='people'),
    url(r'^organizations/$', IndexView.as_view(), name='organizations'),
    url(r'^person/(?P<local_name>[a-z0-9]+)/$', PersonView.as_view(), name='person'),
    url(r'^org/(?P<local_name>[a-z0-9]+)/$', OrganizationView.as_view(), name='organization'),
    url(r'^edit/', ResourceView.as_view(), name='edit'),
    url(r'^service/fast/topic/$', FASTTopicAutocompleteView.as_view(), name='fast-topic'),
    url(r'^service/fast/place/$', FASTPlaceAutocompleteView.as_view(), name='fast-place'),
    url(r'^service/fast/org/$', FASTOrganizationAutocompleteView.as_view(), name='fast-org'),
    url(r'^service/vivo/collaborators/$', VIVOCollaboratorsAutocompleteView.as_view(), name='vivo-collaborators'),
    #everything else
    url(r'^$', IndexView.as_view(), name='index')
)
Example #39
0
 def test_should_have_200_status_code_when_user_is_logged_in(self):
     request = RequestFactory().get("/")
     request.user = User()
     result = IndexView.as_view()(request)
     self.assertEqual(200, result.status_code)
Example #40
0
# pylint: disable=E1120

from django.conf.urls import patterns, url, include
from django.contrib import admin
from django.conf import settings
from views import TermsRequiredView, SecureView, IndexView
from django.views.decorators.cache import never_cache
from termsandconditions.decorators import terms_required
from django.contrib.auth.decorators import login_required

admin.autodiscover()

urlpatterns = patterns('',

    # Home Page
    url(r'^$', never_cache(IndexView.as_view()), name="tc_demo_home_page"),

    # Home Page
    url(r'^anon/$', never_cache(IndexView.as_view(template_name="index_anon.html")), name="tc_demo_home_anon_page"), #used for pipeline user test

    # Secure Page
    url(r'^secure/$', never_cache((login_required(SecureView.as_view()))), name="tc_demo_secure_page"),

    # Secure Page Too
    url(r'^securetoo/$', never_cache(login_required(SecureView.as_view(template_name="securetoo.html"))), name="tc_demo_secure_page_too"),

    # Terms Required
    url(r'^termsrequired/$', never_cache(terms_required(login_required(TermsRequiredView.as_view()))), name="tc_demo_required_page"),

    # Terms and Conditions
    url(r'^terms/', include('termsandconditions.urls')),
Example #41
0
# -*- encoding: utf-8 -*-
"""Defines all urls conf."""
from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required
from views import IndexView, ProfileView, TestView, SaveTestView, CourseView

urlpatterns = patterns('',
	url(r'^$', login_required(IndexView.as_view()), name='dashboard'),
	url(r'^profile/$', login_required(ProfileView.as_view()), name='dashboard-profile'),
	url(r'^test/$', login_required(TestView.as_view()), name='dashboard-test'),
	url(r'^test/save/$', login_required(SaveTestView.as_view()), name='dashboard-save-test'),
	url(r'^(?P<course>\w{5,45})/$', login_required(CourseView.as_view()), name='dashboard-course'),
)
Example #42
0
#
# Este programa é um software livre; você pode redistribui-lo e/ou 
# modifica-lo dentro dos termos da Licença Pública Geral GNU como 
# publicada pela Fundação do Software Livre (FSF); na versão 2 da 
# Licença, ou (na sua opnião) qualquer versão.

# Este programa é distribuido na esperança que possa ser  util, 
# mas SEM NENHUMA GARANTIA; sem uma garantia implicita de ADEQUAÇÂO a qualquer
# MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a
# Licença Pública Geral GNU para maiores detalhes.
#
# Você deve ter recebido uma cópia da Licença Pública Geral GNU
# junto com este programa, se não, escreva para a Fundação do Software
# Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

from django.conf.urls.defaults import patterns, include, url
from django.contrib.auth.decorators import login_required
from views import IndexView

urlpatterns = patterns(
    '',
    url(r'^$', login_required(IndexView.as_view())),
    url(r'^reserva/', include('hotsys.reserva.urls')),
    url(r'^produto/', include('hotsys.produto.urls')),
    url(r'^hospede/', include('hotsys.hospede.urls')),
    url(r'^funcionario/', include('hotsys.funcionario.urls')),
    url(r'^quarto/', include('hotsys.quarto.urls')),
    url(r'^login/$', 'django.contrib.auth.views.login'),
    url(r'^logout/$', 'django.contrib.auth.views.logout_then_login'),
)
Example #43
0
from django.conf.urls.defaults import patterns, url
from django.views.generic import ListView

from models import Video, TwitterFeed
from views import IndexView

urlpatterns = patterns('',
    url(r'^$', IndexView.as_view(), name='connect_index'),

    url(r'^video/$', ListView.as_view( 
            queryset=Video.objects.all().order_by('title'),
        ),
        name='connect_video_list'
    ),

    url(r'^twitter/$', ListView.as_view(
            queryset=TwitterFeed.objects.all().order_by('handle'),
        ),
        name='connect_twitterfeed_list'
    ),
)
Example #44
0
    VenueCreate,
    EventCreate,
    EventList,
)
from api import LocationAPI, BookingsAPI, CustomersAPI, EventAPI

from django.contrib import admin

admin.autodiscover()

urlpatterns = patterns(
    "",
    # Examples:
    # url(r'^$', 'reserved.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r"^$", IndexView.as_view()),
    url(r"^companies/$", CompanyList.as_view(), name="reserved_companies"),
    url(r"^events/$", EventList.as_view(), name="event_list"),
    url(r"^events/new/$", EventCreate.as_view(), name="event_create"),
    url(r"^venues/$", VenueList.as_view(), name="reserved_venues"),
    url(r"^venues/new/$", VenueCreate.as_view(), name="venues_create"),
    url(r"^venues/calendar/$", VenueCalendarView.as_view(), name="venues_calendar"),
    url(
        r"^venues/calendar/(?P<date_str>[0-9]{4}-[0-9]{2}-[0-9]{2})[/](?P<name_range>[\w]{0,}[^/])/$",
        VenueCalendarView.as_view(),
        name="reserved_venues__date_calendar",
    ),
    url(r"^bookings/$", BookingList.as_view(), name="reserved_bookings"),
    url(r"^bookings/new/$", BookingCreate.as_view(), name="bookings_create"),
    url(r"^bookings/detail/(?P<slug>[-_\w]+)/$", BookingDetail.as_view(), name="bookings_detail"),
    (r"^accounts/", include("userena.urls")),
Example #45
0
from django.conf.urls import patterns, url
from views import IndexView, DeviceView, InterfaceView, ImportView, SetReferenceView

urlpatterns = patterns('',
    url(r"^$", IndexView.as_view(), name="optical_index"),
    url(r'^import/$', ImportView.as_view()),
    url(r"^set_reference/$", SetReferenceView.as_view(), name="optical_reference"),
    url(r"^(?P<ip>.*)/(?P<name>.*)/$", InterfaceView.as_view(), name="optical_iface"),
    url(r"^(?P<ip>.*)/$", DeviceView.as_view(), name="optical_device"),

)
Example #46
0
# API endpoint for AccountViewSet
from rest_framework_nested import routers

from authentication.views import AccountViewSet

from views import IndexView

from django.conf.urls import include, patterns, url

router = routers.SimpleRouter()
router.register(r'accounts', AccountViewSet)

urlpatterns = patterns(
    '',

    url(r'^api/v1/', include(router.urls)),

    # Passthrough or catch-all route if not matched by a previous rule
    # passes the request through to a js router for processing
    url('^.*$', IndexView.as_view(), name='index'),
)
Example #47
0
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright © 2014 george 
#
# Distributed under terms of the MIT license.

from django.conf.urls import patterns
from views import IndexView

urlpatterns = patterns('',
    (r'^$', IndexView.as_view()),
)

Example #48
0
from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

from views import IndexView

urlpatterns = patterns(
    'newjudge',
    # Examples:
    url(r'^$', IndexView.as_view(), name='home'),
    url(r'^problem/', include('JudgeWeb.problem.urls', namespace='problem')),
    url(r'^user/', include('JudgeWeb.user.urls', namespace='user')),
    url(r'^solution/', include('JudgeWeb.solution.urls',
                               namespace='solution')),
    url(r'^contest/', include('JudgeWeb.contest.urls', namespace='contest')),
    url(r'^diary/', include('JudgeWeb.diary.urls', namespace='diary')),
    url(r'^discuss/', include('JudgeWeb.discuss.urls', namespace='discuss')),
    url(r'^mail/', include('JudgeWeb.mail.urls', namespace='mail')),
    url(r'^dashboard/',
        include('JudgeWeb.dashboard.urls', namespace='dashboard')),

    # Uncomment the admin/doc line below to enable admin documentation:
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
)
Example #49
0
from django.conf.urls.defaults import *
from views import GetStatsView, GetLibraryStats, ProjectScanReceiptView, ProjectStatInfoList, TotalSpaceByStorage, StorageCapacityView
from views import StorageDashMain, ProjectInfoGraphView, IndexView, ProjectStatusHistory, ProjectScanStats, ProjectInfoView
from views import ProjectUpdateReceiptView

urlpatterns = patterns(
    'portal.plugins.gnmplutostats.views',
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^stats/([^\/]+)\/*',
        GetStatsView.as_view(),
        name='gnmplutostats_get_stats'),
    url(r'^library_stats/([^\/]+)\/*',
        GetLibraryStats.as_view(),
        name='gnmplutostats_library_stats'),
    url(r'^storagedash/$',
        StorageDashMain.as_view(),
        name="plutostats_storage_dash"),
    url(r'^projectsize/receipts/',
        ProjectScanReceiptView.as_view(),
        name='projectsize_receipts'),
    url(r'^projectsize/all/',
        ProjectStatInfoList.as_view(),
        name='projectsize_all'),
    url(r'^projectsize/storage/(?P<storage_id>\w{2}-\d+)$',
        ProjectStatInfoList.as_view(),
        name='projectsize_storage'),
    url(r'^projectsize/storage/totals$',
        TotalSpaceByStorage.as_view(),
        name='projectsize_storage_totals'),
    url(r'^projectsize/project/graph$',
        ProjectInfoGraphView.as_view(),
Example #50
0
from django.conf.urls import patterns, include, url
from django.conf import settings
from office.views import OfficeSearchView
from django.contrib import admin
from django.contrib.staticfiles import views
from views import IndexView



urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'customrcare.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^office/search', OfficeSearchView.as_view()),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', IndexView.as_view(template_name = 'customrcare/index.html')),
    url(r'^static/css/bootstrap.min.css', 'django.views.static.serve',
    {'document_root', settings.STATIC_ROOT}),
)
Example #51
0
File: urls.py Project: dairdr/notes
# -*- encoding: utf-8 -*-
"""Defines all urls conf."""
from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required
from views import IndexView, SavePanelView, ReviewPanelView, GroupsPanelView, StudentsPanelView
from api import Student, SavePanelStudent

urlpatterns = patterns('',
	url(r'^$', login_required(IndexView.as_view()), name='student-index'),

	# Panel
	url(r'^panel/manage/$', SavePanelView.as_view(), name='student-manage-panel'),
	url(r'^panel/review/$', ReviewPanelView.as_view(), name='student-review-panel'),
	url(r'^panel/groups/(?P<grade>\w{1,10})$', GroupsPanelView.as_view(), name='student-groups-panel'),
	url(r'^panel/students/(?P<grade>\w{1,10})/(?P<group>\w{1,10})$', StudentsPanelView.as_view(), name='student-students-panel'),

	# API
	url(r'^api/v1/students/$', Student.as_view(), name='student-api-students'),
	url(r'^api/v1/panel/manage/save/$', SavePanelStudent.as_view(), name='student-api-manage-panel-save'),
)
Example #52
0
from django.conf.urls import include, url
from views import IndexView, FetchView, ResultView, DetailView

urlpatterns = [
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^search/$', IndexView.as_view(), name='search_item'),
    url(r'^fetch/(?P<query>.+)/$', FetchView.as_view(), name='fetch_item'),
    url(r'^detail/(?P<pk>.+)/$', DetailView.as_view(), name='app_detail'),
    #url(r'^results/$', ResultView.as_view(), name='results'),
]
Example #53
0
# pylint: disable=E1120

from django.conf.urls import patterns, url, include
from django.contrib import admin
from django.conf import settings
from views import IndexView, SecureView
from django.views.decorators.cache import never_cache
from django.contrib.auth.decorators import login_required
from django.views.generic import RedirectView, TemplateView

admin.autodiscover()

urlpatterns = patterns('',
                       # Home Page
                       url(r'^$', never_cache(IndexView.as_view()), name="sp_demo_home_page"),

                       # Secure Page
                       url(r'^secure/$', never_cache((login_required(SecureView.as_view()))),
                           name="sp_demo_secure_page"),

                       # Secure Page Too
                       url(r'^securetoo/$',
                           never_cache(login_required(SecureView.as_view(template_name="securetoo.html"))),
                           name="sp_demo_secure_page_too"),

                       # Social Profile & Social Auth
                       url(r'^socialprofile/', include('socialprofile.urls')),

                       # Admin documentation:
                       (r'^admin/doc/', include('django.contrib.admindocs.urls')),
Example #54
0
from django.conf.urls import patterns, url
from views import IndexView, DetailView

urlpatterns = patterns(
    '',
    url(r"^$", IndexView.as_view(), name="engagements_form"),
    url(r"^detail/$", DetailView.as_view(), name="detail_view"),
)
Example #55
0
from django.conf.urls import include, url
from django.contrib import admin
from views import IndexView
from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'search/', include('haystack.urls')),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
Example #56
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.contrib.auth import views as auth_views
from views import IndexView, RedirectToIndexView, ProfileView, DomainEditView, DomainAddView, EmailListView, \
EmailEditView, EmailAddView, EmailEnableView, EmailDisableView, DNSRecordListView

admin.autodiscover()

urlpatterns = patterns(
    '',
    url(r'^$', IndexView.as_view(), name="index"),
    url(r'^login/$',
        auth_views.login, {'template_name': 'auth/login.html'},
        name="auth_login"),
    url(r'^logout/$', RedirectToIndexView.as_view(), name="auth_logout"),
    url(r'^hosting/', include('hosting.urls')),
    url(r'^domain/(?P<pk>\d+)/edit/$',
        DomainEditView.as_view(),
        name="edit-domain"),
    url(r'^domain/add/$', DomainAddView.as_view(), name="add-domain"),
    url(r'^domain/(?P<domain_id>\d+)/emails/$',
        EmailListView.as_view(),
        name="email-index"),
    url(r'^domain/(?P<domain_id>\d+)/email/add/$',
        EmailAddView.as_view(),
        name="email-add"),
    url(r'^domain/(?P<domain_id>\d+)/email/(?P<pk>\d+)/edit/$',
        EmailEditView.as_view(),
        name="email-edit"),
    url(r'^domain/(?P<domain_id>\d+)/email/(?P<email_id>\d+)/enable/$',
        EmailEnableView.as_view(),