Re: Django apache mod_wsgi permission denied

2012-11-30 Thread Loai Ghoraba
okay it works now, I was just missing a trailing slash at Alias /static/ /home/loai/workspace/Faculty/Faculty/static/ On Sat, Dec 1, 2012 at 8:17 AM, Loai Ghoraba wrote: > a strange thing is that when I remove the directive so it > becomes: > > > Order deny,allow > Allow

Re: django1.5 subclass AbstractUser, How to get a password-(re)set field in admin

2012-11-30 Thread Bruce Wade
Hi Russ, Thanks that did solve the problem I was having. -- Regards, Bruce On Fri, Nov 30, 2012 at 9:32 PM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > Hi Bruce, > > Update your Django checkout. This problem was fixed in 0fc5878c. > > Yours, > Russ Magee %-) > > > On Fri, Nov 30,

Re: Django apache mod_wsgi permission denied

2012-11-30 Thread Loai Ghoraba
a strange thing is that when I remove the directive so it becomes: Order deny,allow Allow from all instead of Order deny,allow Allow from all then trying to access any static or media file raises (not found) instead of permission denied ! On Sat, Dec 1, 2012 at 7:42 AM, Loai Ghoraba

Re: Django apache mod_wsgi permission denied

2012-11-30 Thread Loai Ghoraba
thanks, but still I can't find what's wrong with the permission thing. The html pages are loaded without static content, no css or js or whatever, neither the media is accessible. On Sat, Dec 1, 2012 at 7:15 AM, Mike Dewhirst wrote: > On 1/12/2012 3:57pm, Loai Ghoraba

Re: django1.5 subclass AbstractUser, How to get a password-(re)set field in admin

2012-11-30 Thread Russell Keith-Magee
Hi Bruce, Update your Django checkout. This problem was fixed in 0fc5878c. Yours, Russ Magee %-) On Fri, Nov 30, 2012 at 2:07 PM, Detectedstealth wrote: > Hi Russel, > > I have followed > https://docs.djangoproject.com/en/dev/topics/auth/#a-full-example then > added: > >

Re: calling the view function in the other view function

2012-11-30 Thread Satinderpal Singh
On Sat, Dec 1, 2012 at 4:45 AM, Chris Cogdon wrote: > It's generally very messy for one "view" function to call another. Then what is the fun of making the function, if it is not reusable. > > Better solution is to factorise out the common parts into a third function, > then

Re: Django apache mod_wsgi permission denied

2012-11-30 Thread Mike Dewhirst
On 1/12/2012 3:57pm, Loai Ghoraba wrote: thanks, but I have tried this now and it also doesn't work :X though the author slides presentation mentioned chmod o+rx on the root dir only. On Sat, Dec 1, 2012 at 6:53 AM, Mike Dewhirst > wrote:

Re: Django apache mod_wsgi permission denied

2012-11-30 Thread Mike Dewhirst
On 1/12/2012 3:48pm, Loai Ghoraba wrote: I have ran chmod o+rx on the root directory, isn't this enough (isn't chmod applied to all folders down recursively ?) ? No. You need chmod -R o+rx and I have checked the directories from the root down to static, all have the permission of

Re: Django apache mod_wsgi permission denied

2012-11-30 Thread Loai Ghoraba
I have ran chmod o+rx on the root directory, isn't this enough (isn't chmod applied to all folders down recursively ?) ? and I have checked the directories from the root down to static, all have the permission of drwxr-xr-x On Sat, Dec 1, 2012 at 2:21 AM, Chris Cogdon wrote:

[Django 1.3] list_display, __unicode__ and sorting

2012-11-30 Thread Micky Hulse
Hello, Would the below be an OK way to sort __unicode__ in the admin list_display? Model: def uni_sort(self): return self.__unicode__() uni_sort.admin_order_field = 'sort' uni_sort.short_description = _(u'name') Admin: list_display = ('uni_sort', 'parent', 'name', 'slug',) ... To save

Re: Django apache mod_wsgi permission denied

2012-11-30 Thread Chris Cogdon
Make sure all the directories, from static leading all the way up to the root, are chmod a+x On Friday, November 30, 2012 4:00:55 PM UTC-8, Loai Ghoraba wrote: > > Hi > > I have installed apache and mod_wsgi and my basic site *skeleton is > running* on local host, but with NO static files

Django apache mod_wsgi permission denied

2012-11-30 Thread Loai Ghoraba
Hi I have installed apache and mod_wsgi and my basic site *skeleton is running* on local host, but with NO static files loaded such as css, when I try to access a static file (e.g:http://localhost/static/css/base.css) it says that I don't have permission to access the file, same goes to media

Re: Noobe alert

2012-11-30 Thread Gerald Klein
Hey and thanks for the post, I actually posted this back on saturday and I figured it out, actually the way you are saying but it wasn't the permissions. I had to much info, the url going into nginx had two static directories next to each other, at first I tried to remove one but I decided to go

Re: how to use named urls from apps

2012-11-30 Thread Chris Cogdon
And, don't forget, the form is: {% load url from future %} {% url 'auth_login' %} OR {% url auth_login %} The former is highly recommend, as the latter is deprecated and will become the default in a future Django release. If you ever get messages such as "view not found for reverse"... this

Re: admin foreign key issues

2012-11-30 Thread Chris Cogdon
> class CategoryAdmin(admin.ModelAdmin): > list_display = ('name') > list_filter = ('name') > admin.site.register(Category, CategoryAdmin) > > But that fails with 'CategoryAdmin.list_display' must be a list or tuple. > use: list_display = ('name',) Note the trailing comma,

Re: calling the view function in the other view function

2012-11-30 Thread Chris Cogdon
It's generally very messy for one "view" function to call another. Better solution is to factorise out the common parts into a third function, then make sure each of your two "view" functions have the required render_to_response. Also, I highly recommend using the "render" shortcut, which

Re: Noobe alert

2012-11-30 Thread Chris Cogdon
Check the error log for nginx to see if there's any hint of why the statics aren't showing up. My best guess is that the web server is running as a user that does not have access to the files, and the error log should be showing up with various "permission denied" messages. The usual culprit

Re: Thumbnail resizing issue, strange behavior

2012-11-30 Thread Tom Evans
On Fri, Nov 30, 2012 at 6:45 PM, Mo J. Al-Mughrabi wrote: > Hi, > > I've been trying to resolve this issue for a day without luck, its > very strange error, i tried to post it on stackoverflow but still no > luck. > > >

Thumbnail resizing issue, strange behavior

2012-11-30 Thread Mo J. Al-Mughrabi
Hi, I've been trying to resolve this issue for a day without luck, its very strange error, i tried to post it on stackoverflow but still no luck. http://stackoverflow.com/questions/13629099/getting-cannot-identify-image-file-when-trying-to-create-thumbnail-in-django -- You received this

Re: Drop foreign key, add another - keep data

2012-11-30 Thread Tom Evans
On Fri, Nov 30, 2012 at 11:56 AM, Peter Edström wrote: > Hello, > > I'd like to drop a ForeignKey-field and add another using south (mysql > database), but it won't work. Googling it takes me not far, but it seems to > be a problem with dropping foreign key constraints with

Drop foreign key, add another - keep data

2012-11-30 Thread Peter Edström
Hello, I'd like to drop a ForeignKey-field and add another using south (mysql database), but it won't work. Googling it takes me not far, but it seems to be a problem with dropping foreign key constraints with InnoDB. What is the recommended way ot dropping a ForeignKey-field, and adding