Development environment set-up

13 views
Skip to first unread message

Paul

unread,
Jul 9, 2010, 8:16:01 AM7/9/10
to Hyde
Can anyone please offer a good description of how the SITE_ROOT and
SITE_WWW_URL values are used by Hyde?

I'm developing a site on my development box using Hyde and wish to
deploy the app (during development and testing) within my Apache user
directory, ~paul/public_html/hyde_app/.

I've tried a variety of values in my settings.py. Results have
included incorrect values in URL media references or an incorrect
deploy location. The best I've managed so far is to use the following
values:

DEPLOY_DIR = "/home/paul/public_html/hyde_app/
SITE_ROOT = "/~paul/hyde_app/"
SITE_WWW_URL = "http://~localhost/~paul/hyde_app/"

This generates the site under /home/paul/public_html/hyde_app/~paul/
hyde_app/, which isn't what I intend, but if I move the contents of
that directory down to /home/paul/public_html/hyde_app/ the site
works!

I suspect I'm misunderstanding the purpose and intended deployment
behaviour associated with the SITE_ROOT and SITE_WWW_URL. A good
description of these would be very much appreciated.

Or am I trying to use Hyde in a way that was never intended?

Thanks,

Paul.

Valentin Jacquemin

unread,
Jul 9, 2010, 9:09:31 AM7/9/10
to hyde...@googlegroups.com
Hi Paul,

Have you looked at [1]?
This wiki page seems relatively well explaining these settings.

SITE_ROOT: The relative url of the site. Default: /. Example: If your
site will be available at http://site.name/stuff/more, you should set
this value to /stuff/more.
SITE_WWW_URL: The absolute url for the site. Default: http://www.yoursite.com.
DEPLOY_DIR: Default folder where the generated site is copied to. This
setting can be overridden with the -d option. Default_:
@siteroot/deploy@

[1]: http://wiki.github.com/lakshmivyas/hyde/settings

HTH,

--
Valentin Jacquemin


On Fri, Jul 9, 2010 at 2:16 PM, Paul <paul....@gmail.com> wrote:
>
> /home/paul/public_html/hyde_app/~paul/

Paul

unread,
Jul 9, 2010, 11:51:51 AM7/9/10
to Hyde
Thank you for the info and reference, Vanentin.

Part of my confusion was linked to Hyde generating a directory
structure that mirrors SITE_WWW_URL. This seems to assume that the
site URL will mirror the physical, relative path from the deploy
directory - which is not the case when using Apache's mod_userdir. Is
there a way around this?

Thanks,

Paul.

On Jul 9, 2:09 pm, Valentin Jacquemin <jacquem...@gmail.com> wrote:
> Hi Paul,
>
> Have you looked at [1]?
> This wiki page seems relatively well explaining these settings.
>
> SITE_ROOT: The relative url of the site. Default: /. Example: If your
> site will be available athttp://site.name/stuff/more, you should set
> this value to /stuff/more.
> SITE_WWW_URL: The absolute url for the site. Default:http://www.yoursite.com.
> DEPLOY_DIR: Default folder where the generated site is copied to. This
> setting can be overridden with the -d option. Default_:
> @siteroot/deploy@
>
> [1]:http://wiki.github.com/lakshmivyas/hyde/settings
>
> HTH,
>
> --
> Valentin Jacquemin
>
>
>
> On Fri, Jul 9, 2010 at 2:16 PM, Paul <paul.pep...@gmail.com> wrote:
>
> > /home/paul/public_html/hyde_app/~paul/

Josh Rosen

unread,
Jul 9, 2010, 2:44:10 PM7/9/10
to Hyde
I was able to reproduce your issue. The creation of a structure that
mirrors SITE_WWW_URL appears to be due to the way that the target and
temporary file and foldernames are calculated in the target_folder and
temp_folder functions in siteinfo.py.

Here's a fix that seems to work:

http://gist.github.com/469844

Paul

unread,
Jul 13, 2010, 12:36:51 PM7/13/10
to Hyde
Thanks, Josh. I applied your patch, but when I now deploy my app, the
"media" directory is stripped away from the directory structure,
placing all my css, images and javascript directories at the root of
the deployment, URL references in <script/>, <img/> and <link/>
elements. Is this to be expected?

Josh Rosen

unread,
Jul 13, 2010, 12:58:59 PM7/13/10
to Hyde
It's not to be expected; I made a mistake in my fix.
MediaNode.fragment is calculated differently than
ContentNode.fragment, and I didn't account for that. I've updated my
patch; please let me know if it works:

http://gist.github.com/469844

Paul

unread,
Jul 20, 2010, 12:09:52 PM7/20/10
to Hyde
Josh, applying your patch to a fresh clone gave:
patching file siteinfo.py
Hunk #1 FAILED at 363.
patch unexpectedly ends in middle of line
Hunk #2 FAILED at 427.
2 out of 2 hunks FAILED -- saving rejects to file siteinfo.py.rej

I went through your patch file and applied it manually. I've generated
a site to my public_html directory and Apache serves it without
problems. I've also tested generating to a project deploy directory
(i.e. a sibling of content, layout and media) and the version of
CherryPy shipped with Hyde seems to serve that without any problems,
too.

Many thanks.

Paul.
Reply all
Reply to author
Forward
0 new messages