Feature #585
Alternative Title Slug Support
Start date:
03/25/2013
Due date:
% Done:
100%
Description
Add a table that allows alternative title slugs to be used for texts. This allows the title_slugs to be modified without breaking existing links.
Subtasks
History
#1 Updated by Luke Murphey over 11 years ago
- Status changed from New to In Progress
#2 Updated by Luke Murphey over 11 years ago
- File aliases.xlsx added
#3 Updated by Luke Murphey over 11 years ago
I populated the table with existing aliases with the following code:
from reader.models import Work, WorkAlias s = """78 orationes-1 462 speeches-1 509 regum-et-imperatorum-apophthegmata-1 511 apophthegmata-laconica-1 512 instituta-laconica-1 513 lacaenarum-apophthegmata-1 515 mulierum-virtutes-1 517 quaestiones-romanae-1 519 quaestiones-graecae-1 521 parallela-minora-1 523 de-fortuna-romanorum-1 525 de-alexandri-magni-fortuna-aut-virtute-1 527 de-gloria-atheniensium-1 677 histories-1""" items = s.split("\n") for item in items: id, alias = item.split("\t") work = Work.objects.get(id=id) work_alias = WorkAlias(work=work, title_slug=alias) work_alias.save()
#4 Updated by Luke Murphey over 11 years ago
- Status changed from In Progress to Closed