Re: App for Registration/Authorization which is Email & Password based (not username)

2010-08-26 Thread nobosh
Thanks for the reply. The learning curve to get started has been harder than I expected. I found this: http://github.com/redvasily/django-emailauth Which seems to handle things well but it's still a hack (it's adding IDs in front of the email to create a username. I ran the setup.py and loaded

Re: App for Registration/Authorization which is Email & Password based (not username)

2010-08-26 Thread Shawn Milochik
If you still want to use the contrib.auth app, you can just add your own backend to the user authentication. It's very easy to do. http://docs.djangoproject.com/en/dev/topics/auth/#writing-an-authentication-backend There are some very smart people who prefer not to use contrib.auth for a variety

App for Registration/Authorization which is Email & Password based (not username)

2010-08-26 Thread nobosh
Hello, I'm on day 7 learning Django and would appreciate any info around getting my Django app started with a Registration/Authorization which is Email & Password based (not username). I'll don't currently have a need for usernames. Is there an app or a clean/smart way to implement. I'm trying to

Re: question on directory structure for deploying project

2010-08-26 Thread Joel Klabo
Could someone just show me how theirs is set up? On Aug 26, 4:54 pm, Joel Klabo wrote: > It does have __init__.py, but not the server isn't seeing it... '500 > internal server error' > > On Aug 26, 4:48 pm, Kenneth Gonsalves wrote: > > > > > On Thu,

Re: ModelMultipleChoiceField queryset argument does not limit widget choices

2010-08-26 Thread The Boss
Ok, I sort of found a solution. After much digging and looking at class dictionaries I found that i could manually update the dictionary self.base_fields. self.base_fields['associated_files'] =self.__class__.associated_files It's seems that class attrs assigned in init do not get added

Re: Django + GAE, Changing Auth from userid/password to email/password

2010-08-26 Thread dar
Nonrel is more actively discussed on their mailing list: http://groups.google.com/group/django-non-relational GAE python is actively discussed here: http://groups.google.com/group/google-appengine-python The django helper on GAE is discussed here, but there isn't much traffic on the mailing

Re: Мобильная версия

2010-08-26 Thread Олег Корсак
English? 27.08.2010 04:42, Vanger - irk пишет: > не могу понять, как лучше реализовать определение того, что человек > зашел сейчас с мобилы, и что мне нужно подсунуть ему мобильную > версию ? > Может быть кто-то уже реализовывал эти моменты? > signature.asc Description: OpenPGP digital

Мобильная версия

2010-08-26 Thread Vanger - irk
не могу понять, как лучше реализовать определение того, что человек зашел сейчас с мобилы, и что мне нужно подсунуть ему мобильную версию ? Может быть кто-то уже реализовывал эти моменты? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: permissions and ownership

2010-08-26 Thread Graham Dumpleton
And for those who could't work out what the solution was from the 'Got It!' response, you will find these errors covered in my mod_wsgi talk. See: http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_Presentations :-) Graham On Aug 27, 2:40 am, Bradley Hintze

Re: Which PostgreSQL driver do you use

2010-08-26 Thread Kenneth Gonsalves
On Fri, 2010-08-27 at 08:26 +0800, Russell Keith-Magee wrote: > > pyscopg has been more or less standard ever since I can remember. > > Due to a lack of maintenance (last psycopg release was in 2005), > psycopg was added to the deprecation path in 1.2. It will be removed > in 1.4. > > psycopg2

Re: Which PostgreSQL driver do you use

2010-08-26 Thread Russell Keith-Magee
On Fri, Aug 27, 2010 at 7:35 AM, Kenneth Gonsalves wrote: > On Thu, 2010-08-26 at 22:17 -0100, Joshua Russo wrote: >> There are a lot of PostgreSQL drivers listed on the Python Wiki >> http://wiki.python.org/moin/PostgreSQL >> >> Has anyone found one to be better or even that

Re: Django 1.2 unittests: Second time through, things get weird

2010-08-26 Thread Russell Keith-Magee
On Fri, Aug 27, 2010 at 1:43 AM, Elf_Sternberg wrote: > Is anyone seeing this?  I have this function at the top of my > unittest: > > def create_user(name): >    username = name.replace(' ', '').lower() >    return User.objects.create_user(username, username + '@a.com', >

Re: Django 1.2 unittests: Second time through, things get weird

2010-08-26 Thread Karen Tracey
On Thu, Aug 26, 2010 at 1:43 PM, Elf_Sternberg wrote: > Is anyone seeing this? I have this function at the top of my > unittest: > > def create_user(name): >username = name.replace(' ', '').lower() >return User.objects.create_user(username, username + '@a.com', >

Re: question on directory structure for deploying project

2010-08-26 Thread Joel Klabo
It does have __init__.py, but not the server isn't seeing it... '500 internal server error' On Aug 26, 4:48 pm, Kenneth Gonsalves wrote: > On Thu, 2010-08-26 at 16:44 -0700, Joel Klabo wrote: > > also, when I change the virtual host path to: /srv/www/brooski.net > > (instead

Re: Django + GAE, Changing Auth from userid/password to email/password

2010-08-26 Thread Karen Tracey
On Thu, Aug 26, 2010 at 1:38 PM, nobosh wrote: > Good to know I'm not the only one :) this forum seems to be a little > low with activity. Do you know of a better place to get Django > support / advice to help a newbie like myself along? > Low activity? This group gets

Re: question on directory structure for deploying project

2010-08-26 Thread Kenneth Gonsalves
On Thu, 2010-08-26 at 16:44 -0700, Joel Klabo wrote: > also, when I change the virtual host path to: /srv/www/brooski.net > (instead of /srv/www/brooski.net/brooski/) I get an internal server > error. Whereas with '/srv/www/brooski.net/brooski/' I get the actual > django error page the

Re: ip to distance mapping

2010-08-26 Thread Sam Walters
I have used geoip in conjunction with the rest of the geodjango functionality. However you shouldnt have to deal with all the extra complexity of geodjango (which isnt too bad one you get used to it ;). Basically the process involves querying 2 IP's , getting a 'Point' for each and then

Re: question on directory structure for deploying project

2010-08-26 Thread Joel Klabo
also, when I change the virtual host path to: /srv/www/brooski.net (instead of /srv/www/brooski.net/brooski/) I get an internal server error. Whereas with '/srv/www/brooski.net/brooski/' I get the actual django error page On Aug 26, 4:20 pm, Joel Klabo wrote: > on my VPS

Re: Which PostgreSQL driver do you use

2010-08-26 Thread Kenneth Gonsalves
On Thu, 2010-08-26 at 22:17 -0100, Joshua Russo wrote: > There are a lot of PostgreSQL drivers listed on the Python Wiki > http://wiki.python.org/moin/PostgreSQL > > Has anyone found one to be better or even that different from > another? pyscopg has been more or less standard ever since I can

Re: Which PostgreSQL driver do you use

2010-08-26 Thread Joshua Russo
On Thu, Aug 26, 2010 at 10:17 PM, Joshua Russo wrote: > There are a lot of PostgreSQL drivers listed on the Python Wiki > http://wiki.python.org/moin/PostgreSQL > > Has anyone found one to be better or even that different from another? > Nevermind, It helps to read the

question on directory structure for deploying project

2010-08-26 Thread Joel Klabo
on my VPS i have my project at: /srv/www/brooski.net/brooski/(all my files, settings.py, url.py are here) and my VirtualHost is setup like this: ServerAdmin r...@brooski.net ServerName brooski.net ServerAlias www.brooski.net DocumentRoot

Re: save inline models when saving the father in admin

2010-08-26 Thread Karen Tracey
On Thu, Aug 26, 2010 at 12:02 PM, Alessandro Ronchi < alessandro.ron...@soasi.com> wrote: > I need to be sure that an inline model is saved every time I save its > parent class. > I need it because I want to save the last modified timestamp, and I don't > want to overwrite the parent save because

Which PostgreSQL driver do you use

2010-08-26 Thread Joshua Russo
There are a lot of PostgreSQL drivers listed on the Python Wiki http://wiki.python.org/moin/PostgreSQL Has anyone found one to be better or even that different from another? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: apache won't start now for some reason....

2010-08-26 Thread Joel Klabo
Got it, I had accidentally deleted my error.log file and when it couldn't find it it borked itself. On Aug 26, 3:36 pm, Joel Klabo wrote: > Apache was running fine, as far as I know I didn't change anything. > This is the error log:http://dpaste.com/234582/ > > SIGTERM? --

Re: Newbie question: can foreign key fields used as search fields on admin page?

2010-08-26 Thread Kenneth Gonsalves
On Wed, 2010-08-25 at 21:49 -0700, Joe Z wrote: > class BookAdmin(admin.ModelAdmin): > list_display = ('title', 'author', 'publisher') > search_fields = ('first_name', 'last_name') > > Is it possible to add 'publisher' into search_fields so that in admin > page books showed can be narrow

Re: permissions and ownership

2010-08-26 Thread Steve Holden
On 8/26/2010 12:40 PM, Bradley Hintze wrote: > I got it :) > See how effective this group is? You just have to post to it and you find the answers to your questions by yourself! :-) Glad you worked in out. regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- You received

apache won't start now for some reason....

2010-08-26 Thread Joel Klabo
Apache was running fine, as far as I know I didn't change anything. This is the error log: http://dpaste.com/234582/ SIGTERM? -- 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...@googlegroups.com.

fixtures: loading user profiles with user data

2010-08-26 Thread oso_foo
My initial data for testing an app includes users, and I'm using user profiles. As the fixture for the app loads (while running "manage.py test"), I get "DatabaseError: no such table: userprofile_userprofile". This happens whether or not userprofile.userprofile data is in the fixture. So, my

globally change default id field type

2010-08-26 Thread andoco
I know that I can set a custom 'id' field type by using the 'primary_key' attribute, but is there a way to do this globally so that it doesn't need to be specified in the model? For example, a setting like this: AUTO_ID_FIELD_TYPE = 'myfields.MyAutoUUIDField' The reason I'd like to do this

ip to distance mapping

2010-08-26 Thread Bobby Roberts
I'm needing an easy way to convert a client IP to a geo location and then get the distance from that lat/long to a fixed lat/long coordinate. Is there anything out there that can do this with django. I've been looking at geodjango but that looks pretty dang complicated and i'm not even sure it

Re: Django Multiple Quiers to Auth User

2010-08-26 Thread stephen Enright
On further investigation this seems to be caused by the auth AuthenticationMiddleware. It makes a call to LazyUser for every request. Is anybody aware of a workaround for this or would this involve creating a new AuthenticationMiddleware implementation and is it possible to configure a

execution time of qualified view name vs alias in reverse and url tag

2010-08-26 Thread kbs
After accumulating a large number of apps over the years in a single web project, I would say that the time it takes to reverse urls has become quite significant, especially if we have multiple links on screen using the reverse function. Would there be a noticeable difference if we go back to

Problems with Relationships ManytoMany in Django 1.2.1

2010-08-26 Thread tkulev
Hi guys, I want to make some simple relationship models about relations between users. I have this model: class Relation(models.Model): user = models.ForeignKey(User) relation = models.ManyToManyField(User, related_name="relations") type =

Re: Template not found

2010-08-26 Thread Bradley Hintze
Got it! On Thu, Aug 26, 2010 at 2:56 PM, Bradley Hintze wrote: > A found the template error, a typo. But now I have an impor error: > > [Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251] mod_wsgi > (pid=1440): Exception occurred processing WSGI script >

Re: Template not found

2010-08-26 Thread Piotr Kilczuk
> I do have it on the sys.path in django.wsgi, here it is: > > import os > import sys > sys.path.append('/Users/bradleyhintze/djcode') > sys.path.append('/Users/bradleyhintze/djcode/MolProbity_Compare_test') Seems like it is somehow not there - is settings.py inside

Re: Template not found

2010-08-26 Thread Bradley Hintze
A found the template error, a typo. But now I have an impor error: [Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251] mod_wsgi (pid=1440): Exception occurred processing WSGI script '/Users/bradleyhintze/djcode/MolProbity_Compare_test/apache/django.wsgi'., referer:

Re: Template not found

2010-08-26 Thread Piotr Kilczuk
Hi, If you need to debug, set DEBUG to True, obviously... Second thing - what is your TEMPLATE_DIRS and TEMPLATE_LOADERS setting? Regards, Piotr -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: How to create navigation urls in an intelligent manner

2010-08-26 Thread bruno desthuilliers
On 26 août, 19:33, Steve Holden wrote: > As long as you acknowledge it as an ugly hack I suspect your reputation > will survive ... > +1 !-) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: How to create navigation urls in an intelligent manner

2010-08-26 Thread bruno desthuilliers
On 26 août, 17:30, Uwe Schuerkamp wrote: > > Hello Bruno, > > thanks for your answer. I'm already using a custom context_processor > (yay! ;-), so I'll follow that suggestion, too. I've tried wrapping my > head around the process_view function, but I'm not exactly clear

Re: How to create navigation urls in an intelligent manner

2010-08-26 Thread bruno desthuilliers
On 26 août, 18:55, Aspontus wrote: > Hi. > If I understand your problem correctly, you are looking for a way to > capture different optional parameters from the url, to use them in > further url construction. > Why not use /country/de/district/hf/observation/add/ with

unset vary:cookie header with generic views / 13285

2010-08-26 Thread jfenton
I'm using 1.1.1. I've got a bunch of legacy code written with date- based generic views: django.views.generic.date_based . I think that these views set a vary:Cookie header, which messes up my upstream caching (see related ticket: http://code.djangoproject.com/ticket/13285 ) The vary:Cookie

Django 1.2 unittests: Second time through, things get weird

2010-08-26 Thread Elf_Sternberg
Is anyone seeing this? I have this function at the top of my unittest: def create_user(name): username = name.replace(' ', '').lower() return User.objects.create_user(username, username + '@a.com', 'password') And then (this is ultimately the code I derived to examine this behavior):

Re: double for in the template

2010-08-26 Thread Tim Chase
On 08/26/10 11:10, Andrea Imparato wrote: How can i scan the zipped list in the template page? If I do {% for f in zip %} {{ f }} {% endfor %} How can I access the second item in the index? I think since version 1.0, you can just use standard tuple-unpacking syntax as detailed in the

Re: Template not found

2010-08-26 Thread Bradley Hintze
I forgot to include the error_log message: [Thu Aug 26 17:41:27 2010] [error] [client 152.16.223.251] mod_wsgi (pid=938): Exception occurred processing WSGI script '/Users/bradleyhintze/djcode/MolProbity_Compare_test/apache/django.wsgi'. [Thu Aug 26 17:41:27 2010] [error] [client 152.16.223.251]

Template not found

2010-08-26 Thread Bradley Hintze
I just moved my site onto apache and can get the 'home' site up which directs you to upload two files. When you submit the form you get a 500 Internal Server Error. The error log indicates that it can't find a 500 template, which I do have in my templates folder, which indicates to me that it may

Re: Django + GAE, Changing Auth from userid/password to email/password

2010-08-26 Thread nobosh
Good to know I'm not the only one :) this forum seems to be a little low with activity. Do you know of a better place to get Django support / advice to help a newbie like myself along? On Aug 25, 5:23 pm, James Saxon wrote: > I'm curious too about both questions. > > The only

Re: How to create navigation urls in an intelligent manner

2010-08-26 Thread Steve Holden
On 8/26/2010 11:30 AM, Uwe Schuerkamp wrote: [...] > It's probably not a good idea to have google groups archive this ugly > hack with my name on it, but right now it seems to do the job nicely. > Storing the data in the request object also seems like a great idea, > I'll certainly look into that!

Re: app engine and the non-rel stuff going on lately

2010-08-26 Thread Waldemar Kornewald
On Wed, Aug 25, 2010 at 5:08 PM, Russell Keith-Magee wrote: > On Wed, Aug 25, 2010 at 10:21 PM, Waldemar Kornewald > wrote: >> On Wed, Aug 25, 2010 at 2:36 PM, Russell Keith-Magee >> wrote: >>> On Wed, Aug 25, 2010 at 4:00

order of middleware

2010-08-26 Thread Alessandro Ronchi
Is this middleware classes correctly ordered for performance? thanks in advance, MIDDLEWARE_CLASSES = ( "django.middleware.common.CommonMiddleware", "django.contrib.sessions.middleware.SessionMiddleware", "django.middleware.locale.LocaleMiddleware",

Re: How to create navigation urls in an intelligent manner

2010-08-26 Thread Aspontus
Hi. If I understand your problem correctly, you are looking for a way to capture different optional parameters from the url, to use them in further url construction. Why not use /country/de/district/hf/observation/add/ with entries in urlconf like: urlpatterns += patterns('some.app.views',

Re: how to turn off CSRF in django 1.2?

2010-08-26 Thread João Rodrigues
what about 'django.contrib.csrf.middleware.CsrfMiddleware' ? http://docs.djangoproject.com/en/1.0/ref/contrib/csrf/#how-to-use-it On 26 August 2010 16:33, Alan wrote: > > Ops, sorry, but I don't have this line > django.middleware.csrf.CsrfViewMiddleware, as I said, it's a

Re: Error working on many-to-many lookups

2010-08-26 Thread Christos Jonathan Hayward
Thanks. On Thu, Aug 26, 2010 at 9:08 AM, Alex Robbins wrote: > Jonathan, > > Pretty much any time you use __exact='text', you could use > ='text' instead. I think the orm treats those two cases the > same. (It adds __exact if there isn't another lookup specified.

Re: permissions and ownership

2010-08-26 Thread Bradley Hintze
I got it :) On Thu, Aug 26, 2010 at 12:35 PM, Bradley Hintze wrote: > Not getting much of a respose BUT I did make progress. I had a major > typo but now i get Internal Server Error > > error_log > > Thu Aug 26 12:30:25 2010] [error] [client 152.16.223.251] >

Re: permissions and ownership

2010-08-26 Thread Bradley Hintze
Not getting much of a respose BUT I did make progress. I had a major typo but now i get Internal Server Error error_log Thu Aug 26 12:30:25 2010] [error] [client 152.16.223.251] (13)Permission denied: mod_wsgi (pid=594, process='', application='summit.research.duhs.duke.edu|'): Call to fopen()

Django Nav - is there anything similar that is actively maintained

2010-08-26 Thread Yo-Yo Ma
I haven't tried http://code.google.com/p/django-nav/ but I would imagine that it probably has issues because it hasn't changed since 2007. Does anyone know if there is a very intuitive navigation helper like this, but newer? -- You received this message because you are subscribed to the Google

save inline models when saving the father in admin

2010-08-26 Thread Alessandro Ronchi
I need to be sure that an inline model is saved every time I save its parent class. I need it because I want to save the last modified timestamp, and I don't want to overwrite the parent save because I want to track only admin saves. I cannot touch the parent class because it came from a library.

Re: double for in the template

2010-08-26 Thread Tom Evans
On Thu, Aug 26, 2010 at 4:17 PM, Andrea Imparato wrote: > > I have 2 lists and I have to scan them "concurrently" with the same > indexes at the same time. Something like: > > {% for lists %} > first item from the first list > first item from the second list > {% endfor

Re: double for in the template

2010-08-26 Thread Tim Chase
On 08/26/10 10:17, Andrea Imparato wrote: I have 2 lists and I have to scan them "concurrently" with the same indexes at the same time. Something like: {% for lists %} first item from the first list first item from the second list {% endfor %} I thought about creating something like a map

Re: permissions and ownership

2010-08-26 Thread Bradley Hintze
Here are some more details. httpd.conf Alias /media/ /Users/bradleyhintze/django/MolProbity_Compare_test/media/ Order deny,allow Allow from all WSGIScriptAlias / /Users/bradleyhintze/django/MolProbity_Compare_test/apache/django.wsgi Order deny,allow Allow from all Error_log [Thu Aug 26

Re: how to turn off CSRF in django 1.2?

2010-08-26 Thread Alan
Ops, sorry, but I don't have this line django.middleware.csrf.CsrfViewMiddleware, as I said, it's a project done in 1.0.2. and I want it to run on my django 1.2 but without any reference to Csrf, since the server where the portal is runs 1.0.2 yet. On 26 Aug, 15:54, João Rodrigues

Re: How to create navigation urls in an intelligent manner

2010-08-26 Thread Uwe Schuerkamp
On 26 Aug., 17:08, bruno desthuilliers wrote: > > So would it be possible to access the request.path property from > > within a custom template tag? > > Of course, as long as > 1/ you pass it explicitely or > 2/ the request.path is available in the context passed to

Re: how to turn off CSRF in django 1.2?

2010-08-26 Thread Alan
Thanks João, you got exactly what I need. On 26 Aug, 15:54, João Rodrigues wrote: > go to your settings.py and comment out > django.middleware.csrf.CsrfViewMiddleware in your MIDDLEWARE_CLASSES > > On 26 August 2010 10:33, Alan wrote: > > > > > Hi

Re: double for in the template

2010-08-26 Thread Andrea Imparato
I have 2 lists and I have to scan them "concurrently" with the same indexes at the same time. Something like: {% for lists %} first item from the first list first item from the second list {% endfor %} I thought about creating something like a map with 2 values in each index but I don't know

Re: semicolon separated parameter gets inaccessible in QueryDict

2010-08-26 Thread bruno desthuilliers
On 26 août, 15:28, k4rlchen wrote: > Thank you Bruno, > > it didn't work "copy 'n paste' Code typed directly in googlegroups and working right OOTB ? Now _this_ would have been a very unexpected accident !-) > but lead me to the solution! Fine. -- You received this message

Re: How to create navigation urls in an intelligent manner

2010-08-26 Thread bruno desthuilliers
On 26 août, 16:43, Uwe Schuerkamp wrote: > On 26 Aug., 15:56, joconnell wrote: > > > Hi Uwe, > > > You might be able to leverage the 'url' template tag which comes with > > django? > > Hi John & Bruno, > > thanks for your answer. > > I've

Re: how to turn off CSRF in django 1.2?

2010-08-26 Thread João Rodrigues
go to your settings.py and comment out django.middleware.csrf.CsrfViewMiddleware in your MIDDLEWARE_CLASSES On 26 August 2010 10:33, Alan wrote: > Hi there, > > I developed in a system that uses django 1.2, but the server is still > django 1.0.2. > > Upgrading for a moment

Re: How to create navigation urls in an intelligent manner

2010-08-26 Thread Uwe Schuerkamp
On 26 Aug., 15:56, joconnell wrote: > Hi Uwe, > > You might be able to leverage the 'url' template tag which comes with > django? > Hi John & Bruno, thanks for your answer. I've looked at the url tag, but sadly it doesn't help me with customizing the url's in the

Re: Error working on many-to-many lookups

2010-08-26 Thread Alex Robbins
Jonathan, Pretty much any time you use __exact='text', you could use ='text' instead. I think the orm treats those two cases the same. (It adds __exact if there isn't another lookup specified. Alex On Aug 25, 1:37 pm, Christos Jonathan Hayward wrote: > I

permissions and ownership

2010-08-26 Thread Bradley Hintze
Hi all, I am a newbie when it comes to Appach and mod_wsgi. I followed http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango and think I did everthing correctly. However, I am having permission issues. I have been exposed to but am no entirely comfortable with permissions and ownership.

Re: How to create navigation urls in an intelligent manner

2010-08-26 Thread joconnell
Hi Uwe, You might be able to leverage the 'url' template tag which comes with django? e.g. For the 'add observation' example above, if you pass in the country code as part of the context you return in your view(s), or leverage middleware to automatically add it to every response based on the

Error configuring Django to run customized comments framework

2010-08-26 Thread Groady
I'm having an issue with setting up a Django website which uses the Django comments framework on my server. The site runs fine when run locally (using manage.py runserver) but when pushed live I'm getting the error: ImproperlyConfigured at / The COMMENTS_APP setting refers to a non-existing

Re: semicolon separated parameter gets inaccessible in QueryDict

2010-08-26 Thread k4rlchen
Thank you Bruno, it didn't work "copy 'n paste' but lead me to the solution! -- View this message in context: http://old.nabble.com/semicolon-separated-parameter-gets-inaccessible-in-QueryDict-tp29539791p29542413.html Sent from the django-users mailing list archive at Nabble.com. -- You

Re: Color in Console

2010-08-26 Thread Ramiro Morales
On Thu, Aug 26, 2010 at 3:28 AM, gasphynx wrote: > http://docs.djangoproject.com/en/dev/ref/django-admin/#syntax-coloring > > I'm using Python's logging module to output to the console with ./ > manage.py runserver. Is there anyway to colorize this output? I tried > explicitly

Re: How to create navigation urls in an intelligent manner

2010-08-26 Thread bruno desthuilliers
On 26 août, 13:27, Uwe Schuerkamp wrote: > Thanks Bruno, > > I'll look into the custom template tags you mentioned. Well, the way I see it you should first investigate the middleware part - that's probably where you'll get the most relevant infos. The templatetag part

Re: static files + index.html dynamic usign django

2010-08-26 Thread malo29
Thank you, problem solved. On 24 Ago, 14:33, Piotr Kilczuk wrote: > Hi, > > > Is it possible to mix static anddynamiccontent in the same directory > > using django? > > Yes :) At least as far as I understand your goal. > > Basic urlconf stuff - matter of order. > > P.S. Don't

Re: semicolon separated parameter gets inaccessible in QueryDict

2010-08-26 Thread bruno desthuilliers
On 26 août, 12:01, k4rlchen wrote: > Thanks Łukasz, > > unfortunatly, the application is in use for 10 years and delivered to > 300 > mobile computers. > A change of application would mean a big scale operation. > > I was not 100% correct describing the matter. The values are not

Re: How to create navigation urls in an intelligent manner

2010-08-26 Thread Uwe Schuerkamp
Thanks Bruno, I'll look into the custom template tags you mentioned. I had no idea when I started out with this project that I'd be knee deep into advanced django after a couple of weeks ;-) BTW, can you recommend the "pro django" book? All the best & thanks again for your help, Uwe -- You

Re: how to turn off CSRF in django 1.2?

2010-08-26 Thread Mathieu Leduc-Hamel
If I was you, I would not install django directly on the system. It's not generally a good practice. The best thing you might do is to use of these two methods: 1. virtualenv (http://tumblr.intranation.com/post/766290325/python-virtualenv-quickstart-django) 2. buildout

Re: how to turn off CSRF in django 1.2?

2010-08-26 Thread Sven Bröckling
Hi Alan, > I developed in a system that uses django 1.2, but the server is still > django 1.0.2. > Upgrading for a moment is not possible. Unless someone knows a nice > simple alternative, in order to keep my web portal compatible between > 1.0.2 and 1.2, I would like to switch off CSRF on my

Color in Console

2010-08-26 Thread gasphynx
http://docs.djangoproject.com/en/dev/ref/django-admin/#syntax-coloring I'm using Python's logging module to output to the console with ./ manage.py runserver. Is there anyway to colorize this output? I tried explicitly setting colors for notice and error but my logging output is colorless. --

ModelMultipleChoiceField queryset argument does not limit widget choices

2010-08-26 Thread The Boss
The documentation made this seem trivial but I must be missing something. I have an order form with a many to many field to ArchivedFiles. I want to just show file choices that start with the order number given to the form at instantiation. I almost works. class OrderForm(ModelForm): def

Re: semicolon separated parameter gets inaccessible in QueryDict

2010-08-26 Thread Tom Evans
On Thu, Aug 26, 2010 at 11:01 AM, k4rlchen wrote: > > Thanks Łukasz, > > unfortunatly, the application is in use for 10 years and delivered to > 300 > mobile computers. > A change of application would mean a big scale operation. > > I was not 100% correct describing the matter. The

Re: semicolon separated parameter gets inaccessible in QueryDict

2010-08-26 Thread k4rlchen
Thanks Łukasz, unfortunatly, the application is in use for 10 years and delivered to > 300 mobile computers. A change of application would mean a big scale operation. I was not 100% correct describing the matter. The values are not passed via url but in a form input field. The old cgi uses

how to turn off CSRF in django 1.2?

2010-08-26 Thread Alan
Hi there, I developed in a system that uses django 1.2, but the server is still django 1.0.2. Upgrading for a moment is not possible. Unless someone knows a nice simple alternative, in order to keep my web portal compatible between 1.0.2 and 1.2, I would like to switch off CSRF on my developing

Re: semicolon separated parameter gets inaccessible in QueryDict

2010-08-26 Thread Łukasz Rekucki
Hi, On 26 August 2010 09:56, k4rlchen wrote: > GET /order?asdf=1;2;3;4; In terms of HTTP this query is the same as: GET /order?asdf=1&2&3&4& and Django parses quesry strings accordingly to the HTTP specification. This is consitent with cgi.parse_qs(), so you should probably fix

Re: How to create navigation urls in an intelligent manner

2010-08-26 Thread bruno desthuilliers
On 25 août, 23:40, Uwe Schuerkamp wrote: > Hi folks, > > this posting sort of refers to my previous problem from last week as > I'm still working on the birdwatcher's site. I cannot wrap my head > around how to create intelligent navigation links from the current >

semicolon separated parameter gets inaccessible in QueryDict

2010-08-26 Thread k4rlchen
I am migrating an old CGI to a django application. Some of the values passed to the interface are semicolon separated. The requests come in like this: [26/Aug/2010 02:49:03] "GET /order?asdf=1;2;3;4; HTTP/1.1" 200 71 Django's QueryDict (request.POST) looks like this: When I do

Re: Building a generic list template - where should I start?

2010-08-26 Thread bruno desthuilliers
On 26 août, 04:00, Yo-Yo Ma wrote: > I'm wanting to build out a list template that can display any list of > objects in this manor (pseudo code: > > {% for thing in things %} > >     {{ thing.foo }} >     {{ thing.bar }} >     {{ thing.spam }} >     {{ thing.eggs }} >

Re: apache, mod_wsgi, windows: config hints?

2010-08-26 Thread Reinout van Rees
On 08/26/2010 05:01 AM, Sam Lai wrote: On 25 August 2010 20:09, Reinout van Rees wrote: I normally deploy everything on linux, but a customer requires windows. I have a working setup with apache and mod_wsgi, but I wonder about the efficiency. I see hints like

Re: Newbie question: can foreign key fields used as search fields on admin page?

2010-08-26 Thread Dennis Kaarsemaker
On wo, 2010-08-25 at 21:49 -0700, Joe Z wrote: > Is it possible to add 'publisher' into search_fields so that in admin > page books showed can be narrow down by a specific publisher? I tried > it but got the following exception: Not as such, but you can add publisher__name (assuming publisher