Re: IOError, Permission Denied using Amazon s3 w/ django-storage?
This is on Ubuntu. I am using Mezzanine framework built on top of Django. 'pip install mezzanine' helps grab all the dependencies like Pillow (PIL). I'm not sure if this is what's causing the problem but thank you. I'll take a look at this. On Monday, December 10, 2012 1:35:02 PM UTC-8, somecallitblues wrote: > > I suspect you're on a Mac and your jpglib is not compiled properly. If you > are on Mac make sure you look into that. > > Cheers, > > mario > www.zenbookings.com > On 10 Dec, 2012 4:20 PM, "easypie" <progr...@gmail.com > > wrote: > >> Yeah. It's uploaded and by using django-filebrowser I can upload image, >> create folder and move them around but I am not able to use those image in >> posts. I am using Mezzanine btw. I put up a post over at their user group: >> https://groups.google.com/forum/?fromgroups=#!topic/mezzanine-users/SMHtMX1YgBY >> >> On Sunday, December 9, 2012 3:50:45 PM UTC-8, Chris Cogdon wrote: >>> >>> If you're using ImageField, that by default verifies that what you've >>> uploaded is in fact an image. It uses PIL (python image library, aka >>> python-imaging) to do that. make sure you have PIL installed and it is >>> working. >>> >>> On Sunday, December 9, 2012 12:40:22 AM UTC-8, easypie wrote: >>>> >>>> I got it working by granting 775 permission for that fold and its >>>> sub-folder where the files had to be created and lacked enough privilege >>>> to >>>> do so. Now everything works! ...I just need to figure out why the uploads >>>> won't accept .jpg files =\ >>>> >>>> On Saturday, December 8, 2012 11:18:25 PM UTC-8, easypie wrote: >>>>> >>>>> I encountered an error where whenever I go to upload a file, it tells >>>>> me that a folder doesn't have enough permission. What kind of permission >>>>> do >>>>> we give these folders? I use Apache server. Do I change the whole project >>>>> folder to group www-data? Then set chmod to 775 to the project folder and >>>>> all files in the project recursively? Here is my traceback error log: >>>>> http://dpaste.org/5KUMf/! >>>>> >>>> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/django-users/-/Drz7gK3Zxz8J. >> To post to this group, send email to django...@googlegroups.com >> . >> To unsubscribe from this group, send email to >> django-users...@googlegroups.com . >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/V5NQ660_A0sJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: IOError, Permission Denied using Amazon s3 w/ django-storage?
Yeah. It's uploaded and by using django-filebrowser I can upload image, create folder and move them around but I am not able to use those image in posts. I am using Mezzanine btw. I put up a post over at their user group: https://groups.google.com/forum/?fromgroups=#!topic/mezzanine-users/SMHtMX1YgBY On Sunday, December 9, 2012 3:50:45 PM UTC-8, Chris Cogdon wrote: > > If you're using ImageField, that by default verifies that what you've > uploaded is in fact an image. It uses PIL (python image library, aka > python-imaging) to do that. make sure you have PIL installed and it is > working. > > On Sunday, December 9, 2012 12:40:22 AM UTC-8, easypie wrote: >> >> I got it working by granting 775 permission for that fold and its >> sub-folder where the files had to be created and lacked enough privilege to >> do so. Now everything works! ...I just need to figure out why the uploads >> won't accept .jpg files =\ >> >> On Saturday, December 8, 2012 11:18:25 PM UTC-8, easypie wrote: >>> >>> I encountered an error where whenever I go to upload a file, it tells me >>> that a folder doesn't have enough permission. What kind of permission do we >>> give these folders? I use Apache server. Do I change the whole project >>> folder to group www-data? Then set chmod to 775 to the project folder and >>> all files in the project recursively? Here is my traceback error log: >>> http://dpaste.org/5KUMf/! >>> >> -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/Drz7gK3Zxz8J. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: IOError, Permission Denied using Amazon s3 w/ django-storage?
I got it working by granting 775 permission for that fold and its sub-folder where the files had to be created and lacked enough privilege to do so. Now everything works! ...I just need to figure out why the uploads won't accept .jpg files =\ On Saturday, December 8, 2012 11:18:25 PM UTC-8, easypie wrote: > > I encountered an error where whenever I go to upload a file, it tells me > that a folder doesn't have enough permission. What kind of permission do we > give these folders? I use Apache server. Do I change the whole project > folder to group www-data? Then set chmod to 775 to the project folder and > all files in the project recursively? Here is my traceback error log: > http://dpaste.org/5KUMf/! > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/BF5Aj0d61awJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
IOError, Permission Denied using Amazon s3 w/ django-storage?
I encountered an error where whenever I go to upload a file, it tells me that a folder doesn't have enough permission. What kind of permission do we give these folders? I use Apache server. Do I change the whole project folder to group www-data? Then set chmod to 775 to the project folder and all files in the project recursively? Here is my traceback error log: http://dpaste.org/5KUMf/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/eQd9aDbaZxcJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Internal Error after chaning SITE domain name and modifying html file...?
I'm not exactly sure what was the main cause of this but I had to remove all the project's files and its virtualenv and reinstall and git pull all the files back to start a fresh install. The two things I believe might be the culprit is either the wsgi.py file or the virtualenv itself. But after I did a fresh install of virtualenv and pull a copy of the project back to working server, everything booted back nicely. Thanks everyone (...for now? =) On Friday, December 7, 2012 12:03:27 AM UTC-8, easypie wrote: > > I'm getting an 500 internal error. I did two things before this happened. > (1) I modified a single html file then (2) logged into admin panel and > changed the SITE's domain name. Afterward, I restarted the server but the > website kept responding w/ 500 error. Here's the apache error log: > http://dpaste.org/crfbg/ > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/E3ejcteq2D0J. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Internal Error after chaning SITE domain name and modifying html file...?
I also went through this suggestion and the response is a success. https://groups.google.com/forum/?fromgroups=#!topic/django-users/Rb9F7BS6td0%5B1-25%5D -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/dpuQh2xSU-8J. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Internal Error after chaning SITE domain name and modifying html file...?
I thought this line took care of that: site.addsitedir( '/home/easyi/.virutalenvs/%s/lib/python2.7/site-packages' % settings. PROJECT_NAME) On Friday, December 7, 2012 4:01:12 PM UTC-8, Chris Cogdon wrote: > > Okay, I've never tried using virtualenv's with django before... but from > what I've read, one of the most important things to do is ensure that the > virtualenv site-packages directory is the first thing in sys.path the > wsgi.py file there doesn't seem to be manipulating sys.path at all. > > > On Friday, December 7, 2012 1:21:01 PM UTC-8, easypie wrote: >> >> Here's my wsgi.py file located in my project: http://dpaste.org/dBRqQ/ >> > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/gWtwa1zE5cEJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Internal Error after chaning SITE domain name and modifying html file...?
Here's my wsgi.py file located in my project: http://dpaste.org/dBRqQ/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/0DBDHo15FrcJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Internal Error after chaning SITE domain name and modifying html file...?
Here's my apache log. I know this is outside of django but this might help find the cause: http://dpaste.org/V9ONE/ thanks for the helps. On Friday, December 7, 2012 1:06:30 PM UTC-8, easypie wrote: > > I took the action suggested but it failed. So I decided to remove my whole > project directory and recreate the database to start a fresh install of the > project. But when I visit the site url it still returns the same error > posted in the apache error log. Is this maybe something to do with my wsgi > file or amazonaws storage that's messing everything up? or perhaps just my > apache server...? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/GkQAPR7teaUJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Internal Error after chaning SITE domain name and modifying html file...?
I took the action suggested but it failed. So I decided to remove my whole project directory and recreate the database to start a fresh install of the project. But when I visit the site url it still returns the same error posted in the apache error log. Is this maybe something to do with my wsgi file or amazonaws storage that's messing everything up? or perhaps just my apache server...? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/70-8_0iwLgEJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Internal Error after chaning SITE domain name and modifying html file...?
I'm getting an 500 internal error. I did two things before this happened. (1) I modified a single html file then (2) logged into admin panel and changed the SITE's domain name. Afterward, I restarted the server but the website kept responding w/ 500 error. Here's the apache error log: http://dpaste.org/crfbg/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/Ihm02fnLxbIJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: ./manage.py collectstatic does not collect my folder
Wonderful! I had to add in the files I wanted override inside STATICFILES_DIRS. It works now. On Saturday, October 6, 2012 11:01:39 PM UTC-7, Xavier Ordoquy wrote: > > Hi, > > Django static collects files that are: > - in the application's static directory > - in the directories listed by STATICFILES_DIRS > > If using the default storage, files and directories are copied into the > STATIC_ROOT directory and should be served at the location specified by > STATIC_URL > > The order in which the applications are declared is important. > If I'm not mistaken, the files in STATICFILES_DIRS will override the > application's static directories. > > Regards, > Xavier Ordoquy, > Linovia. > > Le 7 oct. 2012 à 06:52, easypie <progr...@gmail.com > a > écrit : > > I have my project setup so ./manage.py collectstatic will upload all the > files in /static/ onto the Amazon S3 server. The only problem is that I > have a folder located in .../static/theme/{site layout gfx} that doesn't > get collected to the S3 server. I understand that collectstatic ?copies all > files located in app/static to the location provided by STATIC_URL. But > what about those .css and image files I want to override? For example, I > want to override the admin's .css files so I copy that over to the > /static/ folder in my project's root but when I run ./manage.py > collectstatic it only moves the admin's .css files located in > ../site-packages/django/.../css/{..css} and not the css file that I copied > over and then edited? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/django-users/-/1A2_Kn1PH1wJ. > To post to this group, send email to django...@googlegroups.com > . > To unsubscribe from this group, send email to > django-users...@googlegroups.com . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/Us2xCBw2qFMJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
./manage.py collectstatic does not collect my folder
I have my project setup so ./manage.py collectstatic will upload all the files in /static/ onto the Amazon S3 server. The only problem is that I have a folder located in .../static/theme/{site layout gfx} that doesn't get collected to the S3 server. I understand that collectstatic ?copies all files located in app/static to the location provided by STATIC_URL. But what about those .css and image files I want to override? For example, I want to override the admin's .css files so I copy that over to the /static/ folder in my project's root but when I run ./manage.py collectstatic it only moves the admin's .css files located in ../site-packages/django/.../css/{..css} and not the css file that I copied over and then edited? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/1A2_Kn1PH1wJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: How to Query objects.filter ForeignKey
That worked like a charm! I read about the double underscore but didn't think much about it when it crossed my mind. I've been grinding on this for the whole day. My eyes... =) On Tuesday, June 26, 2012 1:04:40 PM UTC-7, Kurtis wrote: > > I performed infobox = InfoDetail.objects.filter(title=info_title), but it >> returns an error cus 'title' doesn't live in InfoDetail. >> >> How can i grab and filter it by title and pass {'infobox': infobox} in >> HttpResponse when HttpRequest is called? >> > > If you want to filter by a certain title, then you'd do something like > this: > > InfoDetail.objects.filter(infobox__title="Some Title") > > That would return all InfoDetail objects whose related InfoBox has a > specific title. > > If that doesn't help solve your problem, let me know what else you're > stuck on :) > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/5fEndcSA6KIJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
How to Query objects.filter ForeignKey
I'm trying to pass a objects.filter dictionary to HttpResponse. The problem is I have 2 models: InfoBox and InfoDetail. InfoDetail is linked to InfoBox by models.ForeignKey(InfoBox). What I want to do is filter by title which lives in the InfoBox model. I performed infobox = InfoDetail.objects.filter(title=info_title), but it returns an error cus 'title' doesn't live in InfoDetail. How can i grab and filter it by title and pass {'infobox': infobox} in HttpResponse when HttpRequest is called? Here's models: http://paste.ubuntu.com/1061144/ Here's views: http://paste.ubuntu.com/1061146/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/Y4H1cgbG1yAJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: [help] Server Config: django + uwsgi + nginx
yes. i believe it's 'ln -s /etc/nginx/sites-available/mysite.com /etc/nginx/sites-enabled/mysite.com' On Thursday, May 3, 2012 2:40:35 PM UTC-7, Karl Sutt wrote: > > Have you symlinked /etc/nginx/sites-available/mysite.comto > /etc/nginx/sites-enabled/ > mysite.com ? > > Karl Sutt > > > On Thu, May 3, 2012 at 10:23 PM, easypie <program...@gmail.com> wrote: > >> I'm not sure if I should post this in this thread of mine or start new >> one. But it's still about the config files. >> >> After getting uwsgi to work. I tried to link nginx w/ it but that didn't >> work. I go to localhost:80 and that takes me to the welcome page: "Welcome >> to Nginx!". When I go to localhost:8000 (which I want), it doesn't load >> (unable to connect). Please take a look at the code: >> http://dpaste.org/oIjP9/ >> >> >> On Thursday, May 3, 2012 10:22:54 AM UTC-7, Kurtis wrote: >>> >>> Hey, I'm glad to hear you got it working! If you run into any more >>> problems, don't hesitate to ask. >>> >>> On Wed, May 2, 2012 at 1:31 AM, easypie <program...@gmail.com> wrote: >>> >>>> Thanks. I was missing the virtualenv= mentions earlier. I'm glad >>>> I know this those settings are meant for development only. I was a little >>>> confused thinking that was ready for deployment. I'm new to all this and >>>> get confuse sometimes. >>>> >>>> >>>> On Tuesday, May 1, 2012 8:04:00 AM UTC-7, Kurtis wrote: >>>>> >>>>> Judging from your Import Error -- I think you're having a problem with >>>>> Django not being on the Python path. In my uwsgi configuration file (I >>>>> used >>>>> .xml), it looks like this: >>>>> >>>>> >>>>> >>>>> DJANGO_SETTINGS_MODULE=**fi**reflie.settings >>>>> 4 >>>>> 0.0.0.0:7999 >>>>> /home/fireflie/staging/fireflie/ >>>>> django.core.handlers.**w**sgi:WSGIHandler() >>>>> /home/fireflie/**sta**ging/fireflie/ >>>>> /home/fireflie/**sta**ging/ >>>>> /var/log/uwsgi/**uwsg**i.log >>>>> /tmp/fireflie-**staging**.pid >>>>> >>>>> >>>>> Note: That's not guaranteed to be production-ready (we're just using >>>>> it for development) and I'm also not using a virtual environment (we use >>>>> a >>>>> whole sever for the single Django application). In other words, I'm not >>>>> following best practices by a large margin. Good luck! >>>>> >>>>> >>>>> On Mon, Apr 30, 2012 at 7:36 PM, Karl Sutt <k...@sutt.ee> wrote: >>>>> >>>>>> I am not entirely sure what you mean by that. If you mean the nginx >>>>>> equivalent of Apache VirtualHosts then the nginx wiki explains it quite >>>>>> nicely >>>>>> http://wiki.nginx.org/**S**erverBlockExample<http://wiki.nginx.org/ServerBlockExample>. >>>>>> >>>>>> Is that what you meant? >>>>>> >>>>>> Karl Sutt >>>>>> >>>>>> >>>>>> >>>>>> On Mon, Apr 30, 2012 at 7:04 PM, easypie <program...@gmail.com>wrote: >>>>>> >>>>>>> does your configuration allow for running multiple sites? >>>>>>> >>>>>>> >>>>>>> On Sunday, April 29, 2012 12:01:27 PM UTC-7, Karl Sutt wrote: >>>>>>>> >>>>>>>> Here is my uWSGI command and nginx.conf contents: >>>>>>>> >>>>>>>> uwsgi -- >>>>>>>> http://www.dpaste.org/**aiJuq/<http://www.dpaste.org/aiJuq/> >>>>>>>> nginx -- >>>>>>>> http://www.dpaste.org/**bAG0o/<http://www.dpaste.org/bAG0o/> >>>>>>>> >>>>>>>> I've used it for a Flask application, but I've just tested it and >>>>>>>> it works for a Django project as well. Note that wsgi.py file in the >>>>>>>> uwsgi >>>>>>>> command is the Python file that Django generates when you first create >>>>>>>> a >>>>>>>> project, there is no need to change it. >>>>>>>> >>>
Re: [help] Server Config: django + uwsgi + nginx
I'm not sure if I should post this in this thread of mine or start new one. But it's still about the config files. After getting uwsgi to work. I tried to link nginx w/ it but that didn't work. I go to localhost:80 and that takes me to the welcome page: "Welcome to Nginx!". When I go to localhost:8000 (which I want), it doesn't load (unable to connect). Please take a look at the code: http://dpaste.org/oIjP9/ On Thursday, May 3, 2012 10:22:54 AM UTC-7, Kurtis wrote: > > Hey, I'm glad to hear you got it working! If you run into any more > problems, don't hesitate to ask. > > On Wed, May 2, 2012 at 1:31 AM, easypie <program...@gmail.com> wrote: > >> Thanks. I was missing the virtualenv= mentions earlier. I'm glad I >> know this those settings are meant for development only. I was a little >> confused thinking that was ready for deployment. I'm new to all this and >> get confuse sometimes. >> >> >> On Tuesday, May 1, 2012 8:04:00 AM UTC-7, Kurtis wrote: >>> >>> Judging from your Import Error -- I think you're having a problem with >>> Django not being on the Python path. In my uwsgi configuration file (I used >>> .xml), it looks like this: >>> >>> >>> >>> DJANGO_SETTINGS_MODULE=**fireflie.settings >>> 4 >>> 0.0.0.0:7999 >>> /home/fireflie/staging/**fireflie/ >>> django.core.handlers.**wsgi:WSGIHandler() >>> /home/fireflie/**staging/fireflie/ >>> /home/fireflie/**staging/ >>> /var/log/uwsgi/**uwsgi.log >>> /tmp/fireflie-**staging.pid >>> >>> >>> Note: That's not guaranteed to be production-ready (we're just using it >>> for development) and I'm also not using a virtual environment (we use a >>> whole sever for the single Django application). In other words, I'm not >>> following best practices by a large margin. Good luck! >>> >>> >>> On Mon, Apr 30, 2012 at 7:36 PM, Karl Sutt <k...@sutt.ee> wrote: >>> >>>> I am not entirely sure what you mean by that. If you mean the nginx >>>> equivalent of Apache VirtualHosts then the nginx wiki explains it quite >>>> nicely >>>> http://wiki.nginx.org/**ServerBlockExample<http://wiki.nginx.org/ServerBlockExample>. >>>> >>>> Is that what you meant? >>>> >>>> Karl Sutt >>>> >>>> >>>> >>>> On Mon, Apr 30, 2012 at 7:04 PM, easypie <program...@gmail.com> wrote: >>>> >>>>> does your configuration allow for running multiple sites? >>>>> >>>>> >>>>> On Sunday, April 29, 2012 12:01:27 PM UTC-7, Karl Sutt wrote: >>>>>> >>>>>> Here is my uWSGI command and nginx.conf contents: >>>>>> >>>>>> uwsgi -- http://www.dpaste.org/**aiJuq**/<http://www.dpaste.org/aiJuq/> >>>>>> nginx -- http://www.dpaste.org/**bAG0o**/<http://www.dpaste.org/bAG0o/> >>>>>> >>>>>> I've used it for a Flask application, but I've just tested it and it >>>>>> works for a Django project as well. Note that wsgi.py file in the uwsgi >>>>>> command is the Python file that Django generates when you first create a >>>>>> project, there is no need to change it. >>>>>> >>>>>> Good luck! >>>>>> >>>>>> Karl Sutt >>>>>> >>>>>> >>>>>> On Sun, Apr 29, 2012 at 6:49 PM, easypie <program...@gmail.com>wrote: >>>>>> >>>>>>> I have this file that was created for me by one of the users in >>>>>>> django's irc channel. I edited to have the right information inserted >>>>>>> but >>>>>>> I"m not sure what I'm doing wrong to not make it work. I've spent some >>>>>>> time >>>>>>> trying to understand each line by searching the web. There's still a >>>>>>> thing >>>>>>> or two that's missing from the puzzle. Maybe it's the server config >>>>>>> that >>>>>>> has a flaw or the way I went about it. I haven't done a fresh install >>>>>>> of >>>>>>> uwsgi and nginx yet. However, please take a look to see if there's an >>>>>>> error >>>>>>> or solution that could work. Thanks. >>>>>>
Re: [help] Server Config: django + uwsgi + nginx
Thanks. I was missing the virtualenv= mentions earlier. I'm glad I know this those settings are meant for development only. I was a little confused thinking that was ready for deployment. I'm new to all this and get confuse sometimes. On Tuesday, May 1, 2012 8:04:00 AM UTC-7, Kurtis wrote: > > Judging from your Import Error -- I think you're having a problem with > Django not being on the Python path. In my uwsgi configuration file (I used > .xml), it looks like this: > > > > DJANGO_SETTINGS_MODULE=fireflie.settings > 4 > 0.0.0.0:7999 > /home/fireflie/staging/fireflie/ > django.core.handlers.wsgi:WSGIHandler() > /home/fireflie/staging/fireflie/ > /home/fireflie/staging/ > /var/log/uwsgi/uwsgi.log > /tmp/fireflie-staging.pid > > > Note: That's not guaranteed to be production-ready (we're just using it > for development) and I'm also not using a virtual environment (we use a > whole sever for the single Django application). In other words, I'm not > following best practices by a large margin. Good luck! > > > On Mon, Apr 30, 2012 at 7:36 PM, Karl Sutt <k...@sutt.ee> wrote: > >> I am not entirely sure what you mean by that. If you mean the nginx >> equivalent of Apache VirtualHosts then the nginx wiki explains it quite >> nicely http://wiki.nginx.org/ServerBlockExample. Is that what you meant? >> >> Karl Sutt >> >> >> >> On Mon, Apr 30, 2012 at 7:04 PM, easypie <program...@gmail.com> wrote: >> >>> does your configuration allow for running multiple sites? >>> >>> >>> On Sunday, April 29, 2012 12:01:27 PM UTC-7, Karl Sutt wrote: >>>> >>>> Here is my uWSGI command and nginx.conf contents: >>>> >>>> uwsgi -- http://www.dpaste.org/**aiJuq/ <http://www.dpaste.org/aiJuq/> >>>> nginx -- http://www.dpaste.org/**bAG0o/ <http://www.dpaste.org/bAG0o/> >>>> >>>> I've used it for a Flask application, but I've just tested it and it >>>> works for a Django project as well. Note that wsgi.py file in the uwsgi >>>> command is the Python file that Django generates when you first create a >>>> project, there is no need to change it. >>>> >>>> Good luck! >>>> >>>> Karl Sutt >>>> >>>> >>>> On Sun, Apr 29, 2012 at 6:49 PM, easypie <program...@gmail.com> wrote: >>>> >>>>> I have this file that was created for me by one of the users in >>>>> django's irc channel. I edited to have the right information inserted but >>>>> I"m not sure what I'm doing wrong to not make it work. I've spent some >>>>> time >>>>> trying to understand each line by searching the web. There's still a >>>>> thing >>>>> or two that's missing from the puzzle. Maybe it's the server config that >>>>> has a flaw or the way I went about it. I haven't done a fresh install of >>>>> uwsgi and nginx yet. However, please take a look to see if there's an >>>>> error >>>>> or solution that could work. Thanks. >>>>> >>>>> Link to code: http://www.dpaste.org/**wWVd3/<http://www.dpaste.org/wWVd3/> >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Django users" group. >>>>> To view this discussion on the web visit https://groups.google.com/d/* >>>>> *msg/django-users/-/**2rekHP0I6V0J<https://groups.google.com/d/msg/django-users/-/2rekHP0I6V0J> >>>>> . >>>>> To post to this group, send email to django-users@googlegroups.com. >>>>> To unsubscribe from this group, send email to >>>>> django-users+unsubscribe@**googlegroups.com<django-users%2bunsubscr...@googlegroups.com> >>>>> . >>>>> For more options, visit this group at http://groups.google.com/** >>>>> group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en> >>>>> . >>>>> >>>> >>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msg/django-users/-/sMsRN5iG9NQJ. >>> >>> To post to this group, send email to django-users@googlegroups.com. >>> To unsubscribe from this group, send email to >&
Re: [help] Server Config: django + uwsgi + nginx
how would i start that? sudo uwsgi start sudo service nginx start? On Sunday, April 29, 2012 12:01:27 PM UTC-7, Karl Sutt wrote: > > Here is my uWSGI command and nginx.conf contents: > > uwsgi -- http://www.dpaste.org/aiJuq/ > nginx -- http://www.dpaste.org/bAG0o/ > > I've used it for a Flask application, but I've just tested it and it works > for a Django project as well. Note that wsgi.py file in the uwsgi command > is the Python file that Django generates when you first create a project, > there is no need to change it. > > Good luck! > > Karl Sutt > > > On Sun, Apr 29, 2012 at 6:49 PM, easypie <program...@gmail.com> wrote: > >> I have this file that was created for me by one of the users in django's >> irc channel. I edited to have the right information inserted but I"m not >> sure what I'm doing wrong to not make it work. I've spent some time trying >> to understand each line by searching the web. There's still a thing or two >> that's missing from the puzzle. Maybe it's the server config that has a >> flaw or the way I went about it. I haven't done a fresh install of uwsgi >> and nginx yet. However, please take a look to see if there's an error or >> solution that could work. Thanks. >> >> Link to code: http://www.dpaste.org/wWVd3/ >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/django-users/-/2rekHP0I6V0J. >> To post to this group, send email to django-users@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/Haw_P9fLiH4J. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: [help] Server Config: django + uwsgi + nginx
does your configuration allow for running multiple sites? On Sunday, April 29, 2012 12:01:27 PM UTC-7, Karl Sutt wrote: > > Here is my uWSGI command and nginx.conf contents: > > uwsgi -- http://www.dpaste.org/aiJuq/ > nginx -- http://www.dpaste.org/bAG0o/ > > I've used it for a Flask application, but I've just tested it and it works > for a Django project as well. Note that wsgi.py file in the uwsgi command > is the Python file that Django generates when you first create a project, > there is no need to change it. > > Good luck! > > Karl Sutt > > > On Sun, Apr 29, 2012 at 6:49 PM, easypie <program...@gmail.com> wrote: > >> I have this file that was created for me by one of the users in django's >> irc channel. I edited to have the right information inserted but I"m not >> sure what I'm doing wrong to not make it work. I've spent some time trying >> to understand each line by searching the web. There's still a thing or two >> that's missing from the puzzle. Maybe it's the server config that has a >> flaw or the way I went about it. I haven't done a fresh install of uwsgi >> and nginx yet. However, please take a look to see if there's an error or >> solution that could work. Thanks. >> >> Link to code: http://www.dpaste.org/wWVd3/ >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/django-users/-/2rekHP0I6V0J. >> To post to this group, send email to django-users@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/sMsRN5iG9NQJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: [help] Server Config: django + uwsgi + nginx
i followed the django-http+uwsgi quick start and ended up with an error. ImportError: no module named django.core.handlers.wsgi \n unable to load app ... here's the error log: dpaste.org/BM5BW On Sunday, April 29, 2012 11:31:43 AM UTC-7, Roberto De Ioris wrote: > > > > I have this file that was created for me by one of the users in django's > > irc channel. I edited to have the right information inserted but I"m not > > sure what I'm doing wrong to not make it work. I've spent some time > trying > > to understand each line by searching the web. There's still a thing or > two > > that's missing from the puzzle. Maybe it's the server config that has a > > flaw or the way I went about it. I haven't done a fresh install of uwsgi > > and nginx yet. However, please take a look to see if there's an error or > > solution that could work. Thanks. > > > > Link to code: http://www.dpaste.org/wWVd3/ > > > > I suggest you to not start with such a complex scenario. > > I would go step-by-step with a very simple setup involving only uWSGI: > > http://projects.unbit.it/uwsgi/wiki/Quickstart > > Then, change the http protocol to the uwsgi one (simply replace http = > with socket = ) and put it behind a simple nginx config (like the one you > will find following the uWSGI quickstart). > > Then move to the 'upstart' part, adding the script to the /etc/init > directory. > > Finally start playing with caching (it can be the most challenging part) > > -- > Roberto De Ioris > http://unbit.it > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/73nF9MjDBvYJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
[help] Server Config: django + uwsgi + nginx
I have this file that was created for me by one of the users in django's irc channel. I edited to have the right information inserted but I"m not sure what I'm doing wrong to not make it work. I've spent some time trying to understand each line by searching the web. There's still a thing or two that's missing from the puzzle. Maybe it's the server config that has a flaw or the way I went about it. I haven't done a fresh install of uwsgi and nginx yet. However, please take a look to see if there's an error or solution that could work. Thanks. Link to code: http://www.dpaste.org/wWVd3/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/2rekHP0I6V0J. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: How to Detect Current Page as Homepage?
wow. thank you very much! i didn't know the extra string passed in patterns inside a tuple was used in that way too. Does this have to do with get_absolute_url too? This is what I did: {% url satchmo_shop_home as home %} {% if request.path == home %}{% endif %} urlspatterns += patterns('satchmo_store.shop.views', (r'^$', 'home.home', {}, 'satchmo_shop_home'), ... ) On Sunday, March 25, 2012 12:49:33 AM UTC-7, Kev Dwyer wrote: > > easypie wrote: > > > I'm trying to check {% if homepage %} then show {% endif %} > > > > I'm not sure how to go about a test to check the current page if it's my > > homepage. Do I need to mess around with context processors? What's the > > usual way of doing it? And how would the {% if ... %} look like? > > > > Assuming your home is named "home" in your urls.py, you could try: > > {% url home as home %} > > {% if request.path == home %}{% endif %} > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/Hizfo9TSvBIJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
How to Detect Current Page as Homepage?
I'm trying to check {% if homepage %} then show {% endif %} I'm not sure how to go about a test to check the current page if it's my homepage. Do I need to mess around with context processors? What's the usual way of doing it? And how would the {% if ... %} look like? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/0e6Qif6N9QQJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.