Commit 31259fad authored by Thomas Mignot's avatar Thomas Mignot

Fixing #3

parent 764d3b48
from django.apps import AppConfig
from django.db import OperationalError, ProgrammingError
class RyzomConfig(AppConfig):
name = 'ryzom'
def ready(self):
import ryzom.signals
import ryzom.signals # noqa
from ryzom.pubsub import to_publish
Clients = self.get_model('Clients')
Clients.objects.all().delete()
for publication in to_publish:
publication.publish_all()
try:
Clients = self.get_model('Clients')
Clients.objects.all().delete()
for publication in to_publish:
publication.publish_all()
except (OperationalError, ProgrammingError):
pass
# Generated by Django 2.1.7 on 2019-03-07 15:42
# Generated by Django 2.1.7 on 2019-03-11 16:35
from django.conf import settings
import django.contrib.postgres.fields
......@@ -28,7 +28,7 @@ class Migration(migrations.Migration):
name='Publications',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('name', models.CharField(max_length=255, unique=True)),
('model_module', models.CharField(max_length=255)),
('model_class', models.CharField(max_length=255)),
('template_module', models.CharField(max_length=255)),
......
# Generated by Django 2.1.7 on 2019-03-08 14:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ryzom', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='publications',
name='name',
field=models.CharField(max_length=255, unique=True),
),
]
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