Commit 867e0dc0 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

script to transition between slug formats

parent 56a6e4eb
# python manage.py shell < accounts/major_slug_update.py
# this script updates slugs from a previous release of django from random strings
# to a slugified version of the object's name, e.g. the name of the major
# standard library imports
from __future__ import absolute_import, print_function, unicode_literals
from accounts.models import Major
majors = Major.objects.all()
for major in majors:
print(major.name)
print(major.slug)
major.save()
print(major.slug)
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