How to add permission to specific objects?

2005-11-27 Thread [EMAIL PROTECTED]
Hi, I've been reading the django authentication document, and found the following words: Permissions are set globally per type of object, not per specific object instance. For example, it's possible to say "Mary may change news stories," but it's not currently possible to say "Mary may change new

customizing admin

2005-11-27 Thread Medium
hi, i'm very new to django (basically a few days) and have read almost all the docs, wikis and mailing list archives (well the topics which interest me at least). I have a few questions I was hoping anyone on the list could help me with concerning customizing the behaviour of the admin inter

Re: admin and auto total rows

2005-11-27 Thread Medium
Adrian Holovaty wrote: On 11/27/05, Medium <[EMAIL PROTECTED]> wrote: Also, i've been hearing about this new admin and reusing of the admin code, but cannot find any examples. Are there any at the moment ? We'll have docs within a couple of days. Adrian -- Adrian Holovaty holovaty.

Re: admin and auto total rows

2005-11-27 Thread Adrian Holovaty
On 11/27/05, Medium <[EMAIL PROTECTED]> wrote: > Also, i've been hearing about this new admin and reusing of the admin > code, but cannot find any examples. Are there any at the moment ? We'll have docs within a couple of days. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicag

admin and auto total rows

2005-11-27 Thread Medium
hi, I was just wondering if there was a feature in the admin tool to specify a total row on particular columns ? Also, i've been hearing about this new admin and reusing of the admin code, but cannot find any examples. Are there any at the moment ? thanks Huy

Re: "Please correct the errors below." is displayed without actual errors

2005-11-27 Thread stava
Wouldn't "ediatble=False" on a required field give this error?

Re: Autoreload reloading for every request

2005-11-27 Thread Richie Hindle
[Eugene] > I tried to reproduce what you reported and it does work like you said. > Probably something was broken some time ago. Please file a ticket. Thanks for reproducing it. I've filed ticket #937. -- Richie Hindle [EMAIL PROTECTED]

Re: Autoreload reloading for every request

2005-11-27 Thread Eugene Lazutkin
I tried to reproduce what you reported and it does work like you said. Probably something was broken some time ago. Please file a ticket. Thanks, Eugene "Richie Hindle" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Hi, > > I've just updated to the current trunk, and the auto

Autoreload reloading for every request

2005-11-27 Thread Richie Hindle
Hi, I've just updated to the current trunk, and the autoreload code is firing on every request I make to my developent server. The timestamps it's reading differ by one hour between reads, even though the file hasn't changed. I added this to autoreload.py at the point it decides something has c

Re: mod_python log

2005-11-27 Thread stava
Well, thanks for the input, couldn't get it to work though. I put a few "print >> sys.stderr..." in there, shows up as per usual when running the django server, but they don't show up anywhere in the apache logs. Maybe there's some httpd.conf dependency, I'm running SuSE 9.3 with minimal tweaks. /

Re: mod_python log

2005-11-27 Thread stava
OK, I see, thanks Adrian! /L

Re: Hiding fields in admin interface

2005-11-27 Thread pgross
Thanks, that's really helpful. I missed that argument when I was going through the docs.

Re: ANN: New document: How to serve static files

2005-11-27 Thread Adrian Holovaty
On 11/27/05, Christopher Lenz <[EMAIL PROTECTED]> wrote: > > How to serve static files > > http://www.djangoproject.com/documentation/static_files/ > > Can you maybe elaborate on why this approach is considered insecure? Mainly because it hasn't been security-audited, doesn't have any error handl

Re: Hiding fields in admin interface

2005-11-27 Thread oggie rob
> The core of my problem is that the foreign key field points to a table that is huge (tens of thousands of values). Ahh, that makes it much easier! You can put the foreign key in there with the field argument "raw_id_admin=True". It will be much quicker to load and much cleaner to use. class Po

Re: Per-user data: any pointers?

2005-11-27 Thread David Ascher
On 11/27/05, Robert Wittams <[EMAIL PROTECTED]> wrote: The best way to do this is to have a ForeignKey to auth.User on the toplevel object of your per user data. Thanks, that's what I ended up doing last night. And then do the permission checking in your view functions. This can beeased by adding

Re: generic views + new admin templates

2005-11-27 Thread stava
I just don't get it (newbie:). Isn't there a way of using generic views together with the recently separated admin templates? In order to learn/understand: I'm taking a small part of my model, the Country() class with two fields (country_code and country_name); I copy the appropriate templates (ch

Re: Hiding fields in admin interface

2005-11-27 Thread pgross
I get the same problem with this field. It doesn't show up in the admin interface, but when I try to save the object, it blanks the field and tries to update it in the database. Since the field I want hidden is a foreign key, the update statement dies saying "ERROR: invalid input syntax for inte

Re: mod_python log

2005-11-27 Thread Christopher Lenz
Am 27.11.2005 um 14:53 schrieb Adrian Holovaty: On 11/27/05, stava <[EMAIL PROTECTED]> wrote: But what I'm really looking for is DEBUG capabilities when using mod_python, i.e. I would like to be able to see my print statements embedded in "if DEBUG:" and especially the db queries timings (which

Re: ANN: New document: How to serve static files

2005-11-27 Thread Christopher Lenz
Am 27.11.2005 um 15:48 schrieb Adrian Holovaty: A commonly asked question is how to serve static files with Django. Here's the answer, finally documented. How to serve static files http://www.djangoproject.com/documentation/static_files/ Can you maybe elaborate on why this approach is conside

Re: "Please correct the errors below." is displayed without actual errors

2005-11-27 Thread Robert Wittams
Ksenia wrote: > Hi, > > I have quite a big form, with all kind of fileds. All fields might be > blank, so i use everywhere blank=True and with integer- float- and > datefields also null=True. > When I am trying to save existed record, I get the message "Please > correct the errors below.", but no

Re: ANN: New document: How to serve static files

2005-11-27 Thread Fat
it's very useful! good job

"Please correct the errors below." is displayed without actual errors

2005-11-27 Thread Ksenia
Hi, I have quite a big form, with all kind of fileds. All fields might be blank, so i use everywhere blank=True and with integer- float- and datefields also null=True. When I am trying to save existed record, I get the message "Please correct the errors below.", but no errors! I am using svn ver

ANN: New document: How to serve static files

2005-11-27 Thread Adrian Holovaty
A commonly asked question is how to serve static files with Django. Here's the answer, finally documented. How to serve static files http://www.djangoproject.com/documentation/static_files/ Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: static media using development server?

2005-11-27 Thread Adrian Holovaty
On 11/26/05, Igor Goryachev <[EMAIL PROTECTED]> wrote: > Is it possible to serve static media using internal development > webserver and options like that: I see you've already figured it out, but I've added a document that explains this in detail, because it's a commonly-asked question. Here it

Re: generic views + new admin templates

2005-11-27 Thread Robert Wittams
stava wrote: > I'm trying to use generic views together with the newly separated admin > templates, but it's failing miserably. > > I specify the generic view I want to use in url.py: > countries = { > 'app_label': 'ttime', > 'module_name': 'countries', > } > urlpatterns = patterns('', > (r

Re: mod_python log

2005-11-27 Thread Adrian Holovaty
On 11/27/05, stava <[EMAIL PROTECTED]> wrote: > But what I'm really looking for is DEBUG capabilities when using > mod_python, i.e. I would like to be able to see my print statements > embedded in "if DEBUG:" and especially the db queries timings (which > are available somehow?). I do most of the

Re: Per-user data: any pointers?

2005-11-27 Thread Robert Wittams
David Ascher wrote: > I'm trying to figure out how best to do per-user data (think of the > relationship between users and her photos on flickr). > > I notice that there's a nifty concept of "permissions", which in some ways > is per-user binary data. There is also the mostly undocumented (?) >

generic views + new admin templates

2005-11-27 Thread stava
I'm trying to use generic views together with the newly separated admin templates, but it's failing miserably. I specify the generic view I want to use in url.py: countries = { 'app_label': 'ttime', 'module_name': 'countries', } urlpatterns = patterns('', (r'^countries/$', 'django.views

Re: A question

2005-11-27 Thread stava
Well, being a newbie, I'm not sure of the best way to do this, but here's one solution I use myself: the view (.../views/reports.py): from django.views.decorators.auth import login_required @login_required def index(request): return render_to_response('ttime/reports', {'title' : 'Reports'}) fr

Re: mod_python log

2005-11-27 Thread stava
Yup, that's great, thank you. But what I'm really looking for is DEBUG capabilities when using mod_python, i.e. I would like to be able to see my print statements embedded in "if DEBUG:" and especially the db queries timings (which are available somehow?). I do most of the debugging using the dja