finance logging

remotes/origin/yandex_rebiling
Andrey 8 years ago
parent 08b4a28e6e
commit 32e76a32a8
  1. 23
      courses/migrations/0006_auto_20180323_1743.py
  2. 3
      courses/views.py
  3. 1
      finance/models.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-03-23 17:43
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('courses', '0005_auto_20180222_1911'),
]
operations = [
migrations.RemoveField(
model_name='topic',
name='description',
),
migrations.RemoveField(
model_name='topic',
name='icon',
),
]

@ -230,8 +230,7 @@ class LessonDetail(APIView):
course = lesson.topic.course course = lesson.topic.course
if payload is None: if payload is None:
if not (lesson.free or request.user.is_authenticated and if not (lesson.free or request.user.is_authenticated and request.user.is_staff):
(request.user.groups.filter(name__in=['supports']).exists() or request.user.is_superuser)):
return Response("Bad token", status=400) return Response("Bad token", status=400)
else: else:

@ -13,6 +13,7 @@ class Bill(models.Model):
comment = models.TextField(verbose_name='Комментарий продавца', help_text='Будет показано пользователю', comment = models.TextField(verbose_name='Комментарий продавца', help_text='Будет показано пользователю',
blank=True, editable=False) blank=True, editable=False)
description = models.TextField(verbose_name='Внутренняя заметка', blank=True) description = models.TextField(verbose_name='Внутренняя заметка', blank=True)
date = models.DateTimeField(verbose_name="Дата выставления", auto_now_add=True)
def __str__(self): def __str__(self):
return '%s: %s' % (self.id, self.user) return '%s: %s' % (self.id, self.user)

Loading…
Cancel
Save