User Tools

Site Tools


devel:blueprints:refactor-mod-python-to-django

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
devel:blueprints:refactor-mod-python-to-django [2011/03/09 09:10] – [Suggested refactoring steps] mortendevel:blueprints:refactor-mod-python-to-django [2012/10/03 08:29] (current) – old revision restored morten
Line 26: Line 26:
   * Deconstruct the URI dispatcher into a Django urlconfig.   * Deconstruct the URI dispatcher into a Django urlconfig.
   * Refactor each of the newly created view functions:   * Refactor each of the newly created view functions:
-    * Usage of mod_python's ''FieldStorage'' class to extract GET/POST parameters must be refactored to use the GET, POST or REQUEST attributes of the incoming Django request structure.+    * Usage of mod_python's ''FieldStorage'' class, or NAV's ''nav.web.URI.URI'' class, to extract GET/POST parameters must be refactored to use the GET, POST or REQUEST attributes of the incoming Django request structure.
     * Create a ''HttpResponse'' object, feeding it the output of the template's ''respond()'' method, and return this response object instead of an ''apache.OK''.     * Create a ''HttpResponse'' object, feeding it the output of the template's ''respond()'' method, and return this response object instead of an ''apache.OK''.
  
Line 49: Line 49:
  
 Examine these changesets: Examine these changesets:
-  * [[http://metanav.uninett.no/hg/series/3.8.x/rev/61a95ac14564|Refactoring the Netmap backend handler]] +  * [[http://nav.uninett.no/hg/default/rev/61a95ac14564|Refactoring the Netmap backend handler]] 
-  * [[http://metanav.uninett.no/hg/series/3.8.x/rev/1409829b73bc|Refactoring the sortedStats handler]]+  * [[http://nav.uninett.no/hg/default/rev/1409829b73bc|Refactoring the sortedStats handler]]
  
 :!: It's probably better to portion out your refactoring in multiple changesets which make your changes easier to follow. That's one of the things DVCS'es are for. :!: It's probably better to portion out your refactoring in multiple changesets which make your changes easier to follow. That's one of the things DVCS'es are for.
  
devel/blueprints/refactor-mod-python-to-django.1299661804.txt.gz · Last modified: by morten

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki