Skip to content
Snippets Groups Projects
Select Git revision
  • c06394759bf1d29543af24e8c012d2c34151b52f
  • main default protected
  • fix/2023-10_gitlab-ci
  • renovate/configure
  • v1.8.0
  • v1.7.2
  • v1.7.1
  • v1.5.0
  • v1.4.1
  • v1.4.0
  • v1.3.0
  • v1.2.3
  • v1.2.2
  • v1.2.1
  • v1.2.0
  • v1.1.0
  • v1.0.0
17 results

apps.py

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    0010_populate_event_slug_field.py 532 B
    # Generated by Django 2.2.6 on 2019-10-16 18:41
    
    from django.db import migrations
    
    
    def gen_slug(apps, schema_editor):
        event = apps.get_model('AKModel', 'Event')
        for row in event.objects.all():
            row.slug = ''.join(filter(str.isalnum, row.name.lower()))
            row.save(update_fields=['slug'])
    
    
    class Migration(migrations.Migration):
        dependencies = [
            ('AKModel', '0009_add_event_slug_field'),
        ]
    
        operations = [
            migrations.RunPython(gen_slug, reverse_code=migrations.RunPython.noop)
        ]