Hello,
I have an existing python based web application and wanted to know if Wt can be
used to build a similar site for a different market, but similarly structured?
I have some questions as to how Wt handles certain requirements.
1) Storage of data - Currently my 'database' is the actual file system and I
store everything as XML files, for example:
database/
|-- companies
| |-- abakuc
| | |-- 24-rue-de-la-madeleine
| | | |-- log_enquiry.csv
| | | |-- log_enquiry.csv.metadata
| | | |-- products
| | | `-- products.metadata
| | |-- 24-rue-de-la-madeleine.metadata
| |-- abakuc.metadata
|-- companies.metadata
|-- countries
| |-- afghanistan
| |-- afghanistan.metadata
|-- countries.metadata
|-- users
| |-- 0
| |-- 0.metadata
-- users.metadata
Here is an example of a .metadata file for a company entry, i.e.
abakuc.metadata:
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns:abakuc="http://xml.abakuc.com/namespaces/abakuc"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<abakuc:branch_manager>0</abakuc:branch_manager>
<abakuc:type>other</abakuc:type>
<owner>0</owner>
<abakuc:topic>technology</abakuc:topic>
<dc:description xml:lang="en"></dc:description>
<abakuc:website_is_open>1</abakuc:website_is_open>
<format>company</format>
<dc:title xml:lang="en">Abakuc Limited</dc:title>
<version>20040625</version>
<abakuc:website>http://abakuc.com</abakuc:website>
</metadata>
2) Also, now the application allows each user of the company to be able to
fully manage their 'directory' listing and also have their own front end URL
with their own unique 'skin'.
This is done using Apache ReWrite rules, for example:
I have three sites:
1) A directory site with all companies and users:
http://uk.expert.travel
<VirtualHost *:80>
ServerName uk.expert.travel
RewriteEngine On
RewriteRule ^/(.*) http://localhost:8080/expert/$1 [P]
RequestHeader set X-Base-Path expert/
RewriteLogLevel 9
RewriteLog logs/uk_expert_rewrite.log
ErrorLog
logs/uk_expert_error.log
</VirtualHost>
2) Training site - allowing each User to be able to provide training to other
members.
http://uk.tp1.expert.travel
<VirtualHost *:80>
ServerName uk.tp1.expert.travel
RewriteEngine On
RewriteRule ^/(.*) http://localhost:19080/training/tp1/$1 [P]
RequestHeader set X-Base-Path training/tp1
RewriteLogLevel 9
RewriteLog logs/abakuc_expert_rewrite.log
ErrorLog
logs/abakuc_expert_error.log
</VirtualHost>
3) A Company view - so each directory entry is able to have their own unique
URL with their own skin
http://abakuc.expert.travel
<VirtualHost *:80>
ServerName abakuc.expert_travel
RewriteEngine On
RewriteRule ^/(.*) http://localhost:19080/companies/abakuc/$1 [P]
RequestHeader set X-Base-Path companies/abakuc
RewriteLogLevel 9
RewriteLog logs/abakuc_expert_rewrite.log
ErrorLog
logs/abakuc_expert_error.log
</VirtualHost>
There is also a localized versions of the Directory sites which will list only
French companies, for example:
http://fr.expert.travel
<VirtualHost *:80>
ServerName fr.expert_travel
RewriteEngine On
RewriteRule ^/(.*) http://localhost:8080/expert/$1 [P]
RequestHeader set X-Base-Path expert/
RewriteLogLevel 9
RewriteLog logs/fr_expert_rewrite.log
ErrorLog
logs/fr_expert_error.log
</VirtualHost>
Here the Apache rewrite rule is the same as the http://uk.expert.travel - the
application knows how to display the skin.
I like to use Wt, as there is a reporting module which allows the Manager to
analyze who's registered and how they are performing on the specific training
programme - here is a rough example, which does not work
http://uk.tp1.expert.travel/;show_users
But I would like to have an overview with nice charts, pie-charts etc... built
depending on what the Manager selects.
Any thought and feedback is much appreciated, and sorry for the looong post.
Cheers
Norman
__________________________________________________________
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest