Ticket #87 (closed defect: fixed)

Opened 16 months ago

Last modified 4 months ago

unittest for PyLucidCommonMiddleware

Reported by: JensDiemer Owned by: JensDiemer
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

  Changed 16 months ago by JensDiemer

See also ticket:84

  Changed 8 months ago 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...

follow-up: ↓ 4   Changed 7 months ago 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

in reply to: ↑ 3   Changed 4 months ago by JensDiemer

  • status changed from assigned to closed
  • resolution set to fixed

Replying to JensDiemer:

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

fixed in changeset:1641 see also: http://www.pylucid.org/phpBB2/viewtopic.php?p=1231#1231

Note: See TracTickets for help on using tickets.