[Pynta-source-updates] SF.net SVN: pynta: [6] trunk
Status: Planning
Brought to you by:
sergematveenko
From: <ser...@us...> - 2007-12-16 00:32:07
|
Revision: 6 http://pynta.svn.sourceforge.net/pynta/?rev=6&view=rev Author: sergematveenko Date: 2007-12-15 16:32:11 -0800 (Sat, 15 Dec 2007) Log Message: ----------- incode representation of the Flow (http://pynta.wiki.sourceforge.net/Flow) Modified Paths: -------------- trunk/urls.py Added Paths: ----------- trunk/www/ trunk/www/__init__.py trunk/www/models.py trunk/www/urls.py trunk/www/views.py Modified: trunk/urls.py =================================================================== --- trunk/urls.py 2007-11-21 02:20:12 UTC (rev 5) +++ trunk/urls.py 2007-12-16 00:32:11 UTC (rev 6) @@ -24,9 +24,6 @@ from django.conf.urls.defaults import * urlpatterns = patterns('', - # Example: - # (r'^pynta/', include('pynta.foo.urls')), - - # Uncomment this for admin: -# (r'^admin/', include('django.contrib.admin.urls')), -) + (r'^(.*)$', include('pynta.www.urls')), + (r'^admin/', include('django.contrib.admin.urls')), + ) Added: trunk/www/__init__.py =================================================================== Property changes on: trunk/www/__init__.py ___________________________________________________________________ Name: svn:keywords + Date Revision Author Added: trunk/www/models.py =================================================================== --- trunk/www/models.py (rev 0) +++ trunk/www/models.py 2007-12-16 00:32:11 UTC (rev 6) @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. Property changes on: trunk/www/models.py ___________________________________________________________________ Name: svn:keywords + Date Revision Author Added: trunk/www/urls.py =================================================================== --- trunk/www/urls.py (rev 0) +++ trunk/www/urls.py 2007-12-16 00:32:11 UTC (rev 6) @@ -0,0 +1,28 @@ +# -*- coding: utf8 -*- +""" +This file is part of Pynta - Web Content Management System. +Copyright (C) 2007 Serge "lig" Matveenko. + +Pynta is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Pynta is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Pynta. If not, see <http://www.gnu.org/licenses/>. + +$LastChangedDate$ +$LastChangedRevision$ +$LastChangedBy$ +""" + +from django.conf.urls.defaults import * + +urlpatterns = patterns('pynta.www.views', + (r'^((?P<treenode>\w+)/)?((?P<subdatanode>\w+)/)?((?P<args>.+)/)?$', 'flow'), + ) Property changes on: trunk/www/urls.py ___________________________________________________________________ Name: svn:keywords + Date Revision Author Added: trunk/www/views.py =================================================================== --- trunk/www/views.py (rev 0) +++ trunk/www/views.py 2007-12-16 00:32:11 UTC (rev 6) @@ -0,0 +1,41 @@ +# -*- coding: utf8 -*- +""" +This file is part of Pynta - Web Content Management System. +Copyright (C) 2007 Serge "lig" Matveenko. + +Pynta is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Pynta is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Pynta. If not, see <http://www.gnu.org/licenses/>. + +$LastChangedDate$ +$LastChangedRevision$ +$LastChangedBy$ +""" + +def flow(request, treenode, subdatanode=None, args=None): + from django.shortcuts import render_to_response + + treenode = resolveTreeNode(treenode) + + view = treenode.getView() + + datanode = resolveDataNode(treenode, subdatanode) + + viewtype = view.getType() + widgets = view.getWidgets() + + template = datanode.getTemplate(viewtype) + + for widget in widgets: + widgetsdata[widget.name] = widget.getData() + + return render_to_response(template.path, locals()) Property changes on: trunk/www/views.py ___________________________________________________________________ Name: svn:keywords + Date Revision Author This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |