What’s a quick’n easy way to add edit function to static HTML? I could save HTML with a textproperty and an /admin area to edit the entity with the variable that contains the HTML but is this a good solution or can you recommend a better solution?
I’m considering using the tool appengine_admin and 2 model: Content and AdminContent so that a change the static HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0059)http://www.teknator.se/eddaconsult/management_services.html -->
<html><head>
<meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
<meta content="Microsoft FrontPage 4.0" name="GENERATOR"></head>
<body bgcolor="#ffffff" text="#000000">
<center>
<p>
<table border="0" width="600">
<tbody>
<tr>
<td><font color="#666666" size="+2" face="Verdana, Arial, Helvetica, sans-serif"><b>Management Services</b></font>
<p><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><b>Management-for-hire</b>...
To an editable page:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0059)http://www.teknator.se/eddaconsult/management_services.html -->
<html><head>
<meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
<meta content="Microsoft FrontPage 4.0" name="GENERATOR"></head>
{{body}}
Is this a solution you would support or could you make me some contructive criticism that I might be doing this wrong since I might not be doing it right if a save HTML in a textproperty?
I was thinking 2 simple models like these
class AdminContent(appengine_admin.ModelAdmin):
model = Content
listFields = (
'body'
)
editFields = (
'body'
)
class Content(Model):
body = db.TextProperty(verbose_name='text')
Then every page can have an ID and dynamic content and I can finish this case real quick but is the solution too “dirty” since the variable will mix markup and actual content and I should try to make a real HTML editor instead?
Thank you for any suggestions
It sounds like you want a CMS. Rather than reinventing the wheel, you should probably use an existing one.