-i https://py.mdrn.pl:8443/simple
-django>=1.11,<2.0
-django-cas-ng==3.6.0
-django-bootstrap4==0.0.8
+Django==3.0.4
+django-cas-ng==4.1.1
+django-bootstrap4==1.1.1
django-pglocks==1.0.4
celery[redis]==4.4.0
('access', models.BooleanField(default=False)),
('token', models.CharField(max_length=64, null=True, blank=True)),
('token_secret', models.CharField(max_length=64, null=True, blank=True)),
- ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
+ ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE)),
],
options={
},
class OAuthConnection(models.Model):
- user = models.ForeignKey(User)
+ user = models.ForeignKey(User, models.CASCADE)
access = models.BooleanField(default=False)
token = models.CharField(max_length=64, null=True, blank=True)
token_secret = models.CharField(max_length=64, null=True, blank=True)
-import cgi
-
from django.contrib.auth.decorators import login_required
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from django.http import HttpResponseRedirect, HttpResponse
import requests
from requests_oauthlib import OAuth1Session
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
class status:
WAITING = 1
import os.path
from django import forms
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
import mutagen
from django.utils.encoding import force_bytes
migrations.AddField(
model_name='audiobook',
name='project',
- field=models.ForeignKey(verbose_name='project', to='archive.Project'),
+ field=models.ForeignKey(verbose_name='project', to='archive.Project', on_delete=models.CASCADE),
preserve_default=True,
),
]
--- /dev/null
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.29 on 2020-03-30 14:46
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('archive', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='audiobook',
+ name='project',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='archive.Project', verbose_name='project'),
+ ),
+ ]
from django.db import models
from time import sleep
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
from django_pglocks import advisory_lock
from archive.constants import status
from archive.settings import FILES_SAVE_PATH, ADVERT, LICENSE, ORGANIZATION, PROJECT
conductor = models.CharField(max_length=255, verbose_name=_('conductor'))
encoded_by = models.CharField(max_length=255, verbose_name=_('encoded by'))
date = models.CharField(max_length=255, verbose_name=_('date'))
- project = models.ForeignKey(Project, verbose_name=_('project'))
+ project = models.ForeignKey(Project, models.PROTECT, verbose_name=_('project'))
url = models.URLField(max_length=255, verbose_name=_('book url'))
translator = models.CharField(max_length=255, null=True, blank=True, verbose_name=_('translator'))
modified = models.DateTimeField(null=True, editable=False)
-# Create your views here.
-
from datetime import datetime
import os
import os.path
from archive import settings
from django.contrib.auth import logout
from django.contrib.auth.decorators import permission_required
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from django.db.models import Q, Max
from django.http import Http404, HttpResponse
from django.shortcuts import render, redirect, get_object_or_404
},
]
-MIDDLEWARE_CLASSES = (
+MIDDLEWARE = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
url(r'^archive/', include('archive.urls')),
url(r'^publish/', include('apiclient.urls')),
- url(r'^admin/', include(admin.site.urls)),
+ url(r'^admin/', admin.site.urls),
url(r'^accounts/login/$', django_cas_ng.views.LoginView.as_view(), name='login'),
url(r'^accounts/logout/$', django_cas_ng.views.LogoutView.as_view(), name='logout'),
]