parent
9e4a012acf
commit
8aa881772a
7 changed files with 35 additions and 0 deletions
@ -0,0 +1,3 @@ |
|||||||
|
from django.contrib import admin |
||||||
|
|
||||||
|
# Register your models here. |
||||||
@ -0,0 +1,5 @@ |
|||||||
|
from django.apps import AppConfig |
||||||
|
|
||||||
|
|
||||||
|
class CabinetConfig(AppConfig): |
||||||
|
name = 'cabinet' |
||||||
@ -0,0 +1,3 @@ |
|||||||
|
from django.db import models |
||||||
|
|
||||||
|
# Create your models here. |
||||||
@ -0,0 +1,3 @@ |
|||||||
|
from django.test import TestCase |
||||||
|
|
||||||
|
# Create your tests here. |
||||||
@ -0,0 +1,7 @@ |
|||||||
|
from django.urls import re_path |
||||||
|
|
||||||
|
from . import views |
||||||
|
|
||||||
|
urlpatterns = [ |
||||||
|
re_path(r'^index/$', views.IndexView.as_view(), name='index') |
||||||
|
] |
||||||
@ -0,0 +1,14 @@ |
|||||||
|
from django.shortcuts import render |
||||||
|
from django.utils.translation import ugettext_lazy as _ |
||||||
|
|
||||||
|
# Create your views here. |
||||||
|
from core.views import ProtectedView |
||||||
|
|
||||||
|
|
||||||
|
class IndexView(ProtectedView): |
||||||
|
template_name = 'cabinet/index.html' |
||||||
|
title = _('Личный кабинет') |
||||||
|
|
||||||
|
def get_context_data(self, **kwargs): |
||||||
|
context = super().get_context_data(**kwargs) |
||||||
|
context['title'] = self.title |
||||||
Loading…
Reference in new issue