From 1882545308be40bbf7570a1a08cf96797b391a60 Mon Sep 17 00:00:00 2001 From: Anastasia Date: Sun, 7 Jun 2015 15:05:08 +0500 Subject: [PATCH 1/3] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=9F=D1=80=D0=BE=D0=B8=D0=B7=D0=B2=D0=BE=D0=B4?= =?UTF-8?q?=D1=81=D1=82=D0=B2=D0=B5=D0=BD=D0=BD=D0=B0=D1=8F=20=D1=82=D0=B0?= =?UTF-8?q?=D0=B1=D0=BB=D0=B8=D1=86=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- asuzr/admin.py | 5 +++++ asuzr/models.py | 14 ++++++++---- asuzr/views.py | 31 +++++++++++++++++++++------ record/settings.py | 4 ++++ record/urls.py | 3 ++- templates/asuzr/attendance.html | 4 ++-- templates/asuzr/cost_items.html | 26 ++++++++++++++++++++++ templates/asuzr/desreport.html | 2 +- templates/asuzr/order_costs.html | 12 +++++++++++ templates/asuzr/orders.html | 2 +- templates/asuzr/production_table.html | 22 +++++++++++++++++++ 11 files changed, 109 insertions(+), 16 deletions(-) create mode 100644 templates/asuzr/cost_items.html create mode 100644 templates/asuzr/order_costs.html create mode 100644 templates/asuzr/production_table.html diff --git a/asuzr/admin.py b/asuzr/admin.py index 24ab7b9..cc26c8f 100644 --- a/asuzr/admin.py +++ b/asuzr/admin.py @@ -8,6 +8,9 @@ from asuzr.models import AccessProtocol from asuzr.models import OrderPlan from asuzr.models import Attendance from asuzr.models import Schedule +from asuzr.models import OrderCosts +from asuzr.models import CostItem + # Register your models here. #admin.site.register(Product) @@ -21,6 +24,8 @@ admin.site.register(ProdPlan) admin.site.register(AccessProtocol) admin.site.register(OrderPlan) admin.site.register(Schedule) +admin.site.register(OrderCosts) +admin.site.register(CostItem) class AttendAdmin(admin.ModelAdmin): list_display=('date', 'calls', 'visits') admin.site.register(Attendance, AttendAdmin) \ No newline at end of file diff --git a/asuzr/models.py b/asuzr/models.py index 1002069..a474807 100644 --- a/asuzr/models.py +++ b/asuzr/models.py @@ -49,6 +49,9 @@ class Attendance(models.Model): class CostItem(models.Model): name = models.CharField(max_length=150) default_item = models.BooleanField(default=False) + + def __unicode__(self): + return self.name #Заказы class Order(models.Model): @@ -132,7 +135,10 @@ class OrderPlan(models.Model): # Затраты по заказам class OrderCosts(models.Model): - order = models.ForeignKey(Order) - cost_item = models.ForeignKey(CostItem) - value = models.DecimalField(max_digits=12, decimal_places=2) - formula = models.CharField(max_length=150) + order = models.ForeignKey(Order, related_name='+') + cost_item = models.ForeignKey(CostItem, related_name='+') + value = models.DecimalField(max_digits=12, decimal_places=2, null=True, blank = True) + formula = models.CharField(max_length=150, null=True, blank = True) + + def __unicode__(self): + return ', '.join((self.order.product.name, self.cost_item.name)) diff --git a/asuzr/views.py b/asuzr/views.py index d2b90fb..42c7b77 100644 --- a/asuzr/views.py +++ b/asuzr/views.py @@ -10,6 +10,7 @@ from datetime import datetime, date, timedelta import calendar from django.db.models import Count, Sum from asuzr.common import custom_date +from django.contrib.auth.decorators import login_required def prod_list(request): product_list = Product.objects.all() @@ -99,18 +100,23 @@ def main(request, day, month, year): }) return HttpResponse(t.render(c)) +@login_required def orders (request, archive): if archive=='0': - is_done_value=False + is_done_value=False else: - is_done_value=True - + is_done_value=True + order_id=request.GET.get('order_id',0) order_list = Order.objects.filter(is_done=is_done_value).order_by('-id') + sel_order = Order.objects.filter(id=order_id) + cost_items = sel_order.values('cost_items') t=loader.get_template('asuzr/orders.html') c=RequestContext(request, { - 'order_list': order_list, - 'archive': is_done_value, - }) + 'order_list': order_list, + 'archive': is_done_value, + 'sel_order' : sel_order, + 'cost_items' : cost_items, + }) return HttpResponse(t.render(c)) def desreport(request): @@ -120,13 +126,24 @@ def desreport(request): edate = datetime.strptime(end_date, '%d.%m.%y') des_list = Order.objects.filter(cancelled=False, date__range=(sdate,edate)).values('designer__first_name','designer__last_name').annotate(Sum('price'),Count('designer')) t=loader.get_template('asuzr/desreport.html') - c=Context({ + c=RequestContext(request,{ 'des_list' : des_list, 'start_date' : start_date, 'end_date' : end_date, }) return HttpResponse(t.render(c)) +def production_table(request, order_id): + order_list = Order.objects.filter(is_done=False).order_by('-id') + sel_order = Order.objects.filter(id=order_id) + cost_items = sel_order.values('cost_items') + t=loader.get_template('asuzr/order_costs.html') + c=RequestContext(request,{ + 'order_list' : order_list, + 'sel_order' : sel_order, + 'cost_items' : cost_items, + }) + return HttpResponse(t.render(c)) diff --git a/record/settings.py b/record/settings.py index e7cc877..6ea89f0 100644 --- a/record/settings.py +++ b/record/settings.py @@ -10,6 +10,7 @@ https://docs.djangoproject.com/en/1.6/ref/settings/ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os +from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS BASE_DIR = os.path.dirname(os.path.dirname(__file__)) @@ -36,6 +37,7 @@ INSTALLED_APPS = ( 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'inplaceeditform', 'asuzr' ) @@ -83,3 +85,5 @@ USE_TZ = True STATIC_URL = '/static/' TEMPLATE_DIRS = ('/home/anastasia/projects/django/record/templates/') + +TEMPLATE_CONTEXT_PROCESSORS += ('django.core.context_processors.request',) diff --git a/record/urls.py b/record/urls.py index dfca360..b60010f 100644 --- a/record/urls.py +++ b/record/urls.py @@ -10,8 +10,9 @@ urlpatterns = patterns('', url(r'^product/$', 'asuzr.views.prod_list'), url(r'^product/(?P\d+)/$', 'asuzr.views.prod_detail'), url(r'^main/(?P\d+)/(?P\d+)/(?P\d+)/$', 'asuzr.views.main', name='asuzr-main'), - url(r'^orders/(?P\d+)/$', 'asuzr.views.orders'), + url(r'^orders/(?P\d+)/$', 'asuzr.views.orders',name='asuzr-orders'), url(r'^desreport/$', 'asuzr.views.desreport'), + url(r'^production_table/(?P\d+)/$', 'asuzr.views.production_table'), url(r'^admin/', include(admin.site.urls)), url(r'^inplaceeditform/', include('inplaceeditform.urls')), ) diff --git a/templates/asuzr/attendance.html b/templates/asuzr/attendance.html index 8528cde..b0556d7 100644 --- a/templates/asuzr/attendance.html +++ b/templates/asuzr/attendance.html @@ -15,8 +15,8 @@ {{ attend.date.date_dd_mm_yy}} {{ attend.date.weekday_name}} - {% inplace_edit "attend.attend.calls" %} - {% inplace_edit "attend.attend.visits" %} + {{attend.attend.calls}} + {{attend.attend.visits}} {{ attend.orders_count}} {{ attend.orders_price}} {{ attend.designers}} diff --git a/templates/asuzr/cost_items.html b/templates/asuzr/cost_items.html new file mode 100644 index 0000000..7e05ebc --- /dev/null +++ b/templates/asuzr/cost_items.html @@ -0,0 +1,26 @@ + + {% if cost_items %} +
    +
+ + + + {% for item in cost_items %} + + + + + {% endfor %} + + + + + + + + + + {% else %} +

Список пуст

+ {% endif %} +
{{sel_order.product.name}}
Комплектующие
Стоимость
{{sel_order.price}}
{{ item }}
Итого затрат
Прибыль
diff --git a/templates/asuzr/desreport.html b/templates/asuzr/desreport.html index a2e73ce..d0e88af 100644 --- a/templates/asuzr/desreport.html +++ b/templates/asuzr/desreport.html @@ -20,6 +20,6 @@ {% endfor %} {% else %} -

Список заказов пуст

+

Список пуст

{% endif %} {% endblock %} diff --git a/templates/asuzr/order_costs.html b/templates/asuzr/order_costs.html new file mode 100644 index 0000000..455baec --- /dev/null +++ b/templates/asuzr/order_costs.html @@ -0,0 +1,12 @@ +{% extends "asuzr/base.html" %} + +{% block title %} Производственная таблица {% endblock %} +{% block page %} + + + + + + +
{% include 'asuzr/production_table.html' %}{% include 'asuzr/cost_items.html' %}
+{% endblock %} \ No newline at end of file diff --git a/templates/asuzr/orders.html b/templates/asuzr/orders.html index fd9e134..4d7fc42 100644 --- a/templates/asuzr/orders.html +++ b/templates/asuzr/orders.html @@ -28,7 +28,7 @@ {{ order.date_dmy }} {{ order.deadline_dmy }} - {% inplace_edit "order.product.name" %} + {% inplace_edit "order.product" %} {%if order.delivery%} Да {% else %} Нет {% endif %} {%if order.lifting%} Да {% else %} Нет {% endif %} {% inplace_edit "order.address" %} diff --git a/templates/asuzr/production_table.html b/templates/asuzr/production_table.html new file mode 100644 index 0000000..c912fac --- /dev/null +++ b/templates/asuzr/production_table.html @@ -0,0 +1,22 @@ +{% block page %} + + {% if order_list %} +
    +
+ + + + + {% for o in order_list %} + + + + + + {% endfor %} + + {% else %} +

Список заказов пуст

+ {% endif %} +
НаименованиеСрок сдачиАдрес
{{o.product.name}}{{o.date_dmy}}{{o.address}}
+{% endblock %} From 98edf72ec5eaf9aeaa91dfc8a046fbcd7442e272 Mon Sep 17 00:00:00 2001 From: Anastasia Date: Sun, 7 Jun 2015 16:00:46 +0500 Subject: [PATCH 2/3] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=B0=D0=B2=D1=82=D0=BE=D1=80=D0=B8=D0=B7=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- asuzr/views.py | 7 ++- record/urls.py | 3 + templates/registration/logged_out.html | 12 ++++ templates/registration/login.html | 56 +++++++++++++++++++ .../registration/password_change_done.html | 19 +++++++ .../registration/password_change_form.html | 55 ++++++++++++++++++ .../registration/password_reset_complete.html | 21 +++++++ .../registration/password_reset_confirm.html | 37 ++++++++++++ .../registration/password_reset_done.html | 21 +++++++ .../registration/password_reset_email.html | 14 +++++ .../registration/password_reset_form.html | 24 ++++++++ 11 files changed, 267 insertions(+), 2 deletions(-) create mode 100644 templates/registration/logged_out.html create mode 100644 templates/registration/login.html create mode 100644 templates/registration/password_change_done.html create mode 100644 templates/registration/password_change_form.html create mode 100644 templates/registration/password_reset_complete.html create mode 100644 templates/registration/password_reset_confirm.html create mode 100644 templates/registration/password_reset_done.html create mode 100644 templates/registration/password_reset_email.html create mode 100644 templates/registration/password_reset_form.html diff --git a/asuzr/views.py b/asuzr/views.py index 42c7b77..8de6fe2 100644 --- a/asuzr/views.py +++ b/asuzr/views.py @@ -12,6 +12,7 @@ from django.db.models import Count, Sum from asuzr.common import custom_date from django.contrib.auth.decorators import login_required +@login_required def prod_list(request): product_list = Product.objects.all() t = loader.get_template('asuzr/prod_list.html') @@ -20,10 +21,10 @@ def prod_list(request): }) return HttpResponse(t.render(c)) +@login_required def prod_detail(request, prod_id): return HttpResponse("This is %s" % prod_id) - def get_filtered_list(p_list, year, month): filtered_list=[] for a in p_list: @@ -37,7 +38,7 @@ def get_orders_by_date(dt): order_list = Order.objects.filter(date=dt).order_by('id') return order_list - +@login_required def main(request, day, month, year): d,m,y=int(day),int(month), int(year) @@ -119,6 +120,7 @@ def orders (request, archive): }) return HttpResponse(t.render(c)) +@login_required def desreport(request): start_date = request.GET.get('sdate', date.today().strftime('%d.%m.%y')) sdate = datetime.strptime(start_date, '%d.%m.%y') @@ -133,6 +135,7 @@ def desreport(request): }) return HttpResponse(t.render(c)) +@login_required def production_table(request, order_id): order_list = Order.objects.filter(is_done=False).order_by('-id') sel_order = Order.objects.filter(id=order_id) diff --git a/record/urls.py b/record/urls.py index b60010f..9a97213 100644 --- a/record/urls.py +++ b/record/urls.py @@ -1,4 +1,5 @@ from django.conf.urls import patterns, include, url +from django.contrib.auth.views import login, logout from django.contrib import admin admin.autodiscover() @@ -15,4 +16,6 @@ urlpatterns = patterns('', url(r'^production_table/(?P\d+)/$', 'asuzr.views.production_table'), url(r'^admin/', include(admin.site.urls)), url(r'^inplaceeditform/', include('inplaceeditform.urls')), + url(r'^accounts/login/$', login), + url(r'^accounts/logout/$', logout), ) diff --git a/templates/registration/logged_out.html b/templates/registration/logged_out.html new file mode 100644 index 0000000..6a18186 --- /dev/null +++ b/templates/registration/logged_out.html @@ -0,0 +1,12 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} + +{% block breadcrumbs %}{% endblock %} + +{% block content %} + +

{% trans "Thanks for spending some quality time with the Web site today." %}

+ +

{% trans 'Log in again' %}

+ +{% endblock %} diff --git a/templates/registration/login.html b/templates/registration/login.html new file mode 100644 index 0000000..1371514 --- /dev/null +++ b/templates/registration/login.html @@ -0,0 +1,56 @@ +{% extends "admin/base_site.html" %} +{% load i18n admin_static %} + +{% block extrastyle %}{{ block.super }}{% endblock %} + +{% block bodyclass %}login{% endblock %} + +{% block nav-global %}{% endblock %} + +{% block content_title %}{% endblock %} + +{% block breadcrumbs %}{% endblock %} + +{% block content %} +{% if form.errors and not form.non_field_errors and not form.this_is_the_login_form.errors %} +

+{% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %} +

+{% endif %} + +{% if form.non_field_errors or form.this_is_the_login_form.errors %} +{% for error in form.non_field_errors|add:form.this_is_the_login_form.errors %} +

+ {{ error }} +

+{% endfor %} +{% endif %} + +
+
{% csrf_token %} +
+ {% if not form.this_is_the_login_form.errors %}{{ form.username.errors }}{% endif %} + {{ form.username }} +
+
+ {% if not form.this_is_the_login_form.errors %}{{ form.password.errors }}{% endif %} + {{ form.password }} + + +
+ {% url 'admin_password_reset' as password_reset_url %} + {% if password_reset_url %} + + {% endif %} +
+ +
+
+ + +
+{% endblock %} diff --git a/templates/registration/password_change_done.html b/templates/registration/password_change_done.html new file mode 100644 index 0000000..1c928a0 --- /dev/null +++ b/templates/registration/password_change_done.html @@ -0,0 +1,19 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} +{% block userlinks %}{% url 'django-admindocs-docroot' as docsroot %}{% if docsroot %}{% trans 'Documentation' %} / {% endif %}{% trans 'Change password' %} / {% trans 'Log out' %}{% endblock %} +{% block breadcrumbs %} + +{% endblock %} + +{% block title %}{% trans 'Password change successful' %}{% endblock %} + +{% block content %} + +

{% trans 'Password change successful' %}

+ +

{% trans 'Your password was changed.' %}

+ +{% endblock %} diff --git a/templates/registration/password_change_form.html b/templates/registration/password_change_form.html new file mode 100644 index 0000000..f7316a7 --- /dev/null +++ b/templates/registration/password_change_form.html @@ -0,0 +1,55 @@ +{% extends "admin/base_site.html" %} +{% load i18n static %} +{% block extrastyle %}{{ block.super }}{% endblock %} +{% block userlinks %}{% url 'django-admindocs-docroot' as docsroot %}{% if docsroot %}{% trans 'Documentation' %} / {% endif %} {% trans 'Change password' %} / {% trans 'Log out' %}{% endblock %} +{% block breadcrumbs %} + +{% endblock %} + +{% block title %}{% trans 'Password change' %}{% endblock %} + +{% block content %}
+ +
{% csrf_token %} +
+{% if form.errors %} +

+ {% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %} +

+{% endif %} + +

{% trans 'Password change' %}

+ +

{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}

+ +
+ +
+ {{ form.old_password.errors }} + {{ form.old_password }} +
+ +
+ {{ form.new_password1.errors }} + {{ form.new_password1 }} +
+ +
+{{ form.new_password2.errors }} + {{ form.new_password2 }} +
+ +
+ +
+ +
+ + +
+
+ +{% endblock %} diff --git a/templates/registration/password_reset_complete.html b/templates/registration/password_reset_complete.html new file mode 100644 index 0000000..d97f338 --- /dev/null +++ b/templates/registration/password_reset_complete.html @@ -0,0 +1,21 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block title %}{% trans 'Password reset complete' %}{% endblock %} + +{% block content %} + +

{% trans 'Password reset complete' %}

+ +

{% trans "Your password has been set. You may go ahead and log in now." %}

+ +

{% trans 'Log in' %}

+ +{% endblock %} diff --git a/templates/registration/password_reset_confirm.html b/templates/registration/password_reset_confirm.html new file mode 100644 index 0000000..81020b9 --- /dev/null +++ b/templates/registration/password_reset_confirm.html @@ -0,0 +1,37 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block title %}{% trans 'Password reset' %}{% endblock %} + +{% block content %} + +{% if validlink %} + +

{% trans 'Enter new password' %}

+ +

{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}

+ +
{% csrf_token %} +{{ form.new_password1.errors }} +

{{ form.new_password1 }}

+{{ form.new_password2.errors }} +

{{ form.new_password2 }}

+

+
+ +{% else %} + +

{% trans 'Password reset unsuccessful' %}

+ +

{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}

+ +{% endif %} + +{% endblock %} diff --git a/templates/registration/password_reset_done.html b/templates/registration/password_reset_done.html new file mode 100644 index 0000000..9847104 --- /dev/null +++ b/templates/registration/password_reset_done.html @@ -0,0 +1,21 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block title %}{% trans 'Password reset successful' %}{% endblock %} + +{% block content %} + +

{% trans 'Password reset successful' %}

+ +

{% trans "We've emailed you instructions for setting your password. You should be receiving them shortly." %}

+ +

{% trans "If you don't receive an email, please make sure you've entered the address you registered with, and check your spam folder." %}

+ +{% endblock %} diff --git a/templates/registration/password_reset_email.html b/templates/registration/password_reset_email.html new file mode 100644 index 0000000..01b3bcc --- /dev/null +++ b/templates/registration/password_reset_email.html @@ -0,0 +1,14 @@ +{% load i18n %}{% autoescape off %} +{% blocktrans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %} + +{% trans "Please go to the following page and choose a new password:" %} +{% block reset_link %} +{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %} +{% endblock %} +{% trans "Your username, in case you've forgotten:" %} {{ user.get_username }} + +{% trans "Thanks for using our site!" %} + +{% blocktrans %}The {{ site_name }} team{% endblocktrans %} + +{% endautoescape %} diff --git a/templates/registration/password_reset_form.html b/templates/registration/password_reset_form.html new file mode 100644 index 0000000..c9998a1 --- /dev/null +++ b/templates/registration/password_reset_form.html @@ -0,0 +1,24 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block title %}{% trans "Password reset" %}{% endblock %} + +{% block content %} + +

{% trans "Password reset" %}

+ +

{% trans "Forgotten your password? Enter your email address below, and we'll email instructions for setting a new one." %}

+ +
{% csrf_token %} +{{ form.email.errors }} +

{{ form.email }}

+
+ +{% endblock %} From a12ccbbdb54111e579326810365ec608886f791b Mon Sep 17 00:00:00 2001 From: "Denis V. Dedkov" Date: Sun, 7 Jun 2015 16:53:08 +0500 Subject: [PATCH 3/3] settings.py was removed --- record/settings.py | 89 ---------------------------------------------- 1 file changed, 89 deletions(-) delete mode 100644 record/settings.py diff --git a/record/settings.py b/record/settings.py deleted file mode 100644 index 6ea89f0..0000000 --- a/record/settings.py +++ /dev/null @@ -1,89 +0,0 @@ -""" -Django settings for record project. - -For more information on this file, see -https://docs.djangoproject.com/en/1.6/topics/settings/ - -For the full list of settings and their values, see -https://docs.djangoproject.com/en/1.6/ref/settings/ -""" - -# Build paths inside the project like this: os.path.join(BASE_DIR, ...) -import os -from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS -BASE_DIR = os.path.dirname(os.path.dirname(__file__)) - - -# Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/ - -# SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = ')-s&c_)jnmzoslf=9rnav9qqadd#l$46jt+m51ppu!lril3g89' - -# SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True - -TEMPLATE_DEBUG = True - -ALLOWED_HOSTS = [] - - -# Application definition - -INSTALLED_APPS = ( - 'django.contrib.admin', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.messages', - 'django.contrib.staticfiles', - 'inplaceeditform', - 'asuzr' -) - -MIDDLEWARE_CLASSES = ( - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.common.CommonMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - 'django.middleware.clickjacking.XFrameOptionsMiddleware', -) - -ROOT_URLCONF = 'record.urls' - -WSGI_APPLICATION = 'record.wsgi.application' - - -# Database -# https://docs.djangoproject.com/en/1.6/ref/settings/#databases - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), - } -} - -# Internationalization -# https://docs.djangoproject.com/en/1.6/topics/i18n/ - -LANGUAGE_CODE = 'en-us' - -TIME_ZONE = 'Asia/Yekaterinburg' - -USE_I18N = True - -USE_L10N = True - -USE_TZ = True - - -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/1.6/howto/static-files/ - -STATIC_URL = '/static/' - -TEMPLATE_DIRS = ('/home/anastasia/projects/django/record/templates/') - -TEMPLATE_CONTEXT_PROCESSORS += ('django.core.context_processors.request',)