How to get the "pure" source of a pagetemplate back ?
Hi, I am editing all my sources on the local file system, and upload them to the Zopeserver, with a heavely extended version of load_site.py. Some care had to be taken if more than one person modifies the online site. But if there were changes, I could just cut and paste the source from the textbox into my local editorwindow. Until pagetemplates came around, here I only get the text with all macros expanded. So my question: how do I get the pure unexpanded text of a pagetemplate from a Zope-server back ? Mit freundlichen Grüßen Joachim Schmitz -------------------------------------------------------------------- AixtraWare Ingenieurbüro für Internetanwendungen Hüsgenstr. 33a, D-52457 Aldenhoven Telefon: +49-2464-8851, FAX: +49-2464-905163 -------------------------------------------------------------------- Key fingerprint = DA10 CC82 62F8 1DBB 39A1 1EDC 725B 3317 A8D7 C3A6 Keyserver: http://www.keyserver.net/en/
On Tue, 14 May 2002, Joachim Schmitz wrote:
Some care had to be taken if more than one person modifies the online site. But if there were changes, I could just cut and paste the source from the textbox into my local editorwindow. Until pagetemplates came around, here I only get the text with all macros expanded. So my question:
how do I get the pure unexpanded text of a pagetemplate from a Zope-server back ?
To add to this question, is there any way (or could a way be hacked together) to allow editing of files on the command line instead of through the web? It'd be nice to check pages out, edit pages in emacs, and check them back in a la CVS. Editing inside the TEXTAREA block hurts. -john
Aloha,
On Tue, 14 May 2002, Joachim Schmitz wrote: ... Until pagetemplates came around, here I only get the text with all macros expanded. So my question: how do I get the pure unexpanded text of a pagetemplate from a Zope-server back ?
If you mean in the management interface...there is a checkbox, 'Expand macros when editing', in the Edit view of a page template (upper right, just below 'Browse HTML Source' link). Uncheck it and the macros won't be expanded. It is also available in the Properties view of a page template (Name == Expand, a boolean) - and in 2.4.1, it seems to work better in Properties. The Edit view one seems to have some bugs with taking effect right away. --- John Adams <jadams@inktomi.com> wrote:
To add to this question, is there any way (or could a way be hacked together) to allow editing of files on the command line instead of through the web?
Not sure what you mean by 'on the command line'...
It'd be nice to check pages out, edit pages in emacs, and check them back in a la CVS.
There's no source control built in, but you can always edit in your favorite editor and upload to zope using the File upload form (and download using the 'View or Download current text' link just above the upload form). I suppose combining this with using a version would be a sort of kludgy source control system... cheers, John S. __________________________________________________ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com
--On Dienstag, Mai 14, 2002 23:26:06 -0700 John Schinnerer <johnschinnerer@yahoo.com> wrote:
Aloha,
On Tue, 14 May 2002, Joachim Schmitz wrote: ... Until pagetemplates came around, here I only get the text with all macros expanded. So my question: how do I get the pure unexpanded text of a pagetemplate from a Zope-server back ?
If you mean in the management interface...there is a checkbox, 'Expand macros when editing', in the Edit view of a page template (upper right, just below 'Browse HTML Source' link). Uncheck it and the macros won't be expanded. It is also available in the Properties view of a page template (Name == Expand, a boolean) - and in 2.4.1, it seems to work better in Properties. The Edit view one seems to have some bugs with taking effect right away.
On my Zope-2.5.1 final it has no effect at all. Macros are alway expanded. Mit freundlichen Grüßen Joachim Schmitz -------------------------------------------------------------------- AixtraWare Ingenieurbüro für Internetanwendungen Hüsgenstr. 33a, D-52457 Aldenhoven Telefon: +49-2464-8851, FAX: +49-2464-905163 -------------------------------------------------------------------- Key fingerprint = DA10 CC82 62F8 1DBB 39A1 1EDC 725B 3317 A8D7 C3A6 Keyserver: http://www.keyserver.net/en/
On Tue, 14 May 2002, John Schinnerer wrote:
--- John Adams <jadams@inktomi.com> wrote:
To add to this question, is there any way (or could a way be hacked together) to allow editing of files on the command line instead of through the web?
Not sure what you mean by 'on the command line'...
Oh, I mean something like: checkoutzopepage /some/location/ontheserver/foo.py > foo.py and then checkinzopepage foo.py /some/location/ontheserver/foo.py
It'd be nice to check pages out, edit pages in emacs, and check them back in a la CVS.
There's no source control built in, but you can always edit in your favorite editor and upload to zope using the File upload form (and download using the 'View or Download current text' link just above the upload form).
Yeah, but it's very frustrating to do that. You have to retype (and relocate) the file everytime.
I suppose combining this with using a version would be a sort of kludgy source control system...
Hmm, well, I thought that Zope had a version control system built in anyhow -- it saves every change, which are available when you look at the page in the editor. -john
We've been using cvs, and a short script as part of the product that refreshes the tal pages from disk. So we cvs checkout the product, and all our tal pages are in the "/ptl" directory in there. We work on the tal in dreamweaver/vim/whatever the person in question prefers, check in the working copies (and we can all run our own Zopes to test locally/run unit tests, where appropriate), then through the management screen hit a "refresh TAL" button we've added to the instances of the product in question. That runs a method that walks through the filesystem deleting whatever it finds in Zope that matches and loading the new content in instead. Works best for product development, as opposed to general site development, although I'm sure you could do something akin to that for general devel, using a custom "reloader" object or something. Means we have the product under cvs where it rightfully belongs, and we can regenerate fsck-ups at a moment's notice. Also makes rolling out copies to new machines a lot easier... KevinL On Wed, 2002-05-15 at 19:18, John Adams wrote:
On Tue, 14 May 2002, John Schinnerer wrote:
--- John Adams <jadams@inktomi.com> wrote:
To add to this question, is there any way (or could a way be hacked together) to allow editing of files on the command line instead of through the web?
Not sure what you mean by 'on the command line'...
Oh, I mean something like:
checkoutzopepage /some/location/ontheserver/foo.py > foo.py
and then
checkinzopepage foo.py /some/location/ontheserver/foo.py
It'd be nice to check pages out, edit pages in emacs, and check them back in a la CVS.
There's no source control built in, but you can always edit in your favorite editor and upload to zope using the File upload form (and download using the 'View or Download current text' link just above the upload form).
Yeah, but it's very frustrating to do that. You have to retype (and relocate) the file everytime.
I suppose combining this with using a version would be a sort of kludgy source control system...
Hmm, well, I thought that Zope had a version control system built in anyhow -- it saves every change, which are available when you look at the page in the editor.
-john
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- Internet techie Obsidian Consulting Group Phone: +613 9653 9364 Fax: +613 9354 2681 http://www.obsidian.com.au/ darius@obsidian.com.au
On Wednesday 15 May 2002 01:22 am, John Adams wrote:
To add to this question, is there any way (or could a way be hacked together) to allow editing of files on the command line instead of through the web? It'd be nice to check pages out, edit pages in emacs, and check them back in a la CVS.
I haven't tested this, but a quick search on <http://www.freshmeat.net/> searching for WebDAV turned up this little gem: <http://www.webdav.org/cadaver/> "cadaver is a command-line WebDAV client for Unix. It supports file upload, download, on-screen display, namespace operations (move/copy), collection creation and deletion, and locking operations." Maybe this can be used along with standard UNIX shell redirects alongside vi or Emacs? -- George M. Ellenburg <george@ellenburg.org> <http://www.ellenburg.org/> 3 Years and counting of being 100% Microsoft-free; and much more productive. Proud user of ASK <http://www.paganini.net/ask/>, the Active Spam Killer! --- Mophobia, n.: Fear of being verbally abused by a Mississippian.
On Wednesday 15 May 2002 08:38 am, George M. Ellenburg wrote:
On Wednesday 15 May 2002 01:22 am, John Adams wrote:
To add to this question, is there any way (or could a way be hacked together) to allow editing of files on the command line instead of through the web? It'd be nice to check pages out, edit pages in emacs, and check them back in a la CVS.
How timely. Maybe my new product could help you out: http://www.zope.org/Members/Caseman/ExternalEditor -Casey
Hi- On Wednesday, May 15, 2002, at 01:22 AM, John Adams wrote:
On Tue, 14 May 2002, Joachim Schmitz wrote:
Some care had to be taken if more than one person modifies the online site. But if there were changes, I could just cut and paste the source from the textbox into my local editorwindow. Until pagetemplates came around, here I only get the text with all macros expanded. So my question:
how do I get the pure unexpanded text of a pagetemplate from a Zope-server back ?
If the page template is at http://localhost/mypage.pt, the source is at http://localhost/mypage.pt/source.html
To add to this question, is there any way (or could a way be hacked together) to allow editing of files on the command line instead of through the web? It'd be nice to check pages out, edit pages in emacs, and check them back in a la CVS.
Search zope.org for this. There are a few tutorials which show how to do this with both Zope's FTP server and with WebDAV. Or if you prefer, use ncftp (my favorite) or plain ftp.
Editing inside the TEXTAREA block hurts.
I agree!
-john
--Quentin
--On Mittwoch, Mai 15, 2002 15:25:44 -0400 Quentin Smith <quentins@comclub.dyndns.org> wrote:
Hi-
On Wednesday, May 15, 2002, at 01:22 AM, John Adams wrote:
On Tue, 14 May 2002, Joachim Schmitz wrote:
Some care had to be taken if more than one person modifies the online site. But if there were changes, I could just cut and paste the source from the textbox into my local editorwindow. Until pagetemplates came around, here I only get the text with all macros expanded. So my question:
how do I get the pure unexpanded text of a pagetemplate from a Zope-server back ?
If the page template is at http://localhost/mypage.pt, the source is at http://localhost/mypage.pt/source.html
yes but with macros expanded, I want the pure unexpanded text of the pagetemplate, unchecking the expand-macros box has no effect, is this a bug ? Mit freundlichen Grüßen Joachim Schmitz -------------------------------------------------------------------- AixtraWare Ingenieurbüro für Internetanwendungen Hüsgenstr. 33a, D-52457 Aldenhoven Telefon: +49-2464-8851, FAX: +49-2464-905163 -------------------------------------------------------------------- Key fingerprint = DA10 CC82 62F8 1DBB 39A1 1EDC 725B 3317 A8D7 C3A6 Keyserver: http://www.keyserver.net/en/
Aloha,
snip...>
...I want the pure unexpanded text of the pagetemplate, unchecking the expand-macros box has no effect, is this a bug ?
If you're trying the one in the Edit view, try the one in the Properties view. John S. __________________________________________________ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com
--On Donnerstag, Mai 16, 2002 00:02:52 -0700 John Schinnerer <johnschinnerer@yahoo.com> wrote:
Aloha,
snip...>
...I want the pure unexpanded text of the pagetemplate, unchecking the expand-macros box has no effect, is this a bug ?
If you're trying the one in the Edit view, try the one in the Properties view.
John S.
I tried that too, no effect. Mit freundlichen Grüßen Joachim Schmitz -------------------------------------------------------------------- AixtraWare Ingenieurbüro für Internetanwendungen Hüsgenstr. 33a, D-52457 Aldenhoven Telefon: +49-2464-8851, FAX: +49-2464-905163 -------------------------------------------------------------------- Key fingerprint = DA10 CC82 62F8 1DBB 39A1 1EDC 725B 3317 A8D7 C3A6 Keyserver: http://www.keyserver.net/en/
Hi, i investigated a little bit further in this: the setting of the expand-property has only effect, when the pagetemplate is created with expand set to 0. Which seams to be the case, when you add a new zpt via management interface. But I created them remotely from Python like: object=object.__class__(opath, username=object.username, password=object.password) call(object.manage_addPageTemplate ,id=root ,file=file ,expand=0 # when this is left out, it stays on forever ) without the expand=0 line, and than it not changeble later. --On Donnerstag, Mai 16, 2002 10:08:37 +0200 Joachim Schmitz <js@aixtraware.de> wrote:
--On Donnerstag, Mai 16, 2002 00:02:52 -0700 John Schinnerer <johnschinnerer@yahoo.com> wrote:
Aloha,
snip...>
...I want the pure unexpanded text of the pagetemplate, unchecking the expand-macros box has no effect, is this a bug ?
If you're trying the one in the Edit view, try the one in the Properties view.
John S.
I tried that too, no effect.
Mit freundlichen Grüßen Joachim Schmitz -------------------------------------------------------------------- AixtraWare Ingenieurbüro für Internetanwendungen Hüsgenstr. 33a, D-52457 Aldenhoven Telefon: +49-2464-8851, FAX: +49-2464-905163 -------------------------------------------------------------------- Key fingerprint = DA10 CC82 62F8 1DBB 39A1 1EDC 725B 3317 A8D7 C3A6 Keyserver: http://www.keyserver.net/en/
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Mit freundlichen Grüßen Joachim Schmitz -------------------------------------------------------------------- AixtraWare Ingenieurbüro für Internetanwendungen Hüsgenstr. 33a, D-52457 Aldenhoven Telefon: +49-2464-8851, FAX: +49-2464-905163 -------------------------------------------------------------------- Key fingerprint = DA10 CC82 62F8 1DBB 39A1 1EDC 725B 3317 A8D7 C3A6 Keyserver: http://www.keyserver.net/en/
participants (7)
-
Casey Duncan -
George M. Ellenburg -
Joachim Schmitz -
John Adams -
John Schinnerer -
Kevin Littlejohn -
Quentin Smith