Re: Problem with AD (LDAP) authentication

2009-07-09 Thread TechnicalBard
Have discovered what works - but it goes against the docs... I needed to set User.is_active = True. The permissions for admin (has_perm) appears to check this flag and returns False for inactive users. Problem solved. On Jul 9, 10:15 am, TechnicalBard <rodwe...@gmail.com> wrote:

Re: Problem with AD (LDAP) authentication

2009-07-09 Thread TechnicalBard
Alas - that doesn't make a difference... On Jul 8, 4:29 pm, Frédéric Hébert <fg.heb...@gmail.com> wrote: > Hi, > >  Maybe,  should you put is_staff=True : > > http://docs.djangoproject.com/en/dev/topics/auth/#users > > Regards, > > Frédéric > > 200

Problem with AD (LDAP) authentication

2009-07-08 Thread Technicalbard
I'm trying to write an Active Directory / LDAP authenication, and I'm having problems. The code is at: http://dpaste.com/hold/64752/ When I set this authentication and then try to go to http://localhost:8000/admin and login to the development server, it authenticates against the LDAP server

Re: Efficiency of getting attribute values in templates

2009-07-04 Thread TechnicalBard
<rajesh.dha...@gmail.com> wrote: > On Jul 4, 6:30 pm, TechnicalBard <rodwe...@gmail.com> wrote: > > > Is there a way to pass an object to the template and have the template > > handle all of the attributes without hardcoding them into the > > template? > > Depends

Re: Efficiency of getting attribute values in templates

2009-07-04 Thread TechnicalBard
Is there a way to pass an object to the template and have the template handle all of the attributes without hardcoding them into the template? On Jul 3, 10:04 am, Rajesh D wrote: > On Jul 3, 9:17 am, Nikola Pavlović wrote: > > > > > > > Hello people,

Re: How does admin generate HTML for adding objects?

2009-07-03 Thread TechnicalBard
Thanks! Related question: when displaying a ModelForm, how does Django iterate/enumerate how many fields the model has? On Jul 3, 1:16 am, Jonathan Buchanan <jonathan.bucha...@gmail.com> wrote: > On Fri, Jul 3, 2009 at 6:06 AM, TechnicalBard<rodwe...@gmail.com> wrote: &

Re: How does admin generate HTML for adding objects?

2009-07-02 Thread TechnicalBard
ld has the label “Publication date.” >> Where in the django.contrib.admin code is this logic found? I would like to utilize it. On Jul 2, 4:02 pm, Technicalbard <rodwe...@gmail.com> wrote: > I'm curious how the admin creates the templates for any object in the > d

How does admin generate HTML for adding objects?

2009-07-02 Thread Technicalbard
I'm curious how the admin creates the templates for any object in the database... I'm using the object_detail generic view, but would prefer having Django use the parameters of the object to generate the template, rather than me having to hardcode the parameter names into the template. The

Problem with generic views

2009-06-26 Thread Technicalbard
Hey all, I did the tutorial, yet when I try to apply what I've learned (or think I've learned), to my own application it doesn't work... My code looks like this: # taskmgr/models.py class Task(models.Model): name = models.CharField(max_length=216) summary =

Where to put form definitions?

2009-06-25 Thread Technicalbard
My reading of the documentation isn't clear on where form definitions could or should be defined. Is it better to define forms inside an apps views.py file, or should I put the form definitions into a separate forms.py file and import it into the views as necessary? The latter seems more

Re: Problem with startproject

2009-06-02 Thread TechnicalBard
django-admin is executable. The problem appears to be that django- admin doesn't have rights to the target directory... On Jun 2, 11:52 am, James Bennett <ubernost...@gmail.com> wrote: > On Tue, Jun 2, 2009 at 12:46 PM, Technicalbard <rodwe...@gmail.com> wrote: > > The pro

Problem with startproject

2009-06-02 Thread Technicalbard
OK - newb here (in more ways than one). I'm trying to get going on an Ubuntu VM (inside VirtualBox) and I installed Django via synaptic. The problem comes when I try to start the tutorial: mor...@morgan-laptop:~/www$ django-admin startproject mysite Error: [Errno 13] Permission denied:

New Project - want advice

2009-05-13 Thread Technicalbard
Hi, I'm planning a new project, and I want the following feature set (eventually). It will of course be rolled out in parts as apps are completed. The purpose of this is to manage knowledge in various domains. - wiki-type knowledge-base with full audit trail - threaded forum - embedding

MySQLdb for Python 2.6 on win32

2009-02-08 Thread Technicalbard
If you are looking for this, I compiled it using MSVC++2008 Express, against MySQL 5.0.67 using Python 2.6 and the MySQLdb 1.2.2 source: http://www.technicalbard.com/files/MySQL-python-1.2.2.win32-py2.6.exe Hope it helps anyone who was looking.

Re: Building local Django docs as HTML on Win32?

2009-01-31 Thread Technicalbard
/doctrees On win32: mkdir _build\html _build\doctrees and change this line: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build\html to use backslash instead of forward slash in the path at the end. And then it works like it should. On Jan 31, 1:50 pm, Technicalbard <rodwe...@gmail.com> wrote:

Building local Django docs as HTML on Win32?

2009-01-31 Thread Technicalbard
I've found a number of places on the net that tell me how to build myself a copy of Django documentation from the Restructured Text format, but they are all for Linux / BSD. Any advice on how to do this on Windows without Cygwin? --~--~-~--~~~---~--~~ You