Commit f5292c61 authored by Jean-samuel TETTEKPOE's avatar Jean-samuel TETTEKPOE
Browse files

Move to Django 3.2.5 and python3

parent 47512e59
Pipeline #9074 failed with stage
in 26 seconds
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
......@@ -21,8 +21,8 @@ class Migration(migrations.Migration):
('data', models.TextField(blank=True)),
('timestamp', models.DateTimeField(auto_now_add=True)),
('fixed', models.BooleanField(default=False)),
('author', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
('bar', models.ForeignKey(to='bars_core.Bar')),
('author', models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE)),
('bar', models.ForeignKey(to='bars_core.Bar', on_delete=models.CASCADE)),
],
options={
},
......
......@@ -15,8 +15,8 @@ from bars_core.models.user import User
@permission_logic(BarRolePermissionLogic())
class BugReport(models.Model):
bar = models.ForeignKey(Bar)
author = models.ForeignKey(User)
bar = models.ForeignKey(Bar, on_delete=models.CASCADE)
author = models.ForeignKey(User, on_delete=models.CASCADE)
message = models.CharField(max_length=1000)
data = models.TextField(blank=True)
timestamp = models.DateTimeField(auto_now_add=True)
......@@ -24,7 +24,7 @@ class BugReport(models.Model):
_type = VirtualField("BugReport")
def __unicode__(self):
return "#%d by %s at %s" % (self.id, unicode(self.author), unicode(self.timestamp))
return "#%d by %s at %s" % (self.id, str(self.author), str(self.timestamp))
class BugReportSerializer(serializers.ModelSerializer):
......@@ -42,8 +42,8 @@ class BugReportSerializer(serializers.ModelSerializer):
payload = {
"attachments": [
{
"fallback": u"Un bug a été reporté par _%s_ dans le bar _%s_" % (b.author.get_full_name(), b.bar.name),
"text": u"Un bug a été reporté par *%s* dans le bar *%s*" % (b.author.get_full_name(), b.bar.name),
"fallback": "Un bug a été reporté par _%s_ dans le bar _%s_" % (b.author.get_full_name(), b.bar.name),
"text": "Un bug a été reporté par *%s* dans le bar *%s*" % (b.author.get_full_name(), b.bar.name),
"color": "#D00000",
"fields": [
{
......@@ -65,7 +65,7 @@ class BugReportSerializer(serializers.ModelSerializer):
requests.post(url_slack, json=payload, proxies=proxies)
if settings.IRC_HOOK:
lines = []
lines.append(u"Un bug a été reporté par %c03%c%s%c%c dans le bar %c05%c%s%c%c" % (chr(3), chr(2), b.author.get_full_name(), chr(2), chr(3), chr(3), chr(2), b.bar.name, chr(2), chr(3)))
lines.append("Un bug a été reporté par %c03%c%s%c%c dans le bar %c05%c%s%c%c" % (chr(3), chr(2), b.author.get_full_name(), chr(2), chr(3), chr(3), chr(2), b.bar.name, chr(2), chr(3)))
lines.append("%c02%cMessage: %c%c" % (chr(3), chr(2), chr(2), chr(3)))
lines.append(b.message)
lines.append("%c02%cContexte: %c%c"% (chr(3), chr(2), chr(2), chr(3)))
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.utils.timezone
......@@ -62,8 +62,8 @@ class Migration(migrations.Migration):
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=127, choices=[(b'customer', b'customer'), (b'moneymanager', b'moneymanager'), (b'policeman', b'policeman'), (b'admin', b'admin'), (b'inventorymanager', b'inventorymanager'), (b'appromanager', b'appromanager'), (b'newsmanager', b'newsmanager'), (b'accountmanager', b'accountmanager'), (b'staff', b'staff')])),
('last_modified', models.DateTimeField(auto_now=True)),
('bar', models.ForeignKey(to='bars_core.Bar')),
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
('bar', models.ForeignKey(to='bars_core.Bar', on_delete=models.CASCADE)),
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE)),
],
options={
},
......@@ -72,13 +72,13 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='account',
name='bar',
field=models.ForeignKey(to='bars_core.Bar'),
field=models.ForeignKey(to='bars_core.Bar', on_delete=models.CASCADE),
preserve_default=True,
),
migrations.AddField(
model_name='account',
name='owner',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL),
field=models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE),
preserve_default=True,
),
migrations.AlterUniqueTogether(
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
......@@ -19,7 +19,7 @@ class Migration(migrations.Migration):
('success', models.BooleanField()),
('sent_username', models.CharField(max_length=128)),
('ip', models.CharField(max_length=15)),
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL, null=True)),
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL, null=True, on_delete=models.CASCADE)),
],
options={
},
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
......@@ -27,7 +27,7 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='BarSettings',
fields=[
('bar', models.OneToOneField(related_name='settings', primary_key=True, serialize=False, to='bars_core.Bar')),
('bar', models.OneToOneField(related_name='settings', primary_key=True, serialize=False, to='bars_core.Bar', on_delete=models.CASCADE)),
('next_scheduled_appro', models.DateTimeField(null=True)),
('money_warning_threshold', models.FloatField(default=15)),
('transaction_cancel_threshold', models.FloatField(default=48)),
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment