Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Link to timetable fixed #142

Closed
wants to merge 1 commit into from
Closed

Conversation

schroedingersZombie
Copy link
Contributor

See #141
This is not the cleanest solution, this would need mor changes on existing models. But it fixes the mentioned bug and it is important that pyophase can be used for the SommerOphase as soon as possible.

Timetables must now be assigned to a OphaseCategory.
The timetable views were moved to details/.
Copy link
Member

@exploide exploide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just had a quick look and it seems to be fine so far. But I was not that deeply involved when schedules were introduced, so there might be some issues spotted by the others.

The only thing I noticed: You implemented a redirect for the legacy schedule pages and I'm not sure if this is really necessary. Were these links distributed somewhere? Otherwise it might be clean to avoid legacy code chunks. But head of Ophase should decide this for now.

@@ -152,6 +152,8 @@ class Meta:
name = models.CharField(max_length=100, verbose_name=_('Name'))
description_template = models.CharField(max_length=50, verbose_name=_('Beschreibung in Template'))
lang = models.CharField(max_length=5, verbose_name=_('Sprachcode'), default="de")
details_template = models.CharField(max_length=50, verbose_name=_('Template für Stundenplan View'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could replace these two fields with a slug field containing an url name which could also be used as a template name. There should also be a method getSlug(), which uses the name of the categorie if the slug field is empty. This avoids actions requiered by the user when upgrading.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The slug would then be used to lookup the corresponding category in the website model (enforce unique).

Copy link
Member

@bhaettasch bhaettasch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would introduce manual interactions as well as additional fields that are obsolete as soon as #143 is done. Please consider implementing it directly.

@bhaettasch bhaettasch removed the request for review from jlauinger February 15, 2017 17:39
@bhaettasch
Copy link
Member

All relevant functionality was introduced with #144 -- thus this pull request will be closed without being merged.

@bhaettasch bhaettasch closed this Feb 15, 2017
@jlauinger jlauinger deleted the fix_timetable_link branch April 1, 2017 21:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants