Internal Error after chaning SITE domain name and modifying html file...?

2012-12-07 Thread easypie
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://dp

Re: User permisions

2012-12-07 Thread Mārtiņš Jakubovičs
Hello! Yes, I used what* *sacrac show: https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.save_model In my "Item" class I added "owner" charfield and in admin.py did this: class ItemAdmin(admin.ModelAdmin): ... # save user informati

Re: Django-filebrowser path problems

2012-12-07 Thread Felix Schlitter
Thanks for sharing! On Sunday, 6 February 2011 16:27:16 UTC+13, gerram wrote: > > I decided my problem! > If you use dynamic method for getting you path, example: > > import os > SITE_ROOT = os.path.realpath(os.path.dirname(__file__)) > MEDIA_ROOT = os.path.join(SITE_ROOT, 'media') > > you ca

Re: newbie going through basic tutorial

2012-12-07 Thread Blake West
Hi, I'm also a newb going through this tutorial and got stuck on the exact same thing. I'm using mac, but I also needed to put '.db' on it, and now it's working great! Thanks for posting up that solution! I was just fitzing with it the last half-hour to no avail. But now i got it! woo! On Wedne

g+ community

2012-12-07 Thread sebastián serrano
Hi, Google just released communities on g+ and I create one for django developers, if anyone wants to join the link is: https://plus.google.com/u/0/communities/106857602440479597679 If the django core team thinks someone from the team should own it, I'm open to transfer ownership or assign m

Re: Internal Error after chaning SITE domain name and modifying html file...?

2012-12-07 Thread Paul Backhouse
Is it a Site cache issue? https://docs.djangoproject.com/en/1.4/ref/contrib/sites/#caching-the-current-site-object Maybe try Site.objects.clear_cache() On Fri, 2012-12-07 at 00:03 -0800, easypie wrote: > I'm getting an 500 internal error. I did two things before this > happened. (1) I modified a

Re: Internal Error after chaning SITE domain name and modifying html file...?

2012-12-07 Thread Bill Freeman
Or, is there still a Site object in the database whose Id matches the one specified in settings.py? (It depends on how you changed the site object.) On Fri, Dec 7, 2012 at 7:42 AM, Paul Backhouse wrote: > Is it a Site cache issue? > > > https://docs.djangoproject.com/en/1.4/ref/contrib/sites/#ca

Re: Internal Error after chaning SITE domain name and modifying html file...?

2012-12-07 Thread Chris Cogdon
Run ./manage.py shell ... since that imports settings, that should also fail, and will perhaps give you more information Django isn't very good at showing you the "root cause" when a module fails to import, unfortunately, you might want to figure out a way of importing them manually and seeing

Django gracefully shutdown

2012-12-07 Thread Odagi
Hello! After lot of work I'm ready to deploy my site on production. I'll use Nginx with uWSGI or fastCGI (not sure yet), and my doubt is how can I shutdown my production Django app gracefully (for make changes for example). Of course I can kill django-python-fcgi processes and restart everyth

Re: Internal Error after chaning SITE domain name and modifying html file...?

2012-12-07 Thread easypie
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

Re: Internal Error after chaning SITE domain name and modifying html file...?

2012-12-07 Thread easypie
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 directo

Re: Internal Error after chaning SITE domain name and modifying html file...?

2012-12-07 Thread easypie
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,

Re: Internal Error after chaning SITE domain name and modifying html file...?

2012-12-07 Thread Chris Cogdon
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 Fr

Re: Django gracefully shutdown

2012-12-07 Thread Chris Cogdon
I would actually suggest using gunicorn to run django as a stand-along app server listening on localhost:some-local-port, and use nginx proxy passing to redirect queries to / to the local port. But that said, once a request is served, the listening processes are essentially idle. So, either jus

Re: Internal Error after chaning SITE domain name and modifying html file...?

2012-12-07 Thread easypie
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 r

Re: Django gracefully shutdown

2012-12-07 Thread Javier Guerra Giraldez
On Fri, Dec 7, 2012 at 3:25 PM, Odagi wrote: > I'll use Nginx with uWSGI or fastCGI (not sure yet), and my doubt is > how can I shutdown my production Django app gracefully (for make > changes for example). on the first paragraph of the new uWSGI docs page about reloads: "When running with the

Re: Internal Error after chaning SITE domain name and modifying html file...?

2012-12-07 Thread easypie
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

Model method versus overriding save()

2012-12-07 Thread Victor Hooi
Hi, I have a "ranking" field for an item that returns an integer between 1 to 10 based on a number of criteria of each item. My question is - what are the pros and cons of using a model method to return this, versus overriding the save() method and saving it directly into a normal IntegerField

Re: Model method versus overriding save()

2012-12-07 Thread Chris Cogdon
It's a simple performance vs storage question. Storing a calculatable field also risks it getting out of sync with reality, but if you're doing the query on that _so_ much, then its usualyl worth it. Also, with the right database and a trigger, that's something the database can ensure for you.

Re: Internal Error after chaning SITE domain name and modifying html file...?

2012-12-07 Thread easypie
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