Re: [mezzanine-users] Re: Cartridge shop missing from admin on deployed site

2014-04-01 Thread Jesse Carrigan
Great tip, thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Can't figure out why my Static Files won't load

2014-04-01 Thread Jesse Carrigan
As a piece of encouragement, it took me about the same amount of time 
struggling with it to make it work, but after getting things set up 
correctly it's really easy to successfully deploy with Fabric. I'd 
recommend it; it's a much more repeatable process.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Can't figure out why my Static Files won't load

2014-04-01 Thread Jesse Carrigan
Just out of curiosity, are you using fabric to deploy your site or are you 
editing the config by hand?

Also, a couple of things I found helpful in trying to get the static files 
going:

http://blog.doismellburning.co.uk/2012/06/25/django-and-static-files/

https://docs.djangoproject.com/en/dev/howto/static-files/

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Can't figure out why my Static Files won't load

2014-04-01 Thread Jesse Carrigan

>
> I don't have it on github, but it basically follows the pattern of the 
> deploy/ngnix.conf file in the mezzanine project. Here's what it looks like:
>
> upstream example {server 127.0.0.1:8001;}server {listen 80;listen 
> 443 ssl;server_name example.com;client_max_body_size 10M;
> keepalive_timeout15;ssl_certificate  conf/example.crt;
> ssl_certificate_key  conf/example.key;ssl_session_cache
> shared:SSL:10m;ssl_session_timeout  10m;ssl_ciphers 
> RC4:HIGH:!aNULL:!MD5;ssl_prefer_server_ciphers on;location / {
> proxy_redirect  off;proxy_set_headerHost
> $host;proxy_set_headerX-Real-IP   $remote_addr;   
>  proxy_set_headerX-Forwarded-For $proxy_add_x_forwarded_for;  
>   proxy_set_headerX-Forwarded-Protocol$scheme;proxy_pass  
> http://example ;}location /static/ {
> roothome/admin/.virtualenvs/example/project/;access_log   
>off;log_not_found   off;}location /robots.txt {
> roothome/admin/.virtualenvs/example/project/static;
> access_log  off;log_not_found   off;}location 
> /favicon.ico {root
> home/admin/.virtualenvs/example/project/static/img;
> access_log  off;log_not_found   off;}}
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Can't figure out why my Static Files won't load

2014-04-01 Thread Jesse Carrigan
I don't have it on github, but it basically follows the pattern of the 
deploy/ngnix.conf file in the mezzanine project. Here's what it looks like:

upstream example {server 127.0.0.1:8001;}server {listen 80;listen 
443 ssl;server_name example.com;client_max_body_size 10M;
keepalive_timeout15;ssl_certificate  conf/example.crt;
ssl_certificate_key  conf/example.key;ssl_session_cacheshared:SSL:10m;  
  ssl_session_timeout  10m;ssl_ciphers RC4:HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;location / {proxy_redirect  off;   
 proxy_set_headerHost$host;proxy_set_header 
   X-Real-IP   $remote_addr;proxy_set_header
X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header
X-Forwarded-Protocol$scheme;proxy_pass  http://example.com; 
   }location /static/ {root
home/admin/.virtualenvs/example/project/;access_log  off;
log_not_found   off;}location /robots.txt {root
home/admin/.virtualenvs/example/project/static;
access_log  off;log_not_found   off;}location 
/favicon.ico {root
home/admin/.virtualenvs/example/project/static/img;
access_log  off;log_not_found   off;}}

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Can't figure out why my Static Files won't load

2014-04-01 Thread Jesse Carrigan
Correct, my DNS records on Digital Ocean are set up as follows (I'm faking 
some of the information here):

example.com
A record: @ 192.168.123.123
NS: NS1.DIGITALOCEAN.COM
NS: NS2.DIGITALOCEAN.COM
NS: NS3.DIGITALOCEAN.COM

example.com is in the ALLOWED_HOSTS list.

It sounds like you may not have a domain associated with the droplet, 
though? Is that the case?

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Jesse Carrigan
Ken, thank you for posting the link to the Effective Django tutorial. Looks 
really useful.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Can't figure out why my Static Files won't load

2014-03-31 Thread Jesse Carrigan
Rather than the IP address of the host, have you tried your live hostname 
(e.g. "www.example.com" or "example.com")? My sites are hosted on Digital 
Ocean and that's what needed to be in the ALLOWED_HOSTS list. Same for the 
server_name in the ngnix configs.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Re: Cartridge shop missing from admin on deployed site

2014-03-31 Thread Jesse Carrigan
Looks like this was a caching issue on the browser. After going into Chrome 
dev tools and disabling the cache, the shop information showed up in the 
admin.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Cartridge shop missing from admin on deployed site

2014-03-28 Thread Jesse Carrigan
Hi all, I've successfully deployed Mezzanine with Cartridge to a VPS. 
However, I don't see the shop information in the admin. It's showing up in 
the dev server, though.

I don't see any errors showing up in the logs, so I'm not really sure 
what's happening. Stuff I've checked:

- gunicorn logs
- installed apps in settings.py
- fabric output on deploy

Nothing seems to be incorrect and I don't see any errors, but obviously 
something isn't quite right. Where else should I look to try to resolve 
this?

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Re: Internal Server Error - could be due to static files?

2014-03-22 Thread Jesse Carrigan
Simplifying the local_settings.py seems to have resolved this problem; I'm 
using the defaults for STATIC_ROOT and STATIC_URL that are already in 
settings.py, with the configuration for nginx as listed above.

Of course, now I'm getting a different error, but the problem with the 
permission errors on static files seems to have been taken care of.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Re: Internal Server Error - could be due to static files?

2014-03-21 Thread Jesse Carrigan
I think you're probably right, Ross. I noticed that when we did some 
updates to the theme locally and some static files were accidentally 
missing, internally the dev server produced a 404 error as evidenced by the 
server output. However, on the browser it showed up as a 500 error. I 
suspect it's probably the same type of thing here. I'll try some of those 
tweaks tonight and see if one of them works.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Re: Internal Server Error - could be due to static files?

2014-03-20 Thread Jesse Carrigan
I made some progress on understanding this, but haven't quite gotten past 
the problem. One thing I learned was that I mixed up the use of the 
STATIC_ROOT and STATIC_URL, but fixing it didn't seem to do much.

Here are what appear to be the relevant configs.

local_settings.py:
STATIC_URL = "http://www.example.com/static/";
STATIC_ROOT = "/var/www/example.com/static/"

example.conf:
location /static/ {
root/var/www/example.com;
access_log  off;
log_not_found   off;
}

location /robots.txt {
root/var/www/example.com/static;
access_log  off;
log_not_found   off;
}

location /favicon.ico {
root/var/www/example.com/static/img;
access_log  off;
log_not_found   off;
}

So it looks to me like the alias should be correctly set up for the static 
folder. Running collectstatic copies the static files from the project into 
the folder at STATIC_ROOT. The static folder has 755 permissions 
recursively from the top-level, so clients should be able to read and 
execute. There's a missing piece that I haven't been able to find. Locally, 
things work fine, but it's after deploying onto the server that the trouble 
starts.


-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Re: Internal Server Error - could be due to static files?

2014-03-18 Thread Jesse Carrigan
Good thought, I had been running collectstatic as part of the fabric 
deploy. This time I ran the command by itself.

It correctly copied everything into the location specified by the static 
root, so it's putting them where I expected. I'm still not seeing any new 
error messages in the ngnix logs. I wondered if it was a permissions issue, 
but after ensuring that everything in the static folder has read 
permissions after running collectstatic, no changes in behavior.

The challenge in troubleshooting is that when debug is on, the error just 
disappears. It could be unrelated to the static files, but that was 
producing this behavior previously (albeit with some errors in the logs to 
point the way).

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Re: Problems with trying to change theme

2014-03-17 Thread Jesse Carrigan
Could you post the exact contents of your INSTALLED_APPS list? I'm 
guessing, but it looks like there may be a typo either in what you posted 
here ("ValueError: u'django.contrib.admin' is not in list") or your 
INSTALLED_APPS list.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Internal Server Error - could be due to static files?

2014-03-16 Thread Jesse Carrigan
I've been poking at static files on Mezzanine for several days trying to 
tease out what is wrong. Here's what I think I know:

I am using Fabric to deploy Mezzanine onto a Vagrant VM.

I have been getting an "Internal Server Error" message when setting DEBUG = 
False. When DEBUG = True, the site loads fine. Per the docs this appears to 
be due to the static files not being served in the first case.

Initially, I found in the ngnix error logs that there was a problem with 
permissions on the projectname/project/static folder where all the static 
files had been copied during the Fabric deploy. The server was denied 
permission to the favicon.ico file. It looked like the ngnix user did not 
have the appropriate permissions to the top-level /home folder (700 with 
root:root), and thus couldn't access the project folder. 

After looking at the staticfiles docs in Django it looked like the best 
thing to do was to move the static files into a location like 
/var/www/example.com/static and serve them from there. I created the 
directory, copied the static files, and changed the ngnix config file for 
the site to serve the static files from that location. I also set 
STATIC_ROOT in local_settings.py to that location.

However, I continued to get the same "Internal Server Error" message with 
DEBUG = False. However, the ngnix errors are no longer coming up, and 
nothing is showing up in the console of the browser either. Any suggestions 
on the next step? 

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Re: fab all runs, but cannot access mezzanine admin page

2014-03-06 Thread Jesse Carrigan
Success! The change of adding the LIVE_HOSTNAME of the deployed site on 
vagrant to the /etc/hosts file on my local machine did the trick.

The static files aren't serving up correctly despite having Debug = True, 
but I have seen enough information around that to sort it out. Thanks for 
all the help on this.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] fab all runs, but cannot access mezzanine admin page

2014-03-06 Thread Jesse Carrigan
Ken, I realized as I read your question that I had been adding the vagrant 
hostname/IP to /etc/hosts on the vagrant, not on my local machine. I was 
reading about what the hosts file is for last night, but hadn't thought through 
the implications. (Clearly I have a lot to learn about Linux.) I'll make that 
change tonight and see what happens.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [mezzanine-users] fab all runs, but cannot access mezzanine admin page

2014-03-06 Thread Jesse Carrigan
After continuing to look at this, I tried removing the LIVE_HOSTNAME value 
from the Fabric settings, since I couldn't get to any of the hostnames I 
tried via a browser (such as the example above "vagrant.example.com", 
"www.testproject.com", etc.). I saw that in the fabfile it would then try 
to get the first value in HOSTS. After making this change, I was able to 
get to the test project homepage via the IP address.

What I'm not understanding is why none of the attempted hostnames are 
resolving to the site. When I have checked the ngnix config for the site in 
sites-enabled, the hostnames have been there every time, but I can never 
access the site through the browser (except in the case above).

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [mezzanine-users] fab all runs, but cannot access mezzanine admin page

2014-03-04 Thread Jesse Carrigan
Thanks for taking a look. I appreciate your validating the current Vagrant 
setup is more or less correct. I'll read through the docs and probably pipe 
the Fabric output to a file so I can see if there's an error or something 
that I'm missing as it runs through its paces.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [mezzanine-users] fab all runs, but cannot access mezzanine admin page

2014-03-03 Thread Jesse Carrigan
I tried forwarding a port from my host machine and got the same result. 
With localhost:8080 forwarded to 80 on the guest machine, I get the message 
from ngnix. Forwarding localhost:8080 to 8000, I get no response.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[mezzanine-users] Re: fab all runs, but cannot access mezzanine admin page

2014-03-03 Thread Jesse Carrigan
Hi Ken,

Thank you for your help. I didn't get any different results from deploying. 
Here's a link to the gist:

https://gist.github.com/feanorancalime/9340725

I should point out that I'm using a local vm. I set this up using a private 
network which has the IP address listed as host in the gist. I wonder if 
that's contributing to the problem? Should I be forwarding a port to the 
vagrant instead? I see that in the Vagrant "Getting Started" section, but I 
thought I needed the static IP for Fabric to be able to deploy.

Jesse

On Sunday, March 2, 2014 5:47:24 PM UTC-8, Jesse Carrigan wrote:
>
> I'm hoping someone can help me. I've been trying for months to get 
> Mezzanine running on anything other than local (I gave up on it a while ago 
> and finally decided to try again recently). I've been following Ken 
> Bolton's excellent instructions, which introduced me to Vagrant (and for 
> which I'm very grateful - it's a fantastic tool).
>
> The story so far is that I've stripped back to the simplest thing I can 
> think of to attempt to get Mezzanine deploying, per Ken's post, and then go 
> from there. To that end, I downloaded the latest version and started a new, 
> empty project. That project, with the basics and nothing else, is running 
> locally using the built-in dev server.
>
> I then ran fab all to install to vagrant, which finished. However, when 
> trying to get to the admin page via 192.168.x.x:8000/admin, I get no 
> response. If I just access the browser via the vagrant's IP address, I get 
> the "Welcome to ngnix!" message. Looking at the running processes on 
> vagrant, it appears that all the pieces are running (ngnix, memcached, 
> gunicorn, etc). I'm guessing this means that something has gone wrong that 
> is preventing ngnix from passing requests on to Mezzanine, but I'm not sure 
> what.
>
> I really like Mezzanine, and I'd like to get it working. I'm struggling to 
> understand how the project, with no custom development at all, would fail 
> to deploy. If anyone could give me some pointers about how I might 
> troubleshoot this, such as what to look for and where, I would be grateful. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[mezzanine-users] fab all runs, but cannot access mezzanine admin page

2014-03-02 Thread Jesse Carrigan
I'm hoping someone can help me. I've been trying for months to get 
Mezzanine running on anything other than local (I gave up on it a while ago 
and finally decided to try again recently). I've been following Ken 
Bolton's excellent instructions, which introduced me to Vagrant (and for 
which I'm very grateful - it's a fantastic tool).

The story so far is that I've stripped back to the simplest thing I can 
think of to attempt to get Mezzanine deploying, per Ken's post, and then go 
from there. To that end, I downloaded the latest version and started a new, 
empty project. That project, with the basics and nothing else, is running 
locally using the built-in dev server.

I then ran fab all to install to vagrant, which finished. However, when 
trying to get to the admin page via 192.168.x.x:8000/admin, I get no 
response. If I just access the browser via the vagrant's IP address, I get 
the "Welcome to ngnix!" message. Looking at the running processes on 
vagrant, it appears that all the pieces are running (ngnix, memcached, 
gunicorn, etc). I'm guessing this means that something has gone wrong that 
is preventing ngnix from passing requests on to Mezzanine, but I'm not sure 
what.

I really like Mezzanine, and I'd like to get it working. I'm struggling to 
understand how the project, with no custom development at all, would fail 
to deploy. If anyone could give me some pointers about how I might 
troubleshoot this, such as what to look for and where, I would be grateful. 

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.