FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Proof of concept: Low level preferences editor...

 
Post new topic   Reply to topic    PyLucid - CMS - Forum Forum Index -> system
View previous topic :: View next topic  
Author Message
jens
Administrator


Joined: 12 Oct 2005
Posts: 972
Location: duisburg, germany

PostPosted: Mon 28 Apr, 2008 16:59    Post subject: Proof of concept: Low level preferences editor... Reply with quote

I add proof of concept: "Low level preferences editor" in changeset:1539

http://trac.pylucid.net/changeset/1539

see also http://trac.pylucid.net/ticket/126

Any comments?

EDIT: I started a wiki page: http://trac.pylucid.net/wiki/PreferencesThoughts
_________________

http://www.jensdiemer.de | http://www.htfx.de | http://www.python-forum.de
Back to top
View user's profile Send private message
jens
Administrator


Joined: 12 Oct 2005
Posts: 972
Location: duisburg, germany

PostPosted: Wed 30 Apr, 2008 14:41    Post subject: Reply with quote

Hups!

I refactory the Preferences contept completly with: http://trac.pylucid.net/changeset/1544

Now a plugin can create own preferences with a newforms class.
The data would not saved as a pickle string -> It saved as a pprint.pformat string. So the admin can edit the data with the django admin panel.

The preferences editor used the newforms klass to build a normal html form for the user...

The plugin hase access to the preferences via the dict: self.preferences

Nice? Yes!
_________________

http://www.jensdiemer.de | http://www.htfx.de | http://www.python-forum.de
Back to top
View user's profile Send private message
jens
Administrator


Joined: 12 Oct 2005
Posts: 972
Location: duisburg, germany

PostPosted: Thu 01 May, 2008 13:25    Post subject: Reply with quote

annother update:
Quote:
put the plugin preferences into the plugin model.
TODO: update detect_page and set system_settings at install.

http://trac.pylucid.net/changeset/1548
_________________

http://www.jensdiemer.de | http://www.htfx.de | http://www.python-forum.de
Back to top
View user's profile Send private message
jens
Administrator


Joined: 12 Oct 2005
Posts: 972
Location: duisburg, germany

PostPosted: Fri 02 May, 2008 17:53    Post subject: Reply with quote

Next update:
Quote:
With changeset:1551 the new preferences works good!

How it works, checkout the plugins:

* http://trac.pylucid.net/browser/trunk/pylucid/PyLucid/plugins_internal/find_and_replace/
* http://trac.pylucid.net/browser/trunk/pylucid/PyLucid/plugins_internal/search/
* http://trac.pylucid.net/browser/trunk/pylucid/PyLucid/plugins_internal/system_settings/

TODO:

* add and update unittest

_________________

http://www.jensdiemer.de | http://www.htfx.de | http://www.python-forum.de
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PyLucid - CMS - Forum Forum Index -> system All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

<< back to PyLucid CMS Homepage



Powered by phpBB © 2001, 2005 phpBB Group