http://www.mail-archive.com/pylons-discuss@googlegroups.com/msg08827.html
Re: how to rename a pylons app?

Jonathan Vanasco
Wed, 24 Sep 2008 08:20:09 -0700

I've had to do this before...

you'll want to rename the appropriate files / directories , and then
replace all the module name instances in your project

ie: if your project is named ASDFGHJK , then you'll need to rename:
/ASDFGHJK
/ASDFGHJK/asdfhjk
/ASDFGHJK/asdfhjk.egg-info

then do a s/ASDFGHJK/? on the files

there are lots of
import ASDFGHJK
from ASDFGHJK import

if you're using a mac, TextWrangler has a great find/replace function
that works on directories

if you're using subversion for version control, i generaly like to do
it like this:
1- rename files
2- commit
3- find/replace text
4- commit

if you're using git or mercurial, i think you can do the commits in
one step. svn needs them in two though.


http://www.kompozer.net/
KompoZer - Easy web authoring

still the one to use

http://www.google.com/search?hl=en&q=site+wizard&btnG=Google+Search&aq=f&oq=
site wizard - Google Search
http://www.thesitewizard.com/
thesitewizard.com: Website design, promotion, CGI, PHP, JavaScript scripting, and revenue earning.
http://www.thesitewizard.com/archive/findhost.shtml
How to Choose a Web Host (Criteria for Choosing a Web Hosting Company) (thesitewizard.com)
http://www.register.com/
Register Domain Names at Register.com - Business Web Hosting Services and Domain Name Registration Provider
http://www.register.com/register-domain-names.rcmx
Web Domain Registration - Register Domain Names, Search Domains, Web Site Registrations
http://www.register.com/product/hosting.rcmx
Business Web Hosting Provider - Website Hosting Services at Register.com, Domain Web Host
http://www.register.com/build-a-website.rcmx
Do-It-Myself website with Register.com | Create a great looking website for your business
http://www.register.com/register-domain-names.rcmx
Web Domain Registration - Register Domain Names, Search Domains, Web Site Registrations
http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=Uw6&q=open+source+html+layout&btnG=Search
open source html layout - Google Search
http://www.google.com/search?q=web+design+templates&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
web design templates - Google Search
http://www.oswd.org/
Open Source Web Design - Download free web design templates.
http://developer.mozilla.org/En/Gecko_FAQ
Gecko FAQ - MDC
http://en.wikipedia.org/wiki/KHTML
KHTML - Wikipedia, the free encyclopedia
http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=yyR&q=seamonkey+vs+kompozer&btnG=Search
seamonkey vs kompozer - Google Search
http://en.wikipedia.org/wiki/Nvu
Nvu - Wikipedia, the free encyclopedia
http://en.wikipedia.org/wiki/Comparison_of_HTML_editors
Comparison of HTML editors - Wikipedia, the free encyclopedia
http://en.wikipedia.org/wiki/KompoZer
KompoZer - Wikipedia, the free encyclopedia
http://en.wikipedia.org/wiki/Bluefish_(text_editor)
Bluefish (text editor) - Wikipedia, the free encyclopedia
http://en.wikipedia.org/wiki/Amaya_(web_browser)
Amaya (web browser) - Wikipedia, the free encyclopedia
http://en.wikipedia.org/wiki/Quanta_Plus
Quanta Plus - Wikipedia, the free encyclopedia
http://en.wikipedia.org/wiki/SeaMonkey
SeaMonkey - Wikipedia, the free encyclopedia
http://groups.google.com/group/comp.infosystems.www.authoring.site-design/browse_thread/thread/7a36b08d821e9a76/1180e970f3723a35
Kompozer Vs SeaMonkey - comp.infosystems.www.authoring.site-design | Google Groups


seems like the best way to do lossless image (jpeg) rotation in python is to use the commands jpegtrans and jhead, both open source, but command line.
easy enough to wrap in a system call of sorts (subprocess.Popen)

see simple browser gallery for examples.

http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=Q87&q=python+lossless+rotation&btnG=Search
python lossless rotation - Google Search
http://image2docinfo.sourceforge.net/
Image2DocInfo
http://www.sentex.net/~mwandel/jhead/
Exif Jpeg header manipulation tool
http://www.ijg.org/
Independent JPEG Group
http://image2docinfo.sourceforge.net/shot.html
ScreenShots
http://image2docinfo.sourceforge.net/#download
Image2DocInfo
http://www.faqs.org/faqs/jpeg-faq/
JPEG FAQ Index
http://www.google.com/search?q=jpegtran&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
jpegtran - Google Search
http://sylvana.net/jpegcrop/
JPEGclub.org
http://sylvana.net/jpegcrop/jpegtran/
New jpegtran features
http://en.wikipedia.org/wiki/Libjpeg
libjpeg - Wikipedia, the free encyclopedia
http://linux.about.com/library/cmd/blcmdl1_jpegtran.htm
jpegtran - Linux Command - Unix Command
http://www.google.com/search?q=jhead&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
jhead - Google Search
http://www.sentex.net/~mwandel/jhead/
Exif Jpeg header manipulation tool
http://www.sentex.net/~mwandel/jhead/usage.html
http://www.sentex.net/~mwandel/jhead/usage.html
http://pagesperso-orange.fr/pierre.g/xnview/enhome.html
XnView
http://pagesperso-orange.fr/pierre.g/xnview/endownload.html
XnView
http://pagesperso-orange.fr/pierre.g/xnview/enscreenshots.html
XnView


see also dreamhost pylons-deploy.txt

forms are closely related to models

you'll need a way to persist the data.

if it's not tied to a specific directory of content, then it should probably be stored in a database of sorts to allow data lookup.

with pylons that probably means using sqlalchemy

if you didn't enable it in your project to begin with, you'll need to do so now following:
http://wiki.pylonshq.com/display/pylonsdocs/Using+SQLAlchemy+with+Pylons

set up meta.py
set up model

init_model in __init

configure database string in config (development.ini)
sqlalchemy.url = sqlite:///%(here)s/jb-dev.sqlite

environment.py
websetup.py

don't forget!
paster setup-app development.ini

forms are closely related to models

you'll need a way to persist the data.

if it's not tied to a specific directory of content, then it should probably be stored in a database of sorts to allow data lookup.

with pylons that probably means using sqlalchemy

if you didn't enable it in your project to begin with, you'll need to do so now following:
http://wiki.pylonshq.com/display/pylonsdocs/Using+SQLAlchemy+with+Pylons

set up meta.py
set up model

init_model in __init

configure database string in config (development.ini)
sqlalchemy.url = sqlite:///%(here)s/jb-dev.sqlite

environment.py
websetup.py

don't forget!
paster setup-app development.ini


to start working with forms, you will new to add methods to a class... one to show the form, one to handle the form.

you will also need to import the validate code. (formencode)

layouts and other form validation can be stored with other model code (I'm torn if that is more UI or model validation... pylons seems to go with model validation).

Pylons comes with an easy to use `validate` decorator, imported by default in your `lib/base.py`. Using it in your controller is pretty straight-forward:

#this gets the validate decorator.
from pylons.decorators import *

to start working with forms, you will new to methods to a class... one to show the form, one to handle the form.

you will also need to import the validate code. (formencode)

layouts and other form validation can be stored with other model code (I'm torn if that is more UI or model validation... pylons seems to go with model validation).

Pylons comes with an easy to use `validate` decorator, imported by default in your `lib/base.py`. Using it in your controller is pretty straight-forward:

#this gets the validate decorator.
from pylons.decorators import *



once you have a basic pylons instance created, there are a few things that need to be configured for most sites to get started.

This seems beyond the scope of a basic installation document, but nonetheless should be documented.

from root of project:

paster controller name-of-new-controller

start with a main controller:

for simple sites this may be enough. (i.e. sites with only one level deep)
for these sites it seems like over kill to make a separate controller for each page if there is really only an index page for each one.

It may be adequate to stick with a template system (i.e. manual static, sphynx, webby) for a simple site. On the other hand, if you're comfortable with python and needs grow in the future, it is nice to have a framework in place. Pylons doesn't add a lot of bloat to even a simple site. A framework keeps things consistent across projects.

paster controller name-of-new-controller

start with a main controller:


for simple sites this may be enough. (i.e. sites with only one level deep)
for these sites it seems like over kill to make a separate controller for each page if there is really only an index page for each one.

some might argue to just stick with a templating system for a simple site, but just incase needs grow in the future, it is nice to have a framework in place. Pylons doesn't add a lot of bloat to even a simple site... so why not. Also keeps things consistent across projects.

make images and css directories in public:


remove public index.html (otherwise it will be default)


add standard templates

update routes

http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&q=google+app+engine&btnG=Google+Search
google app engine - Google Search
http://code.google.com/appengine/
Google App Engine - Google Code
http://code.google.com/appengine/kb/
Google App Engine FAQs - Google App Engine - Google Code
http://code.google.com/appengine/docs/whatisgoogleappengine.html
What Is Google App Engine? - Google App Engine - Google Code


there seem to be many approaches these days for blocks with rounded corners.

there was one fully CSS version that draws one line rows along the top and bottom of the block with margins to give the rounded effect:

The rest use 2-4 images to get the effect

http://www.google.com/search?hl=en&q=rounded+corners+css&btnG=Google+Search&aq=f&oq=
rounded corners css - Google Search
http://www.cssjuice.com/25-rounded-corners-techniques-with-css/
25 Rounded Corners Techniques with CSS
http://www.spiffycorners.com/index.php?sc=contact&bg=ffffff&fg=001b2c&sz=5px
Spiffy Corners - Purely CSS Rounded Corners



http://www.google.com/search?hl=en&q=turbo+gears&btnG=Google+Search&aq=f&oq=
turbo gears - Google Search
http://turbogears.org/
TurboGears: Front-to-Back Web Development
http://www.google.com/search?q=turbo+gears+pylons&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
turbo gears pylons - Google Search
http://en.wikipedia.org/wiki/TurboGears
TurboGears - Wikipedia, the free encyclopedia
http://planet.turbogears.org/
Planet Turbogears
http://groups.google.com/group/pylons-discuss/browse_thread/thread/5b1edd907db72ac1/
Turbogears now based on Pylons! - pylons-discuss | Google Groups
http://docs.turbogears.org/Contributing
Contributing - TurboGears Documentation
http://docs.turbogears.org/1.0
1.0 - TurboGears Documentation
http://docs.turbogears.org/1.0/GettingStarted/BigPicture
1.0/GettingStarted/BigPicture - TurboGears Documentation


http://www.tessaandcharles.com/main.php
Double Dose
http://www.google.com/search?q=publish+to+word+press+via+atom&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
publish to word press via atom - Google Search
http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla:en-US:official&hs=InZ&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=publish+to+wordpress+via+atom&spell=1
publish to wordpress via atom - Google Search
http://jmettraux.wordpress.com/2007/11/05/posting-to-wordpress-via-ruby-and-atompub/
posting to wordpress via ruby and atompub « processi
http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=s9E&q=python+atom+publish&btnG=Search
python atom publish - Google Search
http://www.imc.org/atom-syntax/mail-archive/msg18662.html
atomixlib: A Python Atom generator
http://swik.net/Atom+python
Atom + python - SWiK
http://blog.ianbicking.org/2007/08/12/atom-publishing-protocol-atompub/
Ian Bicking: a blog :: Atom Publishing Protocol: Atompub
http://www.tbray.org/ape/
Atom Protocol Exerciser
http://svn.pythonpaste.org/Paste/apps/FlatAtomPub/trunk/flatatompub/flatapp.py
http://svn.pythonpaste.org/Paste/apps/FlatAtomPub/trunk/flatatompub/flatapp.py
http://trac.defuze.org/wiki/amplee
amplee - deFuze.org - Trac
http://trac.defuze.org/wiki/amplee/Tutorial-0.6.x
amplee/Tutorial-0.6.x - deFuze.org - Trac
http://pypi.python.org/pypi/Amara/
Python Package Index : Amara 1.2.0.2
http://4suite.org/index.xhtml
4suite.org
http://groups.google.com/group/atom-protocol-python
atom-protocol-python | Google Groups
http://groups.google.com/group/atom-protocol-python/browse_thread/thread/3534f88d29bfca19
Microblogging in Python... some ideas and code - atom-protocol-python | Google Groups
http://www.google.com/search?q=atompub&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
atompub - Google Search
http://www.atompub.org/
Atom
http://bitworking.org/projects/atom/rfc5023.html
The Atom Publishing Protocol
http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&q=pybloxsom+on+dreamhost&btnG=Search
pybloxsom on dreamhost - Google Search
http://sarah.thesharps.us/tags/pyblosxom
The Geekess - Linux, bicycling, open source, gardening, amateur rockets, and other seemingly unrelated hobbies.
http://article.gmane.org/gmane.comp.web.pyblosxom.user/1882
Re: tagging for dummies?
http://pyblosxom.sourceforge.net/
PyBlosxom - main site
http://pyblosxom.sourceforge.net/registry/
PyBlosxom - main site
http://pyblosxom.sourceforge.net/registry/display/graphics/pygallery.html
PyBlosxom - main site
http://pyblosxom.sourceforge.net/registry/meta/folksonomy.html
PyBlosxom - main site
http://www.timfanelli.com/projects/folksonomy_py.txt
http://www.timfanelli.com/projects/folksonomy_py.txt
http://www.advogato.org/person/murrayc/
Advogato: Personal info for murrayc
http://www.munichblogs.com/
Munich Blogs

http://www.google.com/search?hl=en&client=firefox-a&channel=s&rls=org.mozilla%3Aen-US%3Aofficial&q=python+disk+usage&btnG=Search
python disk usage - Google Search
http://64.233.167.104/search?q=cache:7YO8qGf4iuoJ:www.w3.org/2000/10/swap/pim/du/du-svg.py+python+disk+usage&hl=en&ct=clnk&cd=4&gl=us&client=firefox-a
http://64.233.167.104/search?q=cache:7YO8qGf4iuoJ:www.w3.org/2000/10/swap/pim/du/du-svg.py+python+disk+usage&hl=en&ct=clnk&cd=4&gl=us&client=firefox-a
http://www.google.com/search?q=python+md5&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
python md5 - Google Search
http://www.velocityreviews.com/forums/t357410-md5-from-python-different-then-md5-from-command-line.html
Md5 from python different then md5 from command line
file:///charles_b/external/python/docs/lib/module-md5.html
10.3 md5 -- MD5 message digest algorithm
http://effbot.org/librarybook/md5.htm
The md5 module
file:///charles_b/external/python/docs/lib/lib.html
Python Library Reference
file:///charles_b/external/python/docs/lib/module-os.path.html
11.1 os.path -- Common pathname manipulations
file:///charles_b/external/python/docs/lib/module-stat.html
11.3 stat -- Interpreting stat() results
file:///charles_b/external/python/docs/lib/module-os.html
14.1 os -- Miscellaneous operating system interfaces
file:///charles_b/external/python/docs/lib/os-file-dir.html
14.1.4 Files and Directories

http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&q=python+element+tree&btnG=Google+Search
python element tree - Google Search
http://effbot.org/zone/element-index.htm
ElementTreeOverview
http://effbot.org/zone/element.htm#searching-for-subelements
Elements and ElementTrees
http://effbot.org/zone/element-xpath.htm
XPath Support inElementTree
http://www.w3.org/TR/xpath
XML Path Language (XPath)
http://www.google.com/search?q=python+hierarchical&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
python hierarchical - Google Search
http://www.pytables.org/moin
PyTables - Hierarchical Datasets in Python
http://www.ibm.com/developerworks/library/x-matters28/
XML Matters: Process XML in Python with ElementTree
http://effbot.org/zone/element-iterparse.htm
The ElementTree iterparseFunction
http://effbot.org/zone/celementtree.htm
The cElementTreeModule
http://www.google.com/search?q=python+iterator&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
python iterator - Google Search
http://docs.python.org/lib/typeiter.html
3.5 Iterator Types
http://developer.apple.com/documentation/Cocoa/Conceptual/PropertyLists/Articles/XMLPListsConcept.html
Property List Programming Guide for Cocoa: XML Property Lists
http://www.w3.org/TR/REC-xml-names/
Namespaces in XML 1.0 (Second Edition)
http://www.jclark.com/xml/xmlns.htm
XML Namespaces
http://www.webfaction.com/services/hosting
Shared hosting plans - WebFaction
http://www.rexx.com/~dkuhlman/python_101/python_101.html
Python 101 -- Introduction to Python