add cabinet app folder

remotes/origin/HEAD
Max Yakovenko 8 years ago
parent 9e4a012acf
commit 8aa881772a
  1. 0
      cabinet/__init__.py
  2. 3
      cabinet/admin.py
  3. 5
      cabinet/apps.py
  4. 3
      cabinet/models.py
  5. 3
      cabinet/tests.py
  6. 7
      cabinet/urls.py
  7. 14
      cabinet/views.py

@ -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…
Cancel
Save