Exemplo n.º 1
0
def choose_lecture_materials_filename(instance, original):
    extension = os.path.splitext(original)[1]
    lecture_slug = slugify(unicode(instance))[:74]
    return "%s/%s%s" % (instance.event.date.isoformat(),
                        lecture_slug, extension)
Exemplo n.º 2
0
def add_team_slug(apps, schema_editor):
    Team = apps.get_model('events', 'Team')
    for team in Team.objects.all():
        team.slug = slugify(team.name)
        team.save()
Exemplo n.º 3
0
def choose_invitation_filename(instance, original):
    return "%s/invitation-%s.pdf" % (instance.date.isoformat(),
                                     slugify(unicode(instance))[:74])