Re: use a dsn for database details in settings.py ?

2006-05-04 Thread pbx
> Hi, I'm still new to django and have googled high and low for a way to > use a single dsn in the settings file instead of DATABASE_HOST, > DATABASE_USER, DATABASE_NAME, etc. No metion of it. Is there built > in support for this that I'm missing? > > If not, I am happy to submit a patch. +1. I

Model Inheritance

2006-05-04 Thread [EMAIL PROTECTED]
I want to use Model Inheritance, so I read this article http://code.djangoproject.com/wiki/ModelInheritance but it seems that it's only a proposal and has not been implemented, right? Does it mean that I can't use it at this time? What should I do? TIA. --~--~-~--~~~

Re: Render dictionary keys and values in a template?

2006-05-04 Thread Sam Tran
On 5/4/06, Eric Walstad <[EMAIL PROTECTED]> wrote: > > Is it possible to iterate over a dictionary in a django template, displaying > the dictionary values, without knowing the dictionary's keys beforehand? > > I want to simply list keys and values of a dictionary passed into a template, > but I h

Render dictionary keys and values in a template?

2006-05-04 Thread Eric Walstad
Is it possible to iterate over a dictionary in a django template, displaying the dictionary values, without knowing the dictionary's keys beforehand? I want to simply list keys and values of a dictionary passed into a template, but I haven't been able to figure out how. I'd like to do somethin

Re: Tutorial for MR

2006-05-04 Thread DavidA
But for every model? Sounds a little kludgy to have to add that to every model just to break them into separate files. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Re: Install woes: error "python: can't open file 'django-admin.py' "

2006-05-04 Thread Malcolm Tredinnick
On Fri, 2006-05-05 at 02:03 +, jbrewer wrote: > Used DarwinPorts to get sqlite3 and py-sqlite and I still am getting > the same error as above. I know it "just worked" for Glenn, but I am > all screwed up. > > I am on Mac OS X 10.4.6 and have all the normal set up, except for the > above and

Re: _post_save() problem with an empty file field

2006-05-04 Thread Adrian Holovaty
On 5/4/06, sam <[EMAIL PROTECTED]> wrote: > Django version 0.91. I was trying to generate a thumbnail for an image > upload. The image is a FileField. I want to generate thumbnail in > _post_save() of the model object. The code is something like the > following: > > class Item(meta.Model): > .

Re: Install woes: error "python: can't open file 'django-admin.py' "

2006-05-04 Thread jbrewer
Used DarwinPorts to get sqlite3 and py-sqlite and I still am getting the same error as above. I know it "just worked" for Glenn, but I am all screwed up. I am on Mac OS X 10.4.6 and have all the normal set up, except for the above and svn, and django which I installed yesterday. I am a bit over

Re: auth templates in the wrong directory in trunk?

2006-05-04 Thread Adrian Holovaty
On 5/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Is the idea that I should edit django/contrib/auth/__init__.py and > change the value of LOGIN_URL if I want the login page to be somewhere > other than '/accounts/login/'? > Can I override constants like this by setting them in my settings

Re: auth templates in the wrong directory in trunk?

2006-05-04 Thread [EMAIL PROTECTED]
Is the idea that I should edit django/contrib/auth/__init__.py and change the value of LOGIN_URL if I want the login page to be somewhere other than '/accounts/login/'? Can I override constants like this by setting them in my settings.py file, or are they in different namespaces? Learning Django

Re: Install woes: error "python: can't open file 'django-admin.py' "

2006-05-04 Thread jbrewer
Thanks Glenn. I will try SQlLite and see if that clears it up. You guys rock. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com

Re: Install woes: error "python: can't open file 'django-admin.py' "

2006-05-04 Thread Glenn Tenney
On Fri, May 05, 2006 at 12:32:23AM -, jbrewer wrote: > I have tried to install the MySQLdb and keep getting this error: > > error: command 'gcc' failed with exit status 1 1. Read http://www.djangoproject.com/documentation/install/ 2. Follow all of the comments talking about Mac OS X (this

Re: Install woes: error "python: can't open file 'django-admin.py' "

2006-05-04 Thread Joseph Kocherhans
On 5/4/06, jbrewer <[EMAIL PROTECTED]> wrote: > > I have tried to install the MySQLdb and keep getting this error: > > error: command 'gcc' failed with exit status 1 > > at the end of a bunch of stuff. > > When I do a "locate MySQLdb" command nothing comes back, so I am > assuming it isn't install

Re: Install woes: error "python: can't open file 'django-admin.py' "

2006-05-04 Thread jbrewer
I have tried to install the MySQLdb and keep getting this error: error: command 'gcc' failed with exit status 1 at the end of a bunch of stuff. When I do a "locate MySQLdb" command nothing comes back, so I am assuming it isn't installed. Correct? Any help would be much appreciated. --~--~---

Re: auth templates in the wrong directory in trunk?

2006-05-04 Thread [EMAIL PROTECTED]
Oh, I guess I have to roll my own myproject/templates/registration/login.html file. I'm basing this on GrumpySimon's comment in http://www.djangoproject.com/documentation/authentication/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Install woes: error "python: can't open file 'django-admin.py' "

2006-05-04 Thread Joseph Kocherhans
On 5/4/06, jbrewer <[EMAIL PROTECTED]> wrote: > > raise ImproperlyConfigured, "Could not load database backend: %s. > Is your DATABASE_ENGINE setting (currently, %r) spelled correctly? > Available options are: %s" % \ > django.core.exceptions.ImproperlyConfigured: Could not load database > bac

Re: Install woes: error "python: can't open file 'django-admin.py' "

2006-05-04 Thread jbrewer
Okay I got it fixed and created my site, but no when I try this command: python manage.py runserver this is what come up: Validating models... Unhandled exception in thread started by Traceback (most recent call last): File "/Library/Python/2.3/site-packages/Django-0.91-py2.3.egg/django/core/m

Re: use a dsn for database details in settings.py ?

2006-05-04 Thread Joseph Kocherhans
On 5/4/06, Kumar McMillan <[EMAIL PROTECTED]> wrote: > > Hi, I'm still new to django and have googled high and low for a way to > use a single dsn in the settings file instead of DATABASE_HOST, > DATABASE_USER, DATABASE_NAME, etc. No metion of it. Is there built > in support for this that I'm mi

use a dsn for database details in settings.py ?

2006-05-04 Thread Kumar McMillan
Hi, I'm still new to django and have googled high and low for a way to use a single dsn in the settings file instead of DATABASE_HOST, DATABASE_USER, DATABASE_NAME, etc. No metion of it. Is there built in support for this that I'm missing? If not, I am happy to submit a patch. What is the best

Re: Tutorial for MR

2006-05-04 Thread Honza Král
Works like a charm thanks On 5/4/06, Luke Plant <[EMAIL PROTECTED]> wrote: > > On Wednesday 03 May 2006 23:52, Luke Plant wrote: > > > /myproject > > /myapp > > /models > > __init__.py > > foo.py > > bar.py > > > > > > In __init__.py, I have: > > ---

date-based generic-views + paginate?

2006-05-04 Thread gabor
hi, i've got the following problem. i need to display some data in a layout that's exactly suited for the date-based generic views, BUT i have to paginate the results (only show let's say 15 entries/page) now i see that the list/detail-based generic views allow this functionality, but not th

_post_save() problem with an empty file field

2006-05-04 Thread sam
Django version 0.91. I was trying to generate a thumbnail for an image upload. The image is a FileField. I want to generate thumbnail in _post_save() of the model object. The code is something like the following: class Item(meta.Model): ... file = meta.FileField(upload_to="files",blank=Tr

Re: Three models linked together: how do i do (...) ?

2006-05-04 Thread Glenn Tenney
On Thu, May 04, 2006 at 10:32:59PM +0200, Moi Meme wrote: > And on my particular ticket system case, Paul Bissex's 20 mn trouble > ticket system (http://e-scribe.com/news/230) looks cool, but is limited > to one model, which takes its list of applications from a static list > (INSTALLED_APPS).

Re: DB connections never go away?

2006-05-04 Thread Richie Hindle
[Eric] > Apparently the problem is fixed in the > trunk-previously-known-as-magic-removal. Great - that's where I am. Thanks for the info. -- Richie Hindle [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Re: Three models linked together: how do i do (...) ?

2006-05-04 Thread Moi Meme
I had the same idea at first: Application -> Milestone -> Ticket (using a generic milestone for tickets not assigned to any specific milestone). But indeed, it does not fix the problem, when tickets need be created against a restricted list of milestones linked to application A. The admin interf

auth templates in the wrong directory in trunk?

2006-05-04 Thread [EMAIL PROTECTED]
I'm trying to use the default auth views, but they seem to be confused about where the auth templates live: -- File "/usr/lib/python2.3/site-packages/django/template/loader.py" in find_template_source 72. raise TemplateDoesNotExist, name ... Django tried loading these templates, in this or

Re: DB connections never go away?

2006-05-04 Thread Eric Walstad
On Thursday 04 May 2006 12:26, Richie Hindle wrote: > [Greg] > > > I think you're right, Richie. I applied the patch just in case I used > > threads at some point, like maybe if I used Django's database layer in > > some context other than a web server. > > OK, thanks. That's a relief! I thought

Re: Three models linked together: how do i do (...) ?

2006-05-04 Thread JHeasly
For a some ideas, you might want to have a look at Paul Bissex's twenty minute trouble ticket system: http://e-scribe.com/news/230 John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: Three models linked together: how do i do (...) ?

2006-05-04 Thread Waylan Limberg
Hmm, after rereading my reply, I seem to just be restating your problem to you without explicitly stating my answer. I was trying to suggest that you alter your model by removing the 'application' ForeignKey from 'Ticket' as it is unnessecary. Obviously, in the admin, you would want to give a lis

Re: DB connections never go away?

2006-05-04 Thread Richie Hindle
[Greg] > I think you're right, Richie. I applied the patch just in case I used > threads at some point, like maybe if I used Django's database layer in > some context other than a web server. OK, thanks. That's a relief! I thought I'd misunderstood the prefork MPM completely... -- Richie Hin

Re: load comments

2006-05-04 Thread JHeasly
Adrian Holovaty wrote: > > Hi John, > > Yes, that's the proper "fix." The comments app is an add-on; we'd > rather not force the installation of those database tables for every > Django user, so it's up to you to opt into installing it. Hello Adrian, Yeah, I got caught up in that infectious Kapl

Re: Three models linked together: how do i do (...) ?

2006-05-04 Thread Waylan Limberg
> > class Ticket(models.Model): > """ Tickets are created on an application and may be attached to a > milestone (optional). """ > name = models.CharField(...) > application = models.ForeignKey(Application) > milestone = models.ForeignKey(milestone, blank=True, null=True) > You ar

Three models linked together: how do i do (...) ?

2006-05-04 Thread Moi Meme
Hi, As a pretty new user, I have been through the tutorials and experienced a bit, playing with magic-removal branch before the merge. (Note to the impatient: my question is at the end of the mail) I'd like to build a light ticket management system for my work team, and came up with the followi

using django for local application

2006-05-04 Thread karl fast
Need to decide if Django is suitable for my application. I need to build a web application for 2-3 people. But they would each run their own copy on their local machine. It will effectively be like any regular app you download, install, and run. But it might become a shared web app in the future,

Re: Install woes: error "python: can't open file 'django-admin.py' "

2006-05-04 Thread Jeremy Dunck
On 5/4/06, jbrewer <[EMAIL PROTECTED]> wrote: > > I cd into the directory that I want to install the new project and then > type this: > > django-admin.py startproject mydjangotest It sounds like "." is not on your path, or like you don't have read permissions on the file. Try this: chown $USER

Re: Tutorial for MR

2006-05-04 Thread Luke Plant
On Wednesday 03 May 2006 23:52, Luke Plant wrote: > /myproject > /myapp > /models > __init__.py > foo.py > bar.py > > > In __init__.py, I have: > -- > from foo import Foo, SomeThingElse > from bar import Bar, AnotherSomething > # a few more,

oracle support patch for MR (0.92)

2006-05-04 Thread peter_k
Hi Guys, (Sorry for the crossposting, i just don't know where it belongs to.) I tried to hack this (http://code.djangoproject.com/ticket/87) older oracle backend patch into MR (0.92), but no avail so far. Is there someone out there who tried it or has a working version? Thanks, Peter --~--~-

Re: Install woes: error "python: can't open file 'django-admin.py' "

2006-05-04 Thread jbrewer
I cd into the directory that I want to install the new project and then type this: django-admin.py startproject mydjangotest and then I get this: python: can't open file 'django-admin.py' I have followed the install instructions on the Django page and get stuck here every time. --~--~---

Re: Install woes: error "python: can't open file 'django-admin.py' "

2006-05-04 Thread James Bennett
On 5/4/06, jbrewer <[EMAIL PROTECTED]> wrote: > I attempted to install on my PowerBook G4 for testing purposes, but > can't get past this error: What is the exact command you're typing? -- "May the forces of evil become confused on the way to your house." -- George Carlin --~--~-~--~-

Re: Field options validation only occur in admin interface?

2006-05-04 Thread James Bennett
On 5/4/06, Kilian CAVALOTTI <[EMAIL PROTECTED]> wrote: > class Obj(models.Model): > name = models.CharField(maxlength=80, blank=False) Per the model documentation, 'blank=False' does only apply when entering a value in the admin[1]. But that's not a very satisfying answer, so here's a fuller

Re: Field options validation only occur in admin interface?

2006-05-04 Thread Clint Ecker
On 5/4/06, Kilian CAVALOTTI <[EMAIL PROTECTED]> wrote: Hi all,I thought model properties validation would occur at objectcreation/modification, but it seems that it's not the case.(To be complete, I'd like to precise that I use the current svn trunk, and that I ran a 'manage.py reset project' betwe

Re: No module named parts.media.photos ?

2006-05-04 Thread James Bennett
On 5/3/06, James Bennett <[EMAIL PROTECTED]> wrote: > Ticket #1583 [1] covers this, but hasn't been resolved. The > 'get_thumbnail_url' function wasn't and shouldn't be part of Django, > so this needs to be fixed; I'll try to get a patch together tomorrow. I've just submitted a patch which attemp

Install woes: error "python: can't open file 'django-admin.py' "

2006-05-04 Thread jbrewer
I am a web designer looking for something that I can customize for a few projects (other blog CMS wont do) and found Django and was quite impressed. I attempted to install on my PowerBook G4 for testing purposes, but can't get past this error: python: can't open file 'django-admin.py' So I can'

Field options validation only occur in admin interface?

2006-05-04 Thread Kilian CAVALOTTI
Hi all, I thought model properties validation would occur at object creation/modification, but it seems that it's not the case. (To be complete, I'd like to precise that I use the current svn trunk, and that I ran a 'manage.py reset project' between each model modification) * First, I tried

Re: Suggestions wanted for keeping place in admin

2006-05-04 Thread pbx
> I haven't seen any patches that add this functionality. Here are a > couple of stop-gap solutions: > * She could bookmark the filtered change-list page and return to it > after editing the object. > > * From the filtered change-list page, she could open the > object-editing page in a new browse

Re: get parameters in template

2006-05-04 Thread Clint Ecker
On 5/4/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: That wouldn't work, because you pass the argument in the URLconf, andthe URLconf doesn't have access to request objects. The solution hereis either the global TEMPLATE_CONTEXT_PROCESSORS setting or the"context_processors" keyword argument to the

Re: Suggestions wanted for keeping place in admin

2006-05-04 Thread Adrian Holovaty
On 5/4/06, pbx <[EMAIL PROTECTED]> wrote: > She would like to have the admin "remember its place" when she edits > individual records. That is, if she filters by X and Y criteria, then > goes to the second page of results, then edits a single record there, > she would like to *return to that same

Re: get parameters in template

2006-05-04 Thread Glenn Tenney
On Thu, May 04, 2006 at 12:43:23PM +0200, [EMAIL PROTECTED] wrote: > Is if possible to define easily a set of static variables that will be > available inside the templates ? I know that you're seeking a solution for generic views, but just fyi here's what I did for my custom views to do t

Caching compiled templates

2006-05-04 Thread WSobczuk
i hooked up a simple template cache in django/core/: - in loader.py I proxy get_template (and cache by name) - in loader_tags.py I cache inside ExtendsNode.get_parent (the find_template_source and get_template_from_string calls just like in loader.py) but when I enabled the cache it came out that

Re: Arcitectual q?

2006-05-04 Thread wiz
On 5/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I am prototyping os monitor in real time. What would be some of less complex > scenerious accomplishing rendering with django templates accomplishing > similar effect as tail -f try using mini template pieces and render them to response

Re: get parameters in template

2006-05-04 Thread Adrian Holovaty
On 5/4/06, Clint Ecker <[EMAIL PROTECTED]> wrote: > Looking over the docs here: > http://www.djangoproject.com/documentation/generic_views/ > > It looks like you can pass in an argument called "extra_context" which is > just a dictionary. I don't see why you couldn't pass in " request.GET" in > t

Re: get parameters in template

2006-05-04 Thread Clint Ecker
Looking over the docs here: http://www.djangoproject.com/documentation/generic_views/It looks like you can pass in an argument called "extra_context" which is just a dictionary.  I don't see why you couldn't pass in " request.GET" in that dict.http://www.djangoproject.com/documentation/generic_view

Re: get parameters in template

2006-05-04 Thread Clint Ecker
Oops, just now noticed you were specifically talking about Generic Views! I apologize! :DOn 5/4/06, Clint Ecker < [EMAIL PROTECTED]> wrote:You could pass the " request.GET" or "request.POST" variable into the template context and then access it as follows.  I'm making the assumption that you'd pass

Re: get parameters in template

2006-05-04 Thread Clint Ecker
You could pass the "request.GET" or "request.POST" variable into the template context and then access it as follows.  I'm making the assumption that you'd pass it in as 'request':The page is: {{ request.page }} and the test is {{ request.test }}.http://www.djangoproject.com/documentation/request_r

Re: Suggestions wanted for keeping place in admin

2006-05-04 Thread Clint Ecker
On 5/4/06, pbx <[EMAIL PROTECTED]> wrote: She would like to have the admin "remember its place" when she editsindividual records. That is, if she filters by X and Y criteria, thengoes to the second page of results, then edits a single record there, she would like to *return to that same page in the

Suggestions wanted for keeping place in admin

2006-05-04 Thread pbx
I have a request from one of my admin users which seems reasonable, but I don't know how to satisfy it. She would like to have the admin "remember its place" when she edits individual records. That is, if she filters by X and Y criteria, then goes to the second page of results, then edits a singl

MR: _manipulator_validate_FIELD() methods?

2006-05-04 Thread Matthew Flanagan
Hi I've been porting a large application to MR since monday and have it 99% done except for a few issues. One of them is the _manipulator_validate_FIELD(self, field_data, all_data) methods not being call for my models. Is this intended behaviour? I was able to turn some of the methods into regul

Arcitectual q?

2006-05-04 Thread skacanski
I am prototyping os monitor in real time. What would be some of less complex scenerious accomplishing rendering with django templates accomplishing similar effect as tail -f sasha --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Django filter hack

2006-05-04 Thread Alexandru Badiu
Hi, Sorry for the late reply. You probably now it by now, but the effect is fading in / out and sliding.AnduOn 3/13/06, Adrian Holovaty < [EMAIL PROTECTED]> wrote:On 3/8/06, Andu < [EMAIL PROTECTED]> wrote:> One of the problems I faced when using Django's admin was the filter> part overlapped the t

Re: get parameters in template

2006-05-04 Thread zeuxis
On Thursday 04 May 2006 11:33, [EMAIL PROTECTED] wrote: > Hi, > > Is there a way (I bet there is) to find GET parameters (?page=3&test=6) > inside the template of a generic view ? > > Z. I think I've found my answer using TEMPLATE_CONTEXT_PROCESSORS. Is if possible to defin

Re: Tutorial for MR

2006-05-04 Thread Beorn
I submitted a ticket about this (I believe) 2 weeks ago: http://code.djangoproject.com/ticket/1658 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us

Re: Tutorial 2 - Admin

2006-05-04 Thread Brett Parker
On Wed, May 03, 2006 at 04:10:55PM -0700, Sean Perry wrote: > > Luke Plant wrote: > > On Wednesday 03 May 2006 17:51, Kenneth Gonsalves wrote: > > > >> when making major upgrades, sometimes old .pyc files remain giving > >> errors like this. Nuking subversion is the best solution > > > > Or, if

Re: extend User in m-r

2006-05-04 Thread Dagur
Has this problem been solved? I've been fighting this problem forever. Everything seems to work but no matter what i do the data in the new class never gets saved. I would really love to see some instructions in the documentation. --~--~-~--~~~---~--~~ You receive

get parameters in template

2006-05-04 Thread zeuxis
Hi, Is there a way (I bet there is) to find GET parameters (?page=3&test=6) inside the template of a generic view ? Z. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

list_filter not working properly?

2006-05-04 Thread Petar Marić
Hi Djangonauts, I've run into some weird problems with list_filter: class User(models.Model): core_user = models.OneToOneField( DjangoUser, #django.auth.user primary_key='True' ) birthday = models.DateField() city = models.ForeignKey("City") def __repr__(self)

Re: Tutorial for MR

2006-05-04 Thread Malcolm Tredinnick
On Thu, 2006-05-04 at 00:39 +1000, Malcolm Tredinnick wrote: > On Wed, 2006-05-03 at 16:29 +0200, Honza Král wrote: > > BEGIN; > > COMMIT; > > is the output of manage.py sql app (empty sql script for postgreSQL) > > > > I am fairly new to python, so I completely don't mind trivial questions, > >

Post-after-redirect question

2006-05-04 Thread PythonistL
Is there any difference if I use in my script a post-after-redirect that is HttpResponseRedirect (something like return HttpResponseRedirect("/ChangeProductList/") ) or if a user use REFRESH from his browser? I use my webhosting on Dreamhost and I found out that if I do a post-after-redirect

Re: DB connections never go away?

2006-05-04 Thread Greg
And actually, that seemed like a good point so I tried taking out the TLS patch (by making mysql.DatabaseWrapper inherit from object instead of threading.local) and that seems to fix the problem! I don't understand why that would be, especially because Django's ModPythonHandler explicitly calls db