Ticket #87 (assigned defect)

Opened 11 months ago

Last modified 2 months ago

unittest for PyLucidCommonMiddleware

Reported by: JensDiemer Assigned to: JensDiemer (accepted)
Priority: minor Milestone: v0.8.5
Component: system Version: 0.8
Keywords: install, syncdb, middleware Cc:

Description

For the first time installation the two django middlewares "SessionMiddleware?" and "AuthenticationMiddleware?" must be deactivated in the settings.py (per default in the settings_example.py). Because the SessionMiddleware? access on tables how not exists by the time.

After a syncdb the session table exists and the middleware can be activated.

We should be find a better way to handle this.

To this related: We should be find a better error handling if the user request a cms page and PyLucid is not installed.

Change History

25.06.2007 08:11:16 changed by JensDiemer

See also ticket:84

20.02.2008 10:03:32 changed by JensDiemer

  • status changed from new to assigned.

One idea:

Split the settings.py into something like this:

  • shared settings (e.g. database accounts)
  • _install section settings (without the two django middlewares)
  • normal settings (with the two django middlewares)

Use different Handlers. One for the install section (with the install section settings) and one for the normal view...

25.03.2008 14:13:50 changed by JensDiemer

  • type changed from enhancement to defect.
  • summary changed from _install section and deactivate django middlewares... to unittest for PyLucidCommonMiddleware.

Fixed this in changeset:1505 with the new PyLucidCommonMiddleware.

But the unittest failed for this: /pylucid/browser/trunk/pylucid/tests/install_section.py see also: http://pylucid.org/phpBB2/viewtopic.php?p=1138#1138