Re: Root URI in templates

2006-06-14 Thread plungerman
limodou wrote: > On 6/14/06, ChrisW <[EMAIL PROTECTED]> wrote: > > > > Let me rephrase this. I don't disagree with absolute URL's per se, but > > there should be someway of abstracting them further than is currently > > available. > > > > Lets say that your media server's address changes, doesnt

Re: Root URI in templates

2006-06-14 Thread roger sun
hi, i just saw this documents, maybe it can help you. from django.conf.settings import the full url: http://www.djangoproject.com/documentation/settings/ On 6/14/06, plungerman <[EMAIL PROTECTED]> wrote: > > > limodou wrote: > > On 6/14/06, ChrisW <[EMAIL PROTECTED]> wrote: > > > > > > Let me r

Re: Root URI in templates

2006-06-14 Thread limodou
> > One method: > > > > set a "base" tag in template, so this tag will point the root uri of > > this page, and other uris can be related with this uri. > > > > Two method: > > > > Define some template variables used for root uri, and using them in > > urls. So you can define them in settings.py o

Re: Root URI in templates

2006-06-14 Thread Steven Armstrong
On 06/14/06 10:07, limodou wrote: >> > One method: >> > >> > set a "base" tag in template, so this tag will point the root uri of >> > this page, and other uris can be related with this uri. >> > >> > Two method: >> > >> > Define some template variables used for root uri, and using them in >> > ur

Re: unable to do an svn co

2006-06-14 Thread lcordier
> nope, tried with another machine not behind a proxy and was unable to > checkout or do an svn update either. I have tried with svn 1.1.4 and > 1.2. I think something is down I am also having the same problem, aparently it is proxy related, a lot of other projects have seen similar problems. I

Re: How to do named HTML anchors with Django?

2006-06-14 Thread ZebZiggle
So it would just look like: return render_to_response('polls/index.html/#foo', {'latest_poll_list': latest_poll_list}) or return render_to_response('polls/index.html#foo', {'latest_poll_list': latest_poll_list}) Is that correct? -Sandy PS> Thx for the tip ... I'll change that! I'm pretty old-

Q.

2006-06-14 Thread Quacker
Beatiful & interesting!!! --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to [EMAIL

Re: going crazy: foreignkey-reverse-lookup: tests work,my code fails

2006-06-14 Thread opendev
I have exactly the same problem, my django is the latest mr head unter Python 2.4(win32). --~--~-~--~~~---~--~~ 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@googl

Foreign keys and applications

2006-06-14 Thread Viktor
I have two applications in my project: project app1 models.py app2 models.py project/app1/models.py: class Cls1(models.Model): ... project/app2/models.py: from

how to integrate kid template with django

2006-06-14 Thread Roger Sun
hi, everybody. I don't like the django templates, can i use kid ? if can, how can i do then? thanks. -- welcome: http://www.webwork.cn --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: The only click to add any class

2006-06-14 Thread Grigory Fateyev
Hello Grigory Fateyev! On Tue, 13 Jun 2006 16:56:14 +0400 you wrote: > > Hello! > > We have compositely app 'Address' with lots of classes. Like: Region, > Country, Location and etc. And to fill the only address users need to > click some forms to add one address. It's awfully ;( > > Is it pos

Generic views and "include"

2006-06-14 Thread opendev
Hello, I am trying to render the output of multiple generic views under one template. Is this possible and if so how? The include tag renders only a template and cannot be used for the output of an entire view afaik. Best regards, --~--~-~--~~~---~--~~ You recei

FastCGI watcher?

2006-06-14 Thread Ivan Sagalaev
Hello! I know that some people here are running Django under FastCGI. I'm using Hugo's convenient django-fcgi.py script for this (https://simon.bofh.ms/cgi-bin/trac-django-projects.cgi/wiki/DjangoFcgi). However couple of days ago I've found my django app (test version, thankfully) not respond

Re: encoding of form variables in views

2006-06-14 Thread Ivan Sagalaev
Pistahh wrote: > now my question is how do I know the encoding of the variables in > data["something"] ? > This encoding should be the same that you're using for output (settings.DEFAULT_CHARSET). However nothing is preventing some broken user agent (like some badly written script) to send y

Re: FastCGI watcher?

2006-06-14 Thread Gábor Farkas
Ivan Sagalaev wrote: > Hello! > > I know that some people here are running Django under FastCGI. I'm using > Hugo's convenient django-fcgi.py script for this > (https://simon.bofh.ms/cgi-bin/trac-django-projects.cgi/wiki/DjangoFcgi). > However couple of days ago I've found my django app (test

London/UK Django developer wanted

2006-06-14 Thread Gonzalo
Hello we're a small independent design studio based in London looking for a Django/Python developer to join us for a couple of projects over the summer (2-3 months). We're happy for you to work remotely but must be avail on Skype or similar to meet/talk/report regularly. You should have experience

Re: FastCGI watcher?

2006-06-14 Thread Ivan Sagalaev
Gábor Farkas wrote: > ! someone also uses fastcgi :-) > This used to be the first thing in Google by "django fastcgi" :-). > we do not have this problem on our system (at least we think so :-) This is good to hear :-). I have the problem on my virtual hosting where don't actually know what exa

Re: How to do named HTML anchors with Django?

2006-06-14 Thread Ivan Sagalaev
ZebZiggle wrote: > PS> Thx for the tip ... I'll change that! I'm pretty > old-school :) > I want to add that the whole point of referring to an id is to not have for it. If you have an element you want to refer to then instead of: ... you can do just: ... --~--~-~--~

Re: Root URI in templates

2006-06-14 Thread Ivan Sagalaev
ChrisW wrote: > I had thought of doing this, but after not seeing it in anyone elses > code, I wasnt sure if: > a) it was the "right thing to do". b) how to do it properly. > In all (both :-) ) my projects I use a context processor to have {{ style_url }} and {{ js_url }} in templates. This is

Re: how to integrate kid template with django

2006-06-14 Thread Simon Willison
On 14 Jun 2006, at 12:52, Roger Sun wrote: > I don't like the django templates, can i use kid ? > if can, how can i do then? Yes you can. Here's an example: from django.http import HttpResponse import kid def index(request): # Set up any variables you might want to use template = kid.Te

No such column error + tag question

2006-06-14 Thread Guillermo Fernandez Castellanos
Hi, I've been developping a link model (see at the end of the post, kind of personal delicious) , and when I try to use the admin interface to add a url, I obtain the following error: Request Method: GET Request URL:http://127.0.0.1:8000/admin/links/link/ Exception Type: Opera

Re: Create generic views in Django 0.91

2006-06-14 Thread Adrian Holovaty
On 6/13/06, Sam Tran <[EMAIL PROTECTED]> wrote: > Now we want to use the same model to create a contact tree for a given > user: we determine who this user can view, e.g. personal phone > numbers. The tables have different name but have the same function. > Obviously we'd like to use the same view

ftp not allowed for django uner modpython with DEBUG

2006-06-14 Thread [EMAIL PROTECTED]
hello, I have a running site installed with apache mod_python, and the DEBUG = True in settings.py I thougth I could FTP views or template modifications and see the change in real time, in fact, I am not even allowed to modify (by ftp ing a new version) any file in the app directory. The answer

Re: ImageField upload not working in django.views.generic.create_update.update_object?

2006-06-14 Thread [EMAIL PROTECTED]
Jay- In case you didn't noticed, Jacob did check in your patch, and it totally fixed the problem on my end. Thanks so much! :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

Re: ImageField upload not working in django.views.generic.create_update.update_object?

2006-06-14 Thread Jay Parlar
On 6/14/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Jay- > > In case you didn't noticed, Jacob did check in your patch, and it > totally fixed the problem on my end. Thanks so much! :) Yep, I saw that yesterday, I was excited to finally contribute something back to this fantastic set of

Re: howto Django + lighttpd + Windows?

2006-06-14 Thread mamcxyz
Where I get info about this?? Then I must install apache + mod_python in Windows? :( --~--~-~--~~~---~--~~ 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@googlegr

Re: howto Django + lighttpd + Windows?

2006-06-14 Thread Jay Parlar
On 6/14/06, mamcxyz <[EMAIL PROTECTED]> wrote: > Then I must install apache + mod_python in Windows? > If your goal is to do load testing, and your production server will use lighttpd, then there's really no point in installing Apache on Windows, because your load test server will be different f

Re: London/UK Django developer wanted

2006-06-14 Thread Frankie Robertson
Just to let you know, http://code.djangoproject.com/wiki/DevelopersForHire is the correct place for posting this and scouting for available developers. On 14/06/06, Gonzalo <[EMAIL PROTECTED]> wrote: > > Hello we're a small independent design studio based in London looking > for a Django/Python d

Re: FastCGI watcher?

2006-06-14 Thread Ivan Sagalaev
Ivan Sagalaev wrote: > I have the problem on my virtual hosting where > don't actually know what exactly has happened. So may be this was me > making something stupid in /etc/rc.d script to start this up. To remove suspicions from django-fcgi.py I want to confirm that it was most likely exactl

Admin widgets - where are they invoked?

2006-06-14 Thread Phil Powell
Hi, I'm playing around with extending field types, but I've hit a bit of a wall when trying to create custom "widgets" for use in the admin. Can anyone shed any light on how templates in django/contrib/admin/templates/widget/ are invoked? I've got a new subclassed fieldtype working fine, with a

Re: Admin widgets - where are they invoked?

2006-06-14 Thread James Bennett
On 6/14/06, Phil Powell <[EMAIL PROTECTED]> wrote: > I'm playing around with extending field types, but I've hit a bit of a > wall when trying to create custom "widgets" for use in the admin. Can > anyone shed any light on how templates in > django/contrib/admin/templates/widget/ are invoked? Th

Re: FastCGI watcher?

2006-06-14 Thread Derek Hoy
On 6/14/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote: > What can you suggest to prevent or restart failing FastCGI? This is on my to-do list, and here a couple of links I found interesting: These cover use of daemon-monitoring demons: http://www.linuxdevcenter.com/lpt/a/1708 http://ivory.idyll.

Re: going crazy: foreignkey-reverse-lookup: tests work,my code fails

2006-06-14 Thread Rick
I'm having a similar (but not identical) problem. In my app I have Rate's that belong to a Rateset, and Card's that use a Rateset. So both Rate and Card have a foreign key connection to Rateset. My application needs a list of "active" rates (those rates that are in use by an active Card). Here

Re: FastCGI watcher?

2006-06-14 Thread gabor
Ivan Sagalaev wrote: > Gábor Farkas wrote: >> ! someone also uses fastcgi :-) >> > This used to be the first thing in Google by "django fastcgi" :-). >> we do not have this problem on our system (at least we think so :-) > This is good to hear :-). I have the problem on my virtual hosting where

Re: FastCGI watcher?

2006-06-14 Thread Ivan Sagalaev
Derek Hoy wrote: > These cover use of daemon-monitoring demons: > > http://www.linuxdevcenter.com/lpt/a/1708 > http://ivory.idyll.org/articles/basic-supervisor.html > Thanks! > And this is cool :) > http://www.truepathtechnologies.com/gcal.html > Or fun -- at least :-) --~--~-~--~-

Re: going crazy: foreignkey-reverse-lookup: tests work,my code fails

2006-06-14 Thread gabor
opendev wrote: > I have exactly the same problem, my django is the latest mr head unter > Python 2.4(win32) ah, sorry, i forgot to post my findings here... basically the "problem" was that i specified the imports "relatively". example: 1. django-admin.py startproject myproject 2. manage.py sta

Re: going crazy: foreignkey-reverse-lookup: tests work,my code fails

2006-06-14 Thread Brett Parker
On Wed, Jun 14, 2006 at 10:51:02AM -0700, Rick wrote: > > I'm having a similar (but not identical) problem. > > In my app I have Rate's that belong to a Rateset, and Card's that use a > Rateset. So both Rate and Card have a foreign key connection to > Rateset. > > My application needs a list of

Re: ftp not allowed for django uner modpython with DEBUG

2006-06-14 Thread Brett Parker
On Tue, Jun 13, 2006 at 05:58:41AM -0700, [EMAIL PROTECTED] wrote: > > hello, > > I have a running site installed with apache mod_python, and the DEBUG = > True > in settings.py > > I thougth I could FTP views or template modifications and see the > change in real time, > in fact, I am not even

Re: ImageField upload not working in django.views.generic.create_update.update_object?

2006-06-14 Thread Jeremy Dunck
On 6/14/06, Jay Parlar <[EMAIL PROTECTED]> wrote: > My new thread on Django-dev (which unforuntately doesn't seem to be > getting much response) Err, what's the subject? I'm on both lists and haven't seen it... --~--~-~--~~~---~--~~ You received this message beca

Re: ImageField upload not working in django.views.generic.create_update.update_object?

2006-06-14 Thread Jay Parlar
On 6/14/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > On 6/14/06, Jay Parlar <[EMAIL PROTECTED]> wrote: > > My new thread on Django-dev (which unforuntately doesn't seem to be > > getting much response) > > Err, what's the subject? I'm on both lists and haven't seen it... "Improved FileField i

Re: Controlling Display of Foreign Key Input Fieldsets in Admin

2006-06-14 Thread Paul Childs
Thanks Luke, it took me a while but now I understand... http://code.djangoproject.com/wiki/NewAdminChanges#Adminconvertedtoseparatetemplates --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: howto Django + lighttpd + Windows?

2006-06-14 Thread mamcxyz
Yes I know... is for that I try the install onto windows. Is rare, why then RoR can be installed with lighttp on windows? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: London/UK Django developer wanted

2006-06-14 Thread Jacob Kaplan-Moss
On Jun 14, 2006, at 11:59 AM, Frankie Robertson wrote: > Just to let you know, > http://code.djangoproject.com/wiki/DevelopersForHire is the correct > place for posting this and scouting for available developers. Well... that's *a* correct place, but posting jobs to this list is perfectly OK.

Re: ftp not allowed for django uner modpython with DEBUG

2006-06-14 Thread Jeremy Dunck
On 6/14/06, Brett Parker <[EMAIL PROTECTED]> wrote: > I assume this is a windows box, then... linux will let you overwrite the > file nicely. Unfortunately I never found a way to do it without shutting > down the server accessing the file in windows. This util can show what is locking files on Wi

Re: howto Django + lighttpd + Windows?

2006-06-14 Thread Jay Parlar
On 6/14/06, mamcxyz <[EMAIL PROTECTED]> wrote: > > Yes I know... is for that I try the install onto windows. > > Is rare, why then RoR can be installed with lighttp on windows? I think they might use Cygwin to do it. Nothing stopping you from doing the same, of course. Jay P. --~--~-~--

Re: Admin widgets - where are they invoked?

2006-06-14 Thread Phil Powell
Thanks for the pointer James - the one place I hadn't looked ;) A great implementation - turns out that just like the admin templates, I can create a "widget" template directory and override or include new templates. Also neat that the code falls back on a fields superclass if a template doesn't

Directing URL's to Load Django Projects

2006-06-14 Thread Scott McCracken
My question may be outside the scope of Django and more related to .htaccess then anything else, but I thought I might give it a shot here just in case: I am sure many of you have read the amazing tutorial from Jeff Croft on setting up Django on Dreamhost: http://www2.jeffcroft.com/2006/may/11/dj

How to have different fields 'editable' in the AddManipulator vs the ChangeManipulator

2006-06-14 Thread Scanner
First, I am stuck using django 0.91 because I make extensive use of model inheritance and how it works in 0.91. I am wondering how to do something with AddManipulators vs ChangeManipulators. The basic issue is that I have a bunch of models that have some fields only settable on create vs settabl

Re: syncdb capabilities

2006-06-14 Thread Adam Blinkinsop
>From your link, Adrian: "...there's some work being done to add partially automated database-upgrade functionality." How's that coming along? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: syncdb capabilities

2006-06-14 Thread James Bennett
On 6/14/06, Adam Blinkinsop <[EMAIL PROTECTED]> wrote: > >From your link, Adrian: "...there's some work being done to add > partially automated database-upgrade functionality." > > How's that coming along? It's being carried out as a Google Summer of Code project; Google is sponsoring a student w

Re: Root URI in templates

2006-06-14 Thread Derek Hoy
On 6/14/06, plungerman <[EMAIL PROTECTED]> wrote: > that is precisely what i would like to do. how you access a > variable defined in settings.py from a template tho? i have > not been able to track this bit down. Here's what I have. in settings.py: APP_BASE = "http://www.mysite.org/"; in tem

Re: url path in django template

2006-06-14 Thread damacy
thanks for your help, steven =) however, no change in settings.py was needed to make it work. --~--~-~--~~~---~--~~ 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@

Re: how to integrate kid template with django

2006-06-14 Thread Roger Sun
Hi, Simon, Thanks for your help. ~_~. Best regards, roger On 6/14/06, Simon Willison <[EMAIL PROTECTED]> wrote: > > > On 14 Jun 2006, at 12:52, Roger Sun wrote: > > > I don't like the django templates, can i use kid ? > > if can, how can i do then? > > Yes you can. Here's an example:

Re: going crazy: foreignkey-reverse-lookup: tests work,my code fails

2006-06-14 Thread Malcolm Tredinnick
On Wed, 2006-06-14 at 20:14 +0200, gabor wrote: > opendev wrote: > > I have exactly the same problem, my django is the latest mr head unter > > Python 2.4(win32) > > ah, sorry, i forgot to post my findings here... > > basically the "problem" was that i specified the imports "relatively". > > ex

HttpResponseSendFile

2006-06-14 Thread SmileyChris
I noticed http://code.djangoproject.com/ticket/2131 was marked as a wontfix today with the comment, "Django isn't meant to serve static files". I don't want to go reopening the ticket, but couldn't this still be useful functionality? What if I wanted to limit access to a static file to certain us

Re: HttpResponseSendFile

2006-06-14 Thread SmileyChris
Sorry, this was supposed to go in the Django developers group... :-| --~--~-~--~~~---~--~~ 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 To unsubs

Re: Using DB module(s) in another app (twisted)

2006-06-14 Thread Jos Yule
Ok, here is what i had to do to get it to work: In a 'test.py' file: -- from django.conf import settings import settings as mysettings settings.configure(mysettings) from django import db from mainsite.models import Game from django.contrib.auth.mod

Re: The only click to add any class

2006-06-14 Thread Malcolm Tredinnick
On Tue, 2006-06-13 at 16:56 +0400, Grigory Fateyev wrote: > Hello! > > We have compositely app 'Address' with lots of classes. Like: Region, > Country, Location and etc. And to fill the only address users need to > click some forms to add one address. It's awfully ;( > > Is it possible to write

Admin "Page Not Found" Part 2

2006-06-14 Thread Bo Shi
This is a continuation of the following thread: http://groups.google.com/group/django-users/browse_thread/thread/13a94a5ac9b5ff8a/f6fbcdd419ddf89e?q=page+not+found&rnum=1#f6fbcdd419ddf89e I'm experiencing the same problem; I've fiddled with permissions (superuser/explicitly setting all permissio

problem on windows apache settings

2006-06-14 Thread wgwigw
hi, I read document "How to use Django with mod_python", and puzzled ab two things. first: SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE mysite.settings ^^^ -if my project is hotel, then I just write

Re: Admin "Page Not Found" Part 2

2006-06-14 Thread Malcolm Tredinnick
On Thu, 2006-06-15 at 02:52 +, Bo Shi wrote: > This is a continuation of the following thread: > > http://groups.google.com/group/django-users/browse_thread/thread/13a94a5ac9b5ff8a/f6fbcdd419ddf89e?q=page+not+found&rnum=1#f6fbcdd419ddf89e > > I'm experiencing the same problem; I've fiddled w

Re: problem on windows apache settings

2006-06-14 Thread SmileyChris
> I just write hotel.settings or I need to finger out the full > path like'c:\hotel.settings'? Yep, just hotel.settings - if you add your projects folder (the one which the hotel folder is sitting in, eg C:\Django\Projects) to PythonPath, then Django knows where to look. > second:PythonPath "['/

Re: Admin "Page Not Found" Part 2

2006-06-14 Thread James Bennett
On 6/14/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > This is entirely expected. Model inheritance does not work at the moment > (you end up with the wrong manager for the derived class, if you care > about the details). It is being worked on. Look through the list > archives if you want mor

Re: going crazy: foreignkey-reverse-lookup: tests work,my code fails

2006-06-14 Thread James Bennett
On 6/14/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Yeah, sorry about that. We really need to fix this. :-( > > But it's not entirely trivial from what I remember last time I dived in > there. Better to let Guido and company fix relative imports in Python, period. Supposed to happen soon,

Enforcing relationships in the Admin

2006-06-14 Thread [EMAIL PROTECTED]
All, I have been trying to create a model for a project that I'm starting with the trunk version of Django(revision 3129 or newer). In the following example I'm trying to create a model that allows the site administrator(s) to create locations based on Country, State, and City then associate th

Re: Enforcing relationships in the Admin

2006-06-14 Thread Malcolm Tredinnick
On Wed, 2006-06-14 at 22:15 -0700, [EMAIL PROTECTED] wrote: > All, > I have been trying to create a model for a project that I'm starting > with the trunk version of Django(revision 3129 or newer). In the > following example I'm trying to create a model that allows the site > administrator(s) t

Re: Enforcing relationships in the Admin

2006-06-14 Thread Andy Todd
On 6/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > All, > I have been trying to create a model for a project that I'm starting > with the trunk version of Django(revision 3129 or newer). In the > following example I'm trying to create a model that allows the site > administrator(s) to

Meta.unique_together containing a boolean field.

2006-06-14 Thread evenrik
Has anyone used unique_together with a BooleanField? Does unique_together only work for CharFields? Seems like the add manipulator does not enforce the constraint and the change manipulator raises a ProgrammingError exception: ERROR: operator does not exist: boolean ~~* "unknown" due to the sq

Re: problem on windows apache settings

2006-06-14 Thread wgwigw
Great, it works! thanks for help. BTW, the PythonPath is a windows system environment variable. --~--~-~--~~~---~--~~ 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