3rd Party Auth or Session Management

2009-10-05 Thread MD
I have an environment where users come into a portal that's running on top of a SUN Glassfish server using OpenSSO on the back end. Users authenticate to this SUN system and get a session token. Is there a way to have Django use that session token and LDAP server instead of using the Django databa

Re: Tutorial: __unicode__ not working in django 1.1

2009-10-05 Thread Jonah
Thanks for the replay Tim. I turns out I just need to restart the python command line. By not working, I had meant that the string representation of the object was the default, non-descriptive one, rather than the one created by invoking __unicode__. --~--~-~--~~~---~

Re: Tutorial: __unicode__ not working in django 1.1

2009-10-05 Thread Tim Bowden
On Mon, 2009-10-05 at 19:17 -0700, Jonah wrote: > I am working through the first tutorial, and ran into my 1st problem > in this section: > > http://docs.djangoproject.com/en/dev/intro/tutorial01/#playing-with-the-api > > where we add __unicode__ methods to our models. for example: > > class P

Tutorial: __unicode__ not working in django 1.1

2009-10-05 Thread Jonah
I am working through the first tutorial, and ran into my 1st problem in this section: http://docs.djangoproject.com/en/dev/intro/tutorial01/#playing-with-the-api where we add __unicode__ methods to our models. for example: class Poll(models.Model): # ... def __unicode__(self):

PIL or an error elsewhere?

2009-10-05 Thread tdelam
Hey, I keep receiving this message on the production server when I try to upload an image through the admin interface: Upload a valid image. The file you uploaded was either not an image or a corrupted image. Does anyone have a suggestion as to why? I was told it could be a PIL issue not compiled

Re: Designing django projects.

2009-10-05 Thread buttman
oh cool, I'm uploading the code right now to github, the link is here: http://github.com/nbv4/flightloggin Maybe check it out and see if you're interested? It uses a lot of GeoDjango stuff, so PostGIS is probably required also. On Oct 5, 7:22 pm, indyplanets wrote: > I'm a Web Designer who's le

Re: Designing django projects.

2009-10-05 Thread Kevin Teague
On Oct 5, 3:53 pm, nbv4 wrote: > Also, once I do find a designer, how are they going to submit their > work? The django template was designed to be ultra simple and designer > friendly, but that whole philosophy is underminded by the fact that in > order to get the system up and running, you h

Re: Designing django projects.

2009-10-05 Thread indyplanets
I'm a Web Designer who's learning Django. I need more practice and work for building my portfolio. Already have a working installation of Django and postgresql. Depending on the size of the project we might be a good fit. Portfolio: http://luckyonedesign.com Email: ja...@luckyonedesign.com O

Designing django projects.

2009-10-05 Thread nbv4
I am just about ready to launch my django project that I've been working on for the past couple months. One of the things I wanted to do was have an actual graphic designer do it, so it doesn't look like a programmer designed the site, if you know what I mean. First off, my site is free, so I can

GenericForeignKey and unique

2009-10-05 Thread Emiliano Heyns
Hi, I have a model class Document that I want to tie to several other model classes (Issue, Task, Project, ...) in a way that a document ties to exactly zero or one instance of the other model classes. Easiest would be to add a GenericForeignKey with a unique constraint, but the Document model cl

Re: Datefield auto_now_add not working with sqlite3?

2009-10-05 Thread Karen Tracey
On Mon, Oct 5, 2009 at 4:43 PM, Serdar wrote: > > Sqlite doesn't allow you to modify columns -- only add them, correct? > If that's the case, I think I'll have to add the column using SQL, and > then map to it in my model defintion, right? > > I don't know, I don't do much with sqlite except casu

Re: Architecture with multiple applications, context processors, utility methods

2009-10-05 Thread Daniel Roseman
On Oct 5, 9:58 pm, davisd wrote: > I have a question concerning django architecture with multiple > applications and combined views. > > A View accepts an HttpRequest and returns an HttpResponse. > > The flow for a view is: HttpRequest in from the visitor -> process -> > HttpResponse out to visit

Re: accessing media_url in javascript

2009-10-05 Thread Daniel Roseman
On Oct 5, 10:34 pm, "neri...@gmail.com" wrote: > I was interested in finding out how I would go about accessing django > vars in my javascript file i.e., media_url within javascript. Do I > need to use a serializer to achieve this? > > Thanks, > > Jason Just put a script element in your Django t

Architecture with multiple applications, context processors, utility methods

2009-10-05 Thread davisd
I have a question concerning django architecture with multiple applications and combined views. A View accepts an HttpRequest and returns an HttpResponse. The flow for a view is: HttpRequest in from the visitor -> process -> HttpResponse out to visitor. Assuming my end result is a page on the v

accessing media_url in javascript

2009-10-05 Thread neri...@gmail.com
I was interested in finding out how I would go about accessing django vars in my javascript file i.e., media_url within javascript. Do I need to use a serializer to achieve this? Thanks, Jason --~--~-~--~~~---~--~~ You received this message because you are subscri

Re: Datetime

2009-10-05 Thread Masklinn
On 5 oct. 2009, at 22:34, Serdar wrote: > >> what are all the attributes of datetime.datetime? >> > You generally have two options to explore built-in functions: > 1) You can look them up in the official Python documentation: > http://docs.python.org/library/datetime.html > 2) Probe them from the

Re: Datefield auto_now_add not working with sqlite3?

2009-10-05 Thread Serdar
> Django does not implement any defaults, including auto_now_add, by > specifying the default at the SQL level.  Rather Django ensures that the > default value is specified when it saves a row to the database. Aha! That explains it. > > So if you are going outside of Django to insert records, th

Re: Datetime

2009-10-05 Thread Serdar
> what are all the attributes of datetime.datetime? > You generally have two options to explore built-in functions: 1) You can look them up in the official Python documentation: http://docs.python.org/library/datetime.html 2) Probe them from the python command line using dir and various built- in

Re: Automatic {% load %} ?

2009-10-05 Thread Christophe Pettus
On Oct 4, 2009, at 10:14 PM, Vitaly Babiy wrote: > Hey take a look at this > http://stackoverflow.com/questions/1184983/load-a-django-template-tag-library-for-all-views-by-default Just the thing! Thanks. -- -- Christophe Pettus x...@thebuild.com --~--~-~--~~~-

Re: Datefield auto_now_add not working with sqlite3?

2009-10-05 Thread Karen Tracey
On Mon, Oct 5, 2009 at 3:52 PM, Serdar T. wrote: > > Hi everyone, > I'm having a problem with the "auto_now_add" option for DateField. > > I was under the impression that when you set this option, a datestamp > is set automatically for you. But when I try inserting records into my > database with

Re: Datetime

2009-10-05 Thread Gabriel .
On Mon, Oct 5, 2009 at 5:18 PM, Matt wrote: > > what are all the attributes of datetime.datetime? > > Like: > > time = datetime.datetime. You should read the python doc. http://docs.python.org/library/datetime.html -- Kind Regards --~--~-~--~~~---~--~~ Yo

Datetime

2009-10-05 Thread Matt
what are all the attributes of datetime.datetime? Like: time = datetime.datetime. class time_is_now(request): html = "It is now %s" % time return HttpResponse(html) And others? --~--~-~--~~~---~--~~ You received this message because you are

Re: How do I create project independent apps.

2009-10-05 Thread Kevin Teague
On Oct 5, 6:45 am, Johan wrote: > Actually the TEMPLATE_DIRS does nothing. In order to get my apps to > work outside of the project directory I edited the manage.py file and > added : > > import sys > sys.path.append('..\\..\\..\\django-apps\\trunk') > > This allows me to reference my applicati

Datefield auto_now_add not working with sqlite3?

2009-10-05 Thread Serdar T.
Hi everyone, I'm having a problem with the "auto_now_add" option for DateField. I was under the impression that when you set this option, a datestamp is set automatically for you. But when I try inserting records into my database without supplying a date for this field, I get a NULL value error:

Menu app roundup

2009-10-05 Thread ringemup
There seems to be a boatload of menu / navigation implementations out there... I was wondering if anyone had used any of the following and could comment on what they liked and disliked about them? Thanks! django-treemenus: http://code.google.com/p/django-treemenus/ django-navbar: http://code.goo

Re: Missing error report

2009-10-05 Thread Karen Tracey
On Mon, Oct 5, 2009 at 12:17 PM, bax...@gretschpages.com < mail.bax...@gmail.com> wrote: > > In my server logs, I'm seeing things like this: > [Mon Oct 05 11:00:01 2009] [error] Exception exceptions.TypeError: > "'NoneType' object is not callable" in > ignored > > > But I'm NOT getting an error r

Re: Django comments

2009-10-05 Thread cirip
Mike, Thanks. Well I understand that I can add extra field. That's not my problem. My problem is that I want to be able to add comment without having to create an instance of the object that comments refers to. For example for render the form I shall use: {% get_comment_count for config.commentt

Python/Django position in Newport Beach, CA

2009-10-05 Thread rosan
Structure Networks is in search of Sr. Web Applications Developers for our client in Newport Beach, CA. Structure Networks is one of Orange County's fastest growing IT Staffing companies. Term: Contract to hire or Direct hire 3 positions available We are seeking 3 Python (DJANGO) programmers wi

Re: "manage.py syncdb" fails when called via SCons

2009-10-05 Thread Ralph Heinkel
ok, guys, it was indeed the environment, thanks for 'forcing' me again to look at it. However, the reason was different: One module expects a different environment variable to be set, and unfortunately crashed with this variable missing. Of course, failing modules will just be silently ignored dur

Re: "manage.py syncdb" fails when called via SCons

2009-10-05 Thread Bill Freeman
Before you start python (assuming *nix, including os/x), type: $ which python Then, in the subshell, before starting python, type the same thing. Compare. Bill On Mon, Oct 5, 2009 at 12:02 PM, Ralph Heinkel wrote: > > Hi, > > I just checked the environment for PYTHONPATH, it is neither s

Re: "manage.py syncdb" fails when called via SCons

2009-10-05 Thread Tom Evans
On Mon, 2009-10-05 at 09:02 -0700, Ralph Heinkel wrote: > Hi, > > I just checked the environment for PYTHONPATH, it is neither set in > the parent nor in the subshell. > > Actually, I can reduce the problem to this: > > 1. In my unix shell I start the python interpreter > 2. in Python: import

Re: Models in a package & syncdb

2009-10-05 Thread JF Simon
Ooops, it's me ... these tricks work perfectly, sorry ! On 5 oct, 17:37, JF Simon wrote: > I made some tests, it seems that imports don't work. > > In th __init__ I tried: > from project.app.models.module import Class > ... and Class is not imported > > Is the project package in the python's pa

Re: More Reverse Method Woes

2009-10-05 Thread Streamweaver
Okay, I think I've figured this out with the help of a co-worker and WOW would I never have gotten this on my own and nobody would have been able to get it from the code I posted here. It's important enough to post the problem here. This problem came out of using the RSS syndication framework in

Missing error report

2009-10-05 Thread bax...@gretschpages.com
In my server logs, I'm seeing things like this: [Mon Oct 05 11:00:01 2009] [error] Exception exceptions.TypeError: "'NoneType' object is not callable" in > ignored But I'm NOT getting an error report emailed to me for anything like this. I'm getting emails, but nothing like this, and nothing at

Re: "manage.py syncdb" fails when called via SCons

2009-10-05 Thread Ralph Heinkel
Hi, I just checked the environment for PYTHONPATH, it is neither set in the parent nor in the subshell. Actually, I can reduce the problem to this: 1. In my unix shell I start the python interpreter 2. in Python: import os; os.system('/bin/bash') 3. In the just opened subshell: python manag

Re: Will it lost some features(middleware/contextprocessor) of Django when using Jinja2 ?

2009-10-05 Thread John Wang
Thanks Kristaps , I finally found the http://github.com/dcramer/coffin coffin package is just what i need. It works well as far as context processor and middleware are concerned. Kristaps Kūlis wrote: > > Hi! > You can use RequestContext (and also middlewares and context processor). > Just

Re: Models in a package & syncdb

2009-10-05 Thread JF Simon
I made some tests, it seems that imports don't work. In th __init__ I tried: from project.app.models.module import Class ... and Class is not imported Is the project package in the python's path as call manage.py syncdb ? GRRR On 5 oct, 17:24, JF Simon wrote: > Hi, > > I tried in vain to ma

Models in a package & syncdb

2009-10-05 Thread JF Simon
Hi, I tried in vain to make it work !!! I've got some models modules in a pckage named "models" in my app, I tried these 2 solutions (who are mostly the sames) : - http://www.acooke.org/cute/UsingaDire0.html - http://www.ifisgeek.com/2009/01/26/splitting-django-models-into-separate-files/ So: -

Re: No distinction on user status on form.is_valid() when using AuthenticationForm

2009-10-05 Thread Gerard
Must have missed that somehow. Thanx Karen. Regards, Gerard. Karen Tracey wrote: > On Mon, Oct 5, 2009 at 6:46 AM, Gerard > wrote: > > > Hi All, > > When checking form validity with > >form.is_valid() > after > >form = Authent

Releasing django-calais v0.2

2009-10-05 Thread Jesse Legg
I've finally posted a reusable django project I've been working on called django-calais. It is a full interface to the Open Calais semantic web API. It lets you pass any Django model to the Calais service for semantic analysis and stores the results for future use sorting, slicing, etc. Here's th

Re: "manage.py syncdb" fails when called via SCons

2009-10-05 Thread Tom Evans
On Mon, 2009-10-05 at 15:52 +0200, Ralph Heinkel wrote: > Hi, > > We have an automatic build system with scons and through this we want > to initialize djangos tables. > > This is a weird problem: > - If I run "python manage.py syncdb" from my unix shell, >all tables are nicely created. > -

Re: How do I create project independent apps.

2009-10-05 Thread Nan
You can move your apps outside your project to somewhere on your python path. So for instance, move the directory from some-path/ mysite/myapp to some-path/myapp . Then install it as "myapp" instead of "mysite.myapp" and change your imports to "from myapp.models" (etc) instead of "from mysite.my

Re: Run a filter on path in {% extends %} tag?

2009-10-05 Thread Nan
That still requires either the view or context processor to somehow know which layout each inner template extends (the 1-column version? the 3-column version? etc.), which is something I'd prefer the inner template to know. On Oct 4, 6:42 pm, Kristaps Kūlis wrote: > Hello, > Just use Request

Re: How to pass values between views/templates

2009-10-05 Thread Bill Freeman
On Fri, Oct 2, 2009 at 9:16 PM, adelaide_mike wrote: > > Hi > In my app the user needs to drill down through a series of templates > and their views to identify a house.  We start with the city, then the > street and finally the house, in each case chosen from a rendering of > the possible values

"manage.py syncdb" fails when called via SCons

2009-10-05 Thread Ralph Heinkel
Hi, We have an automatic build system with scons and through this we want to initialize djangos tables. This is a weird problem: - If I run "python manage.py syncdb" from my unix shell, all tables are nicely created. - If run run the same command from a SConstruct script, only django's sy

Re: How do I create project independent apps.

2009-10-05 Thread Johan
Actually the TEMPLATE_DIRS does nothing. In order to get my apps to work outside of the project directory I edited the manage.py file and added : import sys sys.path.append('..\\..\\..\\django-apps\\trunk') This allows me to reference my applications from a central site (django-apps\\trunk) ...

How do I create project independent apps.

2009-10-05 Thread Johan
Good day I want to develop an application in django which can be used in multiple django sites/projects. The one approach is to create one project (mysite) and then to create the application in the site project (myapp). The application is then added to the project via the settings file with INSTA

Re: No distinction on user status on form.is_valid() when using AuthenticationForm

2009-10-05 Thread Karen Tracey
On Mon, Oct 5, 2009 at 6:46 AM, Gerard wrote: > > Hi All, > > When checking form validity with > >form.is_valid() > after > >form = AuthenticationForm(data=request.POST) > > I get a False when the user is set to inactive. One would think a form can > be valid besides a user being

Models for a hockey database

2009-10-05 Thread c!w
Hi, I trying to create a hockey database, based on Django. The heaviest part so long is to define the structure of my models. There I need some help. What I have so far.. class Team(models.Model): name = models.CharField(max_length=60) class Player(models.Model): surname = models.CharFie

nested inlines

2009-10-05 Thread Marek Pietrucha
Hello, Has anyone achieved something like nested inlines in the admin pages? Does anybody know about solutions to this matter? I know there is a patch for older versions of django but not only there are no new ones but also they didn't support editing (which makes it unusable). best regards, mp

Re: Is it possible to use custom template tag inside another tag?

2009-10-05 Thread Andrius A
Thanks for advice! On Oct 4, 2009 9:23 PM, "AmanKow" wrote: > custom tag is a function - cant you just assing its return in view > into variable and send this... The usual way to go about this would be to modify your tag to take an optional "as var_name". When the tag has the optional portion,

Re: syndication feed framework - how to reverse the urls?

2009-10-05 Thread Russell Keith-Magee
On Mon, Oct 5, 2009 at 6:31 PM, anentropic wrote: > > So I just have to hard-code the feed urls in my templates? In short, yes. The feeds framework predates the introduction of named URLs in Django, and as a result the original implementation didn't include named urls. The feeds framework is ba

Re: Django running on Apache+WSGI and apache SSL proxy

2009-10-05 Thread Graham Dumpleton
On Oct 5, 9:42 pm, Fabrizio Buratta wrote: > 2009/10/3 Graham Dumpleton : > > > You still didn't post your mod_wsgi configuration. You only posted > > your WSGI script file. I am talking about the WSGIScriptAlias you are > > using in the Apache configuration files and any associated directives.

No distinction on user status on form.is_valid() when using AuthenticationForm

2009-10-05 Thread Gerard
Hi All, When checking form validity with form.is_valid() after form = AuthenticationForm(data=request.POST) I get a False when the user is set to inactive. One would think a form can be valid besides a user being disabled. The reason, I want a seperate error messages for inco

Re: Django running on Apache+WSGI and apache SSL proxy

2009-10-05 Thread Fabrizio Buratta
2009/10/3 Graham Dumpleton : > You still didn't post your mod_wsgi configuration. You only posted > your WSGI script file. I am talking about the WSGIScriptAlias you are > using in the Apache configuration files and any associated directives. > sorry! This is my current configuration : # Activat

Re: syndication feed framework - how to reverse the urls?

2009-10-05 Thread anentropic
So I just have to hard-code the feed urls in my templates? On Sep 30, 3:23 pm, anentropic wrote: > Anyone?  Is it possible to reverse those urls? > > The feeds framework implementation seems like a dirty hack to urls.py > (but otherwise works great!) > > On Sep 29, 4:57 pm, anentropic wrote: >