Re: What's the new "field" parameter in the ManyToOneRel __init__ function?

2013-09-06 Thread Mark Young
For a little bit of context, here's an example of code that perviously worked but now doesn't: class CategoryAdminForm(forms.ModelForm): """Form for Category's Admin""" parent = TreeNodeChoiceField( label=_('Parent category'), level_indicator='|--', required=False,

Re: What is the best way to have multiple admin users with there own models?

2013-09-06 Thread Robert Steckroth
Ok, this question was typed in haste, my mistake. What I needed was an admin section for individual clients which could populate within the same database. By using separate admins, I was able to provide a superuser the ability to designate which database section he/she would have access to with a

Re: SimpleLazyObject for request.user not correctly evaluated inside RequestContext

2013-09-06 Thread Germán
What DB engine are you using? If it is PostgreSQL, you need to roll back the transaction after a database error exception (e.g. IntegrityError). By the way, I think what you are doing is wrong. If the form data is invalid, then you need to call . form_invalid On Friday, September 6, 2013

Re: How to redorder app

2013-09-06 Thread Germán
If you mean reordering *apps*, as in which order the different apps are arranged, I think there is no simple way. Reorder the models for an specific app ? Same answer. On Friday, September 6, 2013 3:16:59 AM UTC-5, Ranjith Kumar wrote: > > Hello, > I trying to reorder the app in django admin,

Re: Error when using python magic in the Django environment

2013-09-06 Thread Germán
Are you sure you are running the *exact same python interpreter*? Are you using virtual environments? On Friday, September 6, 2013 3:39:11 PM UTC-5, Edmond Murphy wrote: > > Running: > >- Python version 2.7.3 >- Django version 1.5.2 > > I have a django view that indirectly makes use

Re: What is the best way to have multiple admin users with there own models?

2013-09-06 Thread Germán
If I understood your question correctly, you want to create an additional admin site i.e. have more than one admin site, each one in different URLs. This is absolutely possible with stock Django, no need to copy directories or anything like that. What you need is to create another instance of

Re: Greyed out models in Django Admin

2013-09-06 Thread huw_at1
Ah great I can confirm that moving the admin model settings into a seperate admin.py file fixed the issue. I have to say though I'm not sure I understand why that issue occurs and also that I'm pretty sure I was following a recommended tutorial for setting up models in the admin. Thanks for

Geodjango and Kriging

2013-09-06 Thread Matthew Scotch
Hi, I am new to geodjango and was wondering if it has an API for kriging? So far I have not been able to find anything. Thanks, Matthew -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails

Re: What is the best way to have multiple admin users with there own models?

2013-09-06 Thread Dan Gentry
I would write views for the client to access their tables rather than using the built-in admin. Your situation is not really what the admin was designed to do. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group

Re: django security

2013-09-06 Thread Stefano Probst
Hi! Do you mean something like the documentation ? Best regards -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email

Re: call to render_to_response with RequestContext within a Generic View causes DatabaseError when resolving the user.is_authenticated template variable

2013-09-06 Thread giovanni allegri
I don't know what is happening but I've solved with a workaround: dummy = self.request.user.is_authenticated() calling is_authenticated before returning render_to_response solves the problem, because request.user is "casted" to the actual user instance, instead of remaining a

Error when using python magic in the Django environment

2013-09-06 Thread Edmond Murphy
Running: - Python version 2.7.3 - Django version 1.5.2 I have a django view that indirectly makes use of python's magic library (basically a ctypes wrapper with access to libmagic) which results in the following error Traceback (most recent call last): File "", line 1, in File

What's the new "field" parameter in the ManyToOneRel __init__ function?

2013-09-06 Thread Mark Young
(I can't really decide if this should go here or in django-dev, since I'm asking how to use a private class. If it'd fit better elsewhere, just let me know please.) Hi, I'm working on updating an app (not written by me (django-blog-zannia, for the curious)) to python 3.3 and django 1.6 . I've

Re: django security

2013-09-06 Thread Tom Lockhart
On 2013-09-06, at 4:04 PM, Natko Perko wrote: > > Obviously not and obviously I couldnt google it. Ah, of course. What is obviously not obvious to you is not obvious to the rest of us either. Please be specific on what you did find and what you feel you are missing.

Re: django security

2013-09-06 Thread Natko Perko
Obviously not and obviously I couldnt google it. Best Regards. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To

SimpleLazyObject for request.user not correctly evaluated inside RequestContext

2013-09-06 Thread giovanni allegri
I've opened a new thread, which relates to a previous onefrom me. Digging into a wired behaviour in a FormView I've arrived to the following problem: - In my "form_valid" method I need to manage exceptions situations. - In case

Re: So this needs to be fixed

2013-09-06 Thread Ramiro Morales
On Fri, Sep 6, 2013 at 1:29 PM, Robert Steckroth wrote: > Also, the manytomany field selector highlight is waaay to light. > > > On Fri, Sep 6, 2013 at 11:22 AM, Robert Steckroth > wrote: >> >> Why is the user permissions widget not

Re: So this needs to be fixed

2013-09-06 Thread Robert Steckroth
Also, the manytomany field selector highlight is waaay to light. On Fri, Sep 6, 2013 at 11:22 AM, Robert Steckroth wrote: > Why is the user permissions widget not re-sizing? I can hear it now... > > http://postimg.org/image/mcfbfhs83/ > > > > > -- >

So this needs to be fixed

2013-09-06 Thread Robert Steckroth
Why is the user permissions widget not re-sizing? I can hear it now... http://postimg.org/image/mcfbfhs83/ -- Systems/Software Engineer -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: Greyed out models in Django Admin

2013-09-06 Thread huw_at1
Ah ok thanks I will try that and update. On Thursday, 31 January 2013 22:56:05 UTC, huw_at1 wrote: > > Hi, > > Using Django 1.4, have registered 3 model classes with admin. When > accessing admin page provided by test server can select each class and edit > entries. However when accessing

Re: call to render_to_response with RequestContext within a Generic View causes DatabaseError when resolving the user.is_authenticated template variable

2013-09-06 Thread giovanni allegri
The problem seems to be related with SimpleLazyObject, wrapping the auth.user. If during debugging I access the function, everything works fine. It's enough to have the Variables windows open in PyDev. If I do not access it, it isn't resolved to the actual user instance (in my case

Re: Login not working.

2013-09-06 Thread Nigel Legg
I have removed the form.is_valid check and renamed the view, this now works (except for not directing to the correct page, it does appear to be logging in now) Thanks! Cheers, Nigel 07914 740972 On 6 September 2013 14:35, Nigel Legg wrote: > I am using

Re: Greyed out models in Django Admin

2013-09-06 Thread Laurent Meunier
Hi, Your issue seems to be like this one: http://stackoverflow.com/questions/12780740/no-access-to-models-in-admin-panel-with-debug-false Try to register your models in admin panel from a new file named 'admin.py' in the same folder as 'models.py'. Laurent On 16/08/2013 07:37, huw_at1

Re: Problème de création de mon projet (django-admin.py startproject mysite)

2013-09-06 Thread cingusoft
Hi Chenge your folder Now you are in the python/scripts folder that have restrictions To do that you need to add the scripts folder into the variable path and call the django-admin from another folder, for example your user document folder. BlackBerry de movistar, allí donde estés está tu

Login not working.

2013-09-06 Thread Nigel Legg
I am using django.contrib.auth, and have created the folowing: view: def login(request): if request.method == 'POST': form = AuthenticationForm(request.POST) if form.is_valid(): username = request.POST['username'] password = request.POST['password']

Re: Greyed out models in Django Admin

2013-09-06 Thread huw_at1
Attached a screenshot to show what I mean (photoshopped a couple of model names) On Friday, 6 September 2013 13:19:34 UTC+1, huw_at1 wrote: > > Hmm looks like the django user account has full permissions granted > although I am no expert with PostgreSQL. > > This is still an issue - any other

Re: Greyed out models in Django Admin

2013-09-06 Thread huw_at1
Hmm looks like the django user account has full permissions granted although I am no expert with PostgreSQL. This is still an issue - any other ideas? Has anyone else seen this before? Many thanks On Sunday, 18 August 2013 22:58:06 UTC+1, huw_at1 wrote: > > Hi, > > I'm using the latest Apache

django security

2013-09-06 Thread Natko Perko
hello, anyone got some links for in depth django security an built in django security thats explained for dummies? :) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an

call to render_to_response with RequestContext within a Generic View causes DatabaseError when resolving the user.is_authenticated template variable

2013-09-06 Thread giovanni allegri
I don't know if I'm following a wrong pattern in the context of Django. Inside my class views I need manage exceptions and I would like to pass the response workflow to an external method (my exceptions module). In my call I pass my ClassView.request variable to be able to use request context

Re: How to redorder app

2013-09-06 Thread Mehmet Gultas
I guess, you're searching for this . Mehmet Gültaş | Research Assistant | Department of Psychology | METU | +90-312-2105966 On Fri, Sep 6, 2013 at 11:16 AM, Ranjith Kumar

Re: How to redorder app

2013-09-06 Thread Sithembewena Lloyd Dube
If you are referring to reordering fields, yes it is possible. For details, see the official Django tutorial's section on setting up the admin site at https://docs.djangoproject.com/en/1.5/intro/tutorial02/ HTH. On Fri, Sep 6, 2013 at 10:16 AM, Ranjith Kumar wrote: >

How to redorder app

2013-09-06 Thread Ranjith Kumar
Hello, I trying to reorder the app in django admin, is there anyways we can do it via admin.py? Thank you! -- Cheers, Ranjith Kumar K, Chennai. http://ranjithtenz.wordpress.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Query executed two times in database (django 1.4, oracle 11g)

2013-09-06 Thread bikeridercz
Dear colleagues, I'm facing a problem probably related to caching infrastructure in DJango. Documentation says that data are fetched from DB once a then readed from cache. However, my results are different. Query is executed two times. On my opinion the first fetch should be enough. Here is

Re: Problem with translations

2013-09-06 Thread Doug
Follow-up: just for good measure could you tell me what you have in your settings for `LANGUAGE_CODE` and what languages you are trying to support? If by some small chance you are trying to support a language not apart of this set ,