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

the new internal pages structure...

 
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: Tue 26 Feb, 2008 17:06    Post subject: the new internal pages structure... Reply with quote

One of most important requests is the restructuring of the internal pages. Two points:
-The data should not stored into the database.
-The additional Stylesheet/JavaScript content should not included directly into the html page. The Server should handle these files, as normal static file requests (Include with <link href=...> and <script src=...>)

I started implementing this. There is more changes necessary than I thought.

I moved any internal page files into the directory ./media/PyLucid/internal_page/ (In a subdirectory named as the plugin name).
If a user will customize a internal page, he must made a copy of the html,css and js files into ./media/PyLucid/customized_internal_page/ (Also in a subdir)

I need to tidy up some path settings. So this changes are bigger than small updates.

I think i can commit the changes tomorrow...
_________________

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



Joined: 09 Jan 2008
Posts: 47
Location: Kuopio, Finland

PostPosted: Tue 26 Feb, 2008 19:36    Post subject: Reply with quote

Great!

But "customized_internal_page" is a quite horrible name for a directory, could it be that default templates are under ./media/PyLucid/internal_pages and customized under./media/internal_pages?
Back to top
View user's profile Send private message
jens
Administrator


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

PostPosted: Tue 26 Feb, 2008 20:20    Post subject: Reply with quote

Yes, the name is very long. But i think the customized files should be stored in ./media/PyLucid/ together with the rest of PyLucid related media files. Do you think that is not so important?
_________________

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



Joined: 09 Jan 2008
Posts: 47
Location: Kuopio, Finland

PostPosted: Wed 27 Feb, 2008 09:47    Post subject: Reply with quote

Well my logic was that under ./media/PyLucid/ would be the files which are shipped with PyLucid and any customized files would be "user's own" outside PyLucid-directory.

But maybe it is clearer if all PyLucid related file are under ./media/PyLucid. One solution could be that all customized files are under ./media/PyLucid/local/ or ./media/PyLucid/custom/. It may seems as unnecessary step folder, but IMHO it is clearer that way.
Back to top
View user's profile Send private message
jens
Administrator


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

PostPosted: Wed 27 Feb, 2008 17:30    Post subject: Reply with quote

First step commited: http://trac.pylucid.net/changeset/1449

More info here: http://trac.pylucid.net/ticket/132#comment:1

I did not test the changes thoroughly. Probably there still exists some bugs.
_________________

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 27 Feb, 2008 19:37    Post subject: Reply with quote

btw. Now there is no need to put "meta information" about the internal pages into the plugin manager config anymore.

But if we remove all internal page info from the config files we lost all meta information. But that's not bad, I think.

EDIT: Next step is done: http://trac.pylucid.net/ticket/132#comment:2
Now, all big things about these changes are done. Very nice.
_________________

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 27 Feb, 2008 21:52    Post subject: Reply with quote

Ha! I have a great new Idea related to this. I have implement it quick, see: http://trac.pylucid.net/changeset/1452

Why not save the global Stylesheet into the media dir, too? So the webserver can handle this file, too.

There exist a fall back, if PyLucid can't save the file in the filesystem (Run as CGI with user 'nobody'). In this case, everything remains the same: PyLucid handle the fake-file reuqest via _command -> two request for one page...
_________________

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: Mon 03 Mar, 2008 11:13    Post subject: Reply with quote

I add a unitest for the new global Stylesheet handling: http://trac.pylucid.net/changeset/1456

I would like to test the performance between the old and the new handlings, with my old simple_web_bench.py. I am strained whether the difference is measurable.

EDIT: I added a unitest for the new internal page API: http://trac.pylucid.net/changeset/1460
And i commit some bugfixes...
_________________

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 12 Mar, 2008 11:09    Post subject: Reply with quote

I create a docu page, here: http://pylucid.org/_goto/142/internal-pages/
_________________

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