Re: How to build a website with multiply subdomains?

76 views
Skip to first unread message

Bruce Wade

unread,
Sep 10, 2012, 2:39:23 PM9/10/12
to pylons-...@googlegroups.com
Point each subdomain to the same folder or a soft link of the folder should work. That way there is only one copy of the code.

On Mon, Sep 10, 2012 at 2:23 AM, Lingfeng Xiong <xiongl...@gmail.com> wrote:
hi all,
I'm working on a project which consist several subdomains like:

www.example.com    main website
passport.example.com     user center
admin.example.com      for admin purpose

These three websites need to share the same models and templates. I just created three pyramid projects and copy all models and templates to each one's folders. that's stupid. Is there any better practices for this?
Thanks in advanced.

--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/VYL4Ix6rxY8J.
To post to this group, send email to pylons-...@googlegroups.com.
To unsubscribe from this group, send email to pylons-discus...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.



--
--
Regards,
Bruce Wade
http://ca.linkedin.com/in/brucelwade
http://www.wadecybertech.com

Christian Benke

unread,
Sep 14, 2012, 6:56:13 AM9/14/12
to pylons-...@googlegroups.com
These three websites need to share the same models and templates. I just created three pyramid projects and copy all models and templates to each one's folders. that's stupid. Is there any better practices for this?

Arndt Droullier

unread,
Sep 14, 2012, 7:16:37 AM9/14/12
to pylons-...@googlegroups.com


2012/9/14 Christian Benke <benko...@gmail.com>

These three websites need to share the same models and templates. I just created three pyramid projects and copy all models and templates to each one's folders. that's stupid. Is there any better practices for this?

A pyramid application is just a python package. You can run any number of wsgi applications from the same package/directory. 
All you have to do is to create three separate paste ini files and use them as pserve-parameter. 

--
DV Electric / Arndt Droullier / www.dvelectric.de

Reply all
Reply to author
Forward
0 new messages