This site is an archive; learn more about 8 years of OpenHatch.

[OH-Dev] [issue645] Refactor our training missions' backend so that they use class-based views

Asheesh Laroia bugs at openhatch.org
Fri Dec 16 22:01:26 UTC 2011


New submission from Asheesh Laroia <asheesh at asheesh.org>:

Right now, the various views in mysite/missions/*/*.py use a combination of a
few programming paradigms.

There is a class called MissionPageState that tracks the progress of a user
through the steps of a particular mission (e.g. the svn mission).

The GET or POST requests for a page call functions which generally look very
close to the same.

I think we can increase clarity and decrease lines of code by turning the
missions' views.py files into classes that use inheritance to move logic into
unified places. 

We can be inspired by the very simple TemplateView provided by Django, and as
used in the Windows informational tutorial at mysite/missions/setup/views.py .

----------
messages: 2828
milestone: 0.11.12
nosy: paulproteus
priority: feature
status: unread
title: Refactor our training missions' backend so that they use class-based views

__________________________________________
Roundup issue tracker <bugs at openhatch.org>
<https://openhatch.org/bugs/issue645>
__________________________________________


More information about the Devel mailing list