Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 16th, 2004, 08:32 AM
isteel isteel is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 1 isteel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Zope - Editable Homepage

I'm starting out with Zope.

As a learning excercise I would like to setup a homepage with 3 paragraphs on it. Each paragraph should be editable by an 'editor' user role. This would allow the editor to change the text on the homepage, but without having access to the 'manage' Zope interface, and thereby being unable to alter the structure of the page.

I've created a page template called 'index_html' and added some attributes via the manage interface to it. Then I created another page template called 'edit_homepage' which is basically a form. The idea is the form will show the current values of the 3 attributes in textarea's for the editor to change.

I would then like to press the submit button and have the attributes updated - but I've no idea how to do this at all.

The form doesn't work and produces an error to the effect that it can't find the para1...para3 attributes. I've tried here/para1...template/para1....index_html/para1 but always the same type of error.

Am I on the right track, or have I made a fatal flaw with my understanding of Zope?

My thinking was that the url for the editor to access the attributes via would be URL

I'm wondering if I should create a zClass called 'homepage' with the 3 attributes in it, and then refer to this in the template form? But then how would I go about updating it in the zodb?

Thanks,

Ian.

Reply With Quote
  #2  
Old June 16th, 2004, 09:35 AM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,536 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 18 h 3 m 4 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
The one thing that jumps to mind is you didn't mentioned a database/storage of any type or where the data for the home page is being stored and loaded from.

Obviousy you will want to edit or add to this source using the form, which will then be displayed on the page. This is a fundimental consept of data driven design .

So where is the page loading its data from?

In any case all you have to do - if i've understood you right - is work out how to access this source and change its values. Then it should work fine.

Good job,

Mark.
__________________
programming language development: www.netytan.com Hula


Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Zope - Editable Homepage


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT