Re: advice on admin site structure

2008-10-09 Thread krylatij
Sorry, it was my mistake about: > content_type = ContentType.objects.get_by_id(p.contenttype_id) Try this: > content_type = ContentType.objects.get_for_id(p.contenttype_id) About overriding save() method see http://docs.djangoproject.com/en/dev/topics/db/models/#overriding-predefined-model-method

Re: form submission problem

2008-10-09 Thread Stephen Cheng
Sorry about the silly question. This is resolved. All are documented: http://docs.djangoproject.com/en/dev/ref/forms/validation/#using-validation-in-practice Thanks for your help! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

Re: auth.login problems in Django 1.0

2008-10-09 Thread urukay
I would use HttpresponseRedirect instead of render_to_response after login. Try this: def login(request): news_list = New.objects.all().order_by('-date') if request.method == 'POST': username = request.POST['username'] password = request.POST['password'] user = auth.authenticate(

Re: using and displaying user info from django.auth

2008-10-09 Thread urukay
I don't know if I fully understand what is your problem. But I read your other conversation with Robocop. After auth.login(request, user) there should be HttpResponseRedirect() : if user.is_active: auth.login(request, user) return HttpResponseRedirect(' ') :

Re: change i18n language through hyperlinks

2008-10-09 Thread cschand
Even then you want in get method you can use the below code. In view from django import http from django.utils.translation import check_for_language from django.conf import settings def set_language(request, lang_code): """ Patched for Get method """ next = request.REQUEST.get(

Re: form submission problem

2008-10-09 Thread Stephen Cheng
Hi Malcolm Sorry, I didn't express clearly because I am also not sure where the problem is. I figure out that the database encoding is a problem. I use postgres8.2 and I checked that its encoding is SQL_ASCII, that's the problem. I have corrected this and now there is no problem with saving corr

Re: change i18n language through hyperlinks

2008-10-09 Thread Malcolm Tredinnick
On Thu, 2008-10-09 at 23:51 -0400, Chuck Bai2 wrote: > I want to allow user select language preference through clicking the > language hyperlinks like "_English_ | _French_" switch. And I also want > to redirect back to the previous page after clicking the language > switch. Is it possible to

change i18n language through hyperlinks

2008-10-09 Thread Chuck Bai2
I want to allow user select language preference through clicking the language hyperlinks like "_English_ | _French_" switch. And I also want to redirect back to the previous page after clicking the language switch. Is it possible to use Django view: django.views.i18n.set_language? In the docum

Re: Deleting a Model with ForeignKey relationship where null=True in Admin causes IntegrityError

2008-10-09 Thread Jon Loyens
I was looking for a ticket like that. Unfortunately I could see where either behavior is going to be controversial. If you set the foreign key back to null, some people will want it to be deleted. If you delete, some people will prefer it go back to null. Instead could there be an option on nu

Re: using request.POST as keyword args

2008-10-09 Thread Malcolm Tredinnick
On Thu, 2008-10-09 at 06:56 -0700, Taylor wrote: [...] > My question is: is there any way to do this without wasting the time > of a loop that just writes the values and keys into a new dict that I > actually can pass as a keyword argument? This doesn't seem like a > crazy request. I have my dat

Re: ManyToManyField status when post_save signal is emitted

2008-10-09 Thread Malcolm Tredinnick
On Thu, 2008-10-09 at 11:13 -0700, Aljosa Mohorovic wrote: > i have a problem that ManyToManyField in post_save signal doesn't seem > to be updated, i get wrong row count although i get right row count on > response/web page. > is this some kind of caching that i need to specify not to cache or >

Re: Deleting a Model with ForeignKey relationship where null=True in Admin causes IntegrityError

2008-10-09 Thread Malcolm Tredinnick
On Thu, 2008-10-09 at 09:28 -0700, Jon Loyens wrote: [...] > Is this a bug I'm seeing or am I missing something in either my models > or configuration? Or do I not understand how ForeignKeys where > null=True are supposed to work? It's possibly a bug. There's a ticket open (#9308) about it. The

Re: bug?: get_%s_display on CharField with choices (select field)

2008-10-09 Thread Malcolm Tredinnick
On Thu, 2008-10-09 at 07:31 -0700, felix wrote: > bug?: get_%s_display on CharField with choices (select field) > > I think I found a bug. You have, but it's in your code, not Django. :-) > I'm using a select input type widget by passing in 'choices' to a > CharField > > given: > > class Rel

Re: Multiple projects, model inheritance, and one common database

2008-10-09 Thread Malcolm Tredinnick
On Thu, 2008-10-09 at 11:53 -0700, barbara shaurette wrote: > *bump* > > Seriously - anyone have any ideas? Come on, Barbara, it's only been just over 24 hours since you posted. For something this complex, you're audience of prospective respondees is pretty limited. After all, you're basically

Re: Double encoded slash in path_info removed when using apache/wsgi

2008-10-09 Thread Merrick
Thank you Graham, I was going crazy trying to figure this out. Thankfully I control my hosting environment top to bottom (colocation) so I will try using REQUEST_URI I will use it. On Oct 8, 3:00 am, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Oct 8, 5:57 pm, Merrick <[EMAIL PROTECTED]> wr

Re: login problem, Django 1.0

2008-10-09 Thread Karen Tracey
On Thu, Oct 9, 2008 at 5:18 PM, Robocop <[EMAIL PROTECTED]> wrote: > > Having looked through the archived posts, i found a similar problem > that had found no solution: > http://groups.google.com/group/django-users/browse_thread/thread/bf05... > I get a 'topic not found' error from Google Groups

Re: advice on admin site structure

2008-10-09 Thread Adda Badda
Once again Krylatij, I cant thank you enough for your help! The content_types business has still been confusing me. Just to confirm- i have a field in my super class : content_type = models.ForeignKey(ContentType,editable=False,null=True) Working through your example I above: > p = Page.ob

Re: login problem, Django 1.0

2008-10-09 Thread Colin Bean
On Thu, Oct 9, 2008 at 4:15 PM, Robocop <[EMAIL PROTECTED]> wrote: > > > actually i read that wrong, i do not know what path it is being sent > to. I think that's the root path... you can verify in firefox if you look under preferences > privacy > show cookies. You said you moved from a dev set

Re: display User info, newbie

2008-10-09 Thread Robocop
Aaaah, i believe the login functionality is a subset of the sessions functionality, which does need cookies. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to d

Re: login problem, Django 1.0

2008-10-09 Thread Robocop
actually i read that wrong, i do not know what path it is being sent to. --~--~-~--~~~---~--~~ 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 uns

Re: login problem, Django 1.0

2008-10-09 Thread Robocop
Cookie=sessionid=6bc37c43a444db3aaf60a5c61e85bb01; support_tabs=0 Content-Type=application/x-www-form-urlencoded Content-Length=52 POSTDATA=username=moneybags&password=dollars&next=%2F&x=0&y=0 this is the relevant tamperdata output, though i'm not necessarily sure how to check if the session coo

Re: login problem, Django 1.0

2008-10-09 Thread Robocop
Cookie=sessionid=6bc37c43a444db3aaf60a5c61e85bb01; support_tabs=0 Content-Type=application/x-www-form-urlencoded Content-Length=52 POSTDATA=username=moneybags&password=dollars&next=%2F&x=0&y=0 this is the relevant tamperdata output, though i'm not necessarily sure how to check if the session coo

Re: Reorder a queryset/list with respect to another list

2008-10-09 Thread Andrew Ingram
Malcolm Tredinnick wrote > Here's one way that comes to mind: When you do the selection based on > the id's, use the in_bulk() queryset method. That returns you a > dictionary mapping each id value to the object with that id (see below > for how to do this without in_bulk() if that's not convenien

Re: display User info, newbie

2008-10-09 Thread KillaBee
On Oct 9, 5:53 pm, Robocop <[EMAIL PROTECTED]> wrote: > I'm sorry but i don't understand your question.  Could you please > CAREFULLY review your posts for typos or obvious grammatical errors as > right now, i have no idea what you're asking.  If you want to know if > my code works, yes it does.

Re: login problem, Django 1.0

2008-10-09 Thread Colin Bean
On Thu, Oct 9, 2008 at 3:25 PM, Robocop <[EMAIL PROTECTED]> wrote: > > All right, this is getting absolutely ridiculous. I tried to > workaround my problems by using the built in contrib.auth.views.login, > and of course this resulted in the same behavior. I am very reluctant > to think this is

Re: login problem, Django 1.0

2008-10-09 Thread Robocop
I'm going to burn my server down, i could really use some help. --~--~-~--~~~---~--~~ 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 f

Re: display User info, newbie

2008-10-09 Thread Robocop
I'm sorry but i don't understand your question. Could you please CAREFULLY review your posts for typos or obvious grammatical errors as right now, i have no idea what you're asking. If you want to know if my code works, yes it does. I've tested every single line of my login code, and the only l

Re: display User info, newbie

2008-10-09 Thread KillaBee
On Oct 9, 5:28 pm, Robocop <[EMAIL PROTECTED]> wrote: > is your {{user}} variable not showing up at all, or is it returning > "AnonymousUser"?  If it is returning AnonymousUser then I am having > the exact same problem.  DO NOT waste your time trying to use the > contrib.auth.views login functio

Re: display User info, newbie

2008-10-09 Thread Robocop
is your {{user}} variable not showing up at all, or is it returning "AnonymousUser"? If it is returning AnonymousUser then I am having the exact same problem. DO NOT waste your time trying to use the contrib.auth.views login function as i just attempted that and it gave me the same behavior. Wh

Re: Development server serves media from wrong directory

2008-10-09 Thread Keith Eberle
Maybe an example will clear it up. Its pretty much taken from the documentation. I leave the ADMIN_MEDIA_PREFIX as the default value. # settings.py MEDIA_ROOT = '/home/django/django-projects//media/' MEDIA_URL = '/site_media/' # urls.py from django conf import settings if settings.DEBUG: ur

Re: login problem, Django 1.0

2008-10-09 Thread Robocop
All right, this is getting absolutely ridiculous. I tried to workaround my problems by using the built in contrib.auth.views.login, and of course this resulted in the same behavior. I am very reluctant to think this is a bug, but rather some type of session misunderstanding, but i'm running out

Re: display User info, newbie

2008-10-09 Thread KillaBee
On Oct 9, 4:58 pm, Robocop <[EMAIL PROTECTED]> wrote: > request.user will return the currently logged in user, so i'm assuming > your login code is returning nothing. > > Try something like user  = auth.authenticate(username = > username_from_html, password = password_from_html) in your login co

contrib.auth.views.login questions

2008-10-09 Thread Robocop
The documentation for this seemed kind of vague to me, and i've tried all the different permutations i could think of. What should be passed as the variable "site_name"? I''ve tried the variable in the "name" column from the django_site table but i get the "Site matching query does not exist." e

Re: Development server serves media from wrong directory

2008-10-09 Thread Robert
How is the MEDIA_URL reflected in my settings? If MEDIA_URL is '/ site_media/', should my urls.py then be r'^site_media/$'? I fail to understand the role it plays in all this. Thanks again for your replies. Kind regards, Robert On Oct 9, 3:35 pm, "Keith Eberle" <[EMAIL PROTECTED]> wrote: > C

Using raw_id_fields with a many-to-many field

2008-10-09 Thread Hancock, David (dhancock)
I've found that using raw_id_fields saves a lot of time for our users over loading an entire many-to-many select. (But for shorter lists, the many-to-many widget is by far the best interface I've seen for multiple selections.) There's an aspect of the raw_id_fields (this is in the admin interface)

Re: display User info, newbie

2008-10-09 Thread Robocop
request.user will return the currently logged in user, so i'm assuming your login code is returning nothing. Try something like user = auth.authenticate(username = username_from_html, password = password_from_html) in your login code, and then see if you can use the {{user}} variable in the page

Re: display User info, newbie

2008-10-09 Thread KillaBee
On Oct 9, 4:24 pm, Robocop <[EMAIL PROTECTED]> wrote: > I'm sorry but your question is very difficult to understand.  From > what i understand you want to show the username in a form, so why not > just do a username = request.user in your view, and then {{username}} > in your html template?  If

How do I get image data from my newform into my model?

2008-10-09 Thread Andrew
I'm upgrading to 1.0 from .97. Previously I had retrieved the cleaned data from my form, and called mymodel.save_FIELD_file() with the cleaned data, but that doesn't work anymore in 1.0. Without resorting to a modelform (since I need to do custom validation, like specific filetype, size and files

Re: Development server serves media from wrong directory

2008-10-09 Thread Keith Eberle
Correct, they can't be the same. That's why I put /site_media/ to serve your projects media files in my reply. You can make them whatever you want, but they have to be different. keith On Thu, Oct 9, 2008 at 4:36 PM, Robert <[EMAIL PROTECTED]>wrote: > > Thanks for your reply, Keith. > > I hav

Re: display User info, newbie

2008-10-09 Thread Robocop
I'm sorry but your question is very difficult to understand. From what i understand you want to show the username in a form, so why not just do a username = request.user in your view, and then {{username}} in your html template? If you need to pass the username variable with the form, then just

Re: Practical Django Projects source code

2008-10-09 Thread [EMAIL PROTECTED]
Thanks to you both for the help. --~--~-~--~~~---~--~~ 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

Re: Firefox 3.0.3 problem with session expire at browser close

2008-10-09 Thread alan
Just realized I'm using Django-1.0_alpha_2-py2.5.egg-info. I think I'll upgrade tomorrow. On Oct 9, 4:45 pm, alan <[EMAIL PROTECTED]> wrote: > In my settings.py I have SESSION_EXPIRE_AT_BROWSER_CLOSE=True.  In IE7 > it works fine (i.e. the user must log into the site again after > closing the br

login problem, Django 1.0

2008-10-09 Thread Robocop
Having looked through the archived posts, i found a similar problem that had found no solution: http://groups.google.com/group/django-users/browse_thread/thread/bf05... It looks like django is not actually logging my user in, or not creating a session. I have a very simple snippet for login func

Firefox 3.0.3 problem with session expire at browser close

2008-10-09 Thread alan
In my settings.py I have SESSION_EXPIRE_AT_BROWSER_CLOSE=True. In IE7 it works fine (i.e. the user must log into the site again after closing the browser). In Firefox 3.0.3 the user remains logged onto the site after closing the browser. The only way it works in Firefox is to goto Tools->Option

display User info, newbie

2008-10-09 Thread KillaBee
I have been looking around all day for a way to display the username of a page. The only thing that I could find is making my a middleware. there has got to be something that I can put on my template like the {{ form.as_p }} to display fields from form. can someone please, give me a hint..the fi

Re: Development server serves media from wrong directory

2008-10-09 Thread Robert
Thanks for your reply, Keith. I have made your suggested changes, but unfortunately I still cannot display images. On a whim, I put an image file in C:\Python25\Lib\site-packages\django/ contrib/admin/media\img02.jpg and used the following code in my template: wrote: > you need to change these

Re: Django book says MSSQL works with 1.0...?

2008-10-09 Thread Adam V.
I'm the django-mssql maintainer; please do post in bugs or weirdness you run into to http://code.google.com/p/django-mssql/ and I'll try to get the fixed. Thanks, -Adam V. (For what it's worth, at work we're using Apache + mod_python for our internal development; haven't gone to production yet.)

Re: Development server serves media from wrong directory

2008-10-09 Thread Keith Eberle
you need to change these: #from settings.py MEDIA_ROOT = 'D:/workspace/isiscore/media/' MEDIA_URL = '/site_media/' ADMIN_MEDIA_PREFIX = '/media/' #from urls.py from django.conf import settings (r'^media/(?P.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_URL, 'show_indexes':

Development server serves media from wrong directory

2008-10-09 Thread Robert
I'm hoping I've just missed a simple switch, but I'm trying to get some simple CSS and images set up using the development server. First, my setup: from urls.py (r'^media/(?P.*)$', 'django.views.static.serve', { 'document_root': 'D:/workspace/isiscore/media', 'show_indexes': True, }), from sett

Re: Practical Django Projects source code

2008-10-09 Thread secondmouse
Hope this link help: http://code.djangoproject.com/browser/djangoproject.com/django_website/templates/blog You need to adjust the field names in your templates according to your coltrane app. For example, my coltrane/entry_archive.html looks like this Entries index

first-time in this group

2008-10-09 Thread secondmouse
Just to say hi. I'm posting this because I was not able to reply to a discussion and I'm wondering I can do that after this. Nice to be here. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To p

Re: Django Hosting Survey

2008-10-09 Thread Wes Winham
If you're looking for something with some power off the bat (which it doesn't sound like you are), Amazon's EC2 (http://aws.amazon.com/ec2/) is amazing. If you start there, you can stay there right up to the point that you're bigger than amazon.com :) It has the same disadvantages of slicehost or

Re: Manager to add entries where there is a ManyToMany relationship

2008-10-09 Thread Jason Sypolt
I have the same problem. Does anyone have an example of what we the code in the view would look like? On Sep 25, 2:37 pm, SnappyDjangoUser <[EMAIL PROTECTED]> wrote: > Hi Everyone, > > Am I on the right track with my M2M model definition (which includes > an intermediate table)?  I still need hel

Re: Multiple projects, model inheritance, and one common database

2008-10-09 Thread barbara shaurette
*bump* Seriously - anyone have any ideas? On Oct 8, 11:46 am, barbara shaurette <[EMAIL PROTECTED]> wrote: > Actually, that's been suggested ... and considered.  The problem is > that these two initial projects aren't going to be the only ones. > There will be more sites in the future, all sligh

Re: using request.POST as keyword args

2008-10-09 Thread Taylor
Dave, that is the problem. I need to be able to call perform elsewhere in the code (not necessarily from a view), and it would be difficult to build the datadict to do that. I like your solution, though. For now I'm using this loop: data = {} for key in request.POST.keys(): data[str(key

using and displaying user info from django.auth

2008-10-09 Thread KillaBee
Hey and thanks for the help that I get on here. This might seem simple, but I can make sure that the User name and password matches but after loging in I would like them to see there info and filter the db and then display records. I login with this view: def login(request): username = reques

Re: using request.POST as keyword args

2008-10-09 Thread David Durham, Jr.
> I do not understand why you want to do this. Why not just pass request.POST > without the **, and declare your function to take a single argument which > you expect to be a dictionary-like object (as request.POST, a QueryDict, > is)?. That is: > > result = ab.perform(request.POST) > where: > d

ManyToManyField status when post_save signal is emitted

2008-10-09 Thread Aljosa Mohorovic
i have a problem that ManyToManyField in post_save signal doesn't seem to be updated, i get wrong row count although i get right row count on response/web page. is this some kind of caching that i need to specify not to cache or something similar? part of code with problem: --- def sorted_photos_c

Re: what is the correct way to create a hidden form field?

2008-10-09 Thread Matias Surdi
Ignore it. Solved Matias Surdi escribió: > I want to output an > > Thanks. > > > > > --~--~-~--~~~---~--~~ 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@goo

what is the correct way to create a hidden form field?

2008-10-09 Thread Matias Surdi
I want to output an http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---

Re: Deleting a Model with ForeignKey relationship where null=True in Admin causes IntegrityError

2008-10-09 Thread Jon Loyens
As a note... I've worked around this for the time being by setting cascade on delete explicitly in db. That said, I'd still like to know if this is a bug or if I'm doing something wrong with my models. Jon. On Oct 9, 11:28 am, Jon Loyens <[EMAIL PROTECTED]> wrote: > See the following set of mode

Re: Filter horizontal question

2008-10-09 Thread Donn
On Thursday, 09 October 2008 18:10:49 SnappyDjangoUser wrote: > I think you are looking for the Pagination class Thanks for the reply -- I know about Pagination but I was asking in a particular context. Perhaps those docs mention the admin side of things. I will have another look. \d --~--~--

Deleting a Model with ForeignKey relationship where null=True in Admin causes IntegrityError

2008-10-09 Thread Jon Loyens
See the following set of models: class Mom(models.Model): name = models.CharField(max_length=80) def __unicode__(self): return self.name class Dad(models.Model): name = models.CharField(max_length=80) def __unicode__(self): return self.name class Child(models.M

Re: advice on admin site structure

2008-10-09 Thread krylatij
First of all about ContentTypes: For example in your Page table you have 2 lines. One is PageText, another PageGallery. So you have 2 different ContentTypes. How to determine type of Page: p = Page.objects.get(id='main') #here we get ContentType object for PageText or PageGallery content_ty

Re: Filter horizontal question

2008-10-09 Thread SnappyDjangoUser
I think you are looking for the Pagination class. Check out the documentation at http://docs.djangoproject.com/en/dev/topics/pagination/. On Oct 7, 2:14 am, Donn <[EMAIL PROTECTED]> wrote: > Hi, > After spending many (many) days on my own CRUD system I am *really* seeing the > beauty of the Dja

Re: problem posting data to MYSQL

2008-10-09 Thread KillaBee
On Oct 9, 10:03 am, KillaBee <[EMAIL PROTECTED]> wrote: > On Oct 8, 8:13 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > > > > On Wed, Oct 8, 2008 at 8:28 PM, KillaBee < > > > [EMAIL PROTECTED]> wrote: > > >    It is a model, > > >http://dpaste.com/83272/itis called time, and timesheets it whe

Re: Translations are not linkable, middleware to insert Language code in the URL

2008-10-09 Thread Frantisek Malina
I found it at http://code.google.com/p/django-localeurl/ More context: http://groups.google.com/group/django-developers/browse_thread/thread/3417b90f0e6fda9f http://www.satchmoproject.com/trac/ticket/459 --~--~-~--~~~---~--~~ You received this message because you

filter-widgets

2008-10-09 Thread jorgehugoma
Hi, Is there a way to filter the data of a "one-to-one" field widget before it is rendered as HTML? thanks, Jorge Hugo Murillo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

Re: advice on admin site structure

2008-10-09 Thread Adda Badda
Thanks again Krylatij, I now have a super Page class and two sub classes GalleryPage and TextPage. I can play around with the admin templates to stop the Page class being instantiated but still display all pages on one page ordered using an order field as suggested. Is it possible for a instance

Re: problem posting data to MYSQL

2008-10-09 Thread KillaBee
On Oct 8, 8:13 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Wed, Oct 8, 2008 at 8:28 PM, KillaBee < > > [EMAIL PROTECTED]> wrote: > >    It is a model, > >http://dpaste.com/83272/it is called time, and timesheets it when I > > tried to do it the form way.  So, the key word is save().  Can

Re: newbie question about breadcrumbs

2008-10-09 Thread Malcolm Tredinnick
On Thu, 2008-10-09 at 15:04 +0200, Mirto Silvio Busico wrote: [...] > So I'm convinced that I have misunderstood all the breadcrumbs matter. I think you're just expecting something to happen that isn't true. The breadcrumbs in the admin are always going to be (1) Home -- pointing to the root ad

Re: newbie question about breadcrumbs

2008-10-09 Thread Mirto Silvio Busico
Thanks to all who have replied. I'll try our suggestions Mirto Carl Meyer ha scritto: > Hi Mirto, > > On Oct 9, 9:04 am, Mirto Silvio Busico <[EMAIL PROTECTED]> wrote: > >> I'm confused because the admin app seems unaware of living inside a >> project that is inside an apache site: the home l

Re: using request.POST as keyword args

2008-10-09 Thread Karen Tracey
On Thu, Oct 9, 2008 at 9:56 AM, Taylor <[EMAIL PROTECTED]> wrote: > > I want to be able to do this: > > result = ab.perform(**request.POST) > > where: > def perform(self, **kwargs): > > Of course, this doesn't work, and I get the error "keywords must be > strings". After some searching, I suppose

Translations are not linkable, middleware to insert Language code in the URL

2008-10-09 Thread Frantisek Malina
Django native translation functionality will get the preferred language from the user's device. Than it will give the user application (and possibly content) in the user's language on the same URL. Is there a middleware that would put the language iso-alpha-2 code in the URL if that language tran

bug?: get_%s_display on CharField with choices (select field)

2008-10-09 Thread felix
bug?: get_%s_display on CharField with choices (select field) I think I found a bug. I'm using a select input type widget by passing in 'choices' to a CharField given: class ReleaseFeedback(models.Model): RATINGS = ( (1,'*'),(2,'**'),(3,'***'),(4,''),(5,'*') ) rating = models

Re: Django / Postgresql problem

2008-10-09 Thread Anderson Santos
No, problem still exists. sigh. On Oct 5, 10:10 am, "Anderson Santos" <[EMAIL PROTECTED]> wrote: > Hello, everyone > > I am getting a strange "permission denied" error on database server running > my site. > > I am trying to send bulk mail to a huge list, it was working fine few days > ago but no

Re: Django / Postgresql problem

2008-10-09 Thread Anderson Santos
Finally I get rid of this problem. It seems to be a conflict between two Django directories. The web app was using one version and the cron was using from a different path, don't know why but that was giving me that problem, maybe it's related to Psycopg or something like that, since both django c

using request.POST as keyword args

2008-10-09 Thread Taylor
I want to be able to do this: result = ab.perform(**request.POST) where: def perform(self, **kwargs): Of course, this doesn't work, and I get the error "keywords must be strings". After some searching, I suppose this is because the POST dict uses unicode, but Python expects strings or somethin

[ANN] Call for proposals: PyCon 2009

2008-10-09 Thread Jacob Kaplan-Moss
Howdy folks -- It's that time of year again: PyCon 2009 is accepting proposals for talks and tutorials. PyCon 2009 will be held in Chicago, Illinois from March 27 - 29; there will be two tutorial days before and four development sprint days after. PyCon has special meaning to Django: we first de

Re: newbie question about breadcrumbs

2008-10-09 Thread Carl Meyer
Hi Mirto, On Oct 9, 9:04 am, Mirto Silvio Busico <[EMAIL PROTECTED]> wrote: > I'm confused because the admin app seems unaware of living inside a > project that is inside an apache site: the home link always point to the > first admin app page The admin breadcrumbs are never aware of anything ou

Re: Password Change Usage

2008-10-09 Thread Carl Meyer
On Oct 8, 11:56 pm, "Chris Spencer" <[EMAIL PROTECTED]> wrote: > Yeah, this has been a big let down. What I'd hoped would be a few > minutes setting up a basic site framework has turned into several > hours wasted on boilerplate. The lack of docs, templates, and strange > bugs like these leads me

Re: Formsets/forms where only a few fields of a model will be changed?

2008-10-09 Thread Karen Tracey
On Thu, Oct 9, 2008 at 7:11 AM, djimmy <[EMAIL PROTECTED]> wrote: > > Hi All, > > Not quite up to speed, but I've got a bunch of books: > > STATUS_CHOICES = ( > ( 0, 'Proofreading'), > ( 1, 'Editing'), > ( 2, 'Printing'), > ) > > class Book(models.Model): > title = models.CharField

newbie question about breadcrumbs

2008-10-09 Thread Mirto Silvio Busico
Hi all, I'm lost in understanding how to use/reuse or create breadcrumbs. Where can I find documentation /examples of setting up breadcrumbs? This is my use case: I have a site with the admin app. So I have: mysyte (admin) myapp1 myapp2 The mysite site is hosted behi

Re: Django book says MSSQL works with 1.0...?

2008-10-09 Thread Ulises
> What server did you use? > > If not Apache + mod-python or mod-wsgi, please say more about your > setup? I haven't deployed just yet as I'm still developing. I'm open to suggestions really :) U --~--~-~--~~~---~--~~ You received this message because you are sub

Re: Django book says MSSQL works with 1.0...?

2008-10-09 Thread bobhaugen
On Oct 9, 6:00 am, Ulises <[EMAIL PROTECTED]> wrote: > I'm currently using django-mssql with Django 1.0 no problems at all. Ulises, thanks. What server did you use? If not Apache + mod-python or mod-wsgi, please say more about your setup? --~--~-~--~~~---~--~~ You

Re: How to submit a dynamic form?

2008-10-09 Thread Malcolm Tredinnick
On Thu, 2008-10-09 at 05:20 -0700, yabbi wrote: > Hello everyone. > > When I use the form of the django, I found, it is diffcult to set > option of the ChoiceFields dynamicly. > > I used followed method to set the options > > form.fields['selNetwork'].choices = ((data.id,data.code)) Choices s

Re: form submission problem

2008-10-09 Thread Malcolm Tredinnick
On Thu, 2008-10-09 at 04:57 -0700, Stephen Cheng wrote: > I defined a field title in model the max length is 30 > title=models.CharField("Title",max_length=30) > > while after I key in none - english characters, eg, Chinese and submit > the form, it [database] can only take 10 Chinese characters

How to submit a dynamic form?

2008-10-09 Thread yabbi
Hello everyone. When I use the form of the django, I found, it is diffcult to set option of the ChoiceFields dynamicly. I used followed method to set the options form.fields['selNetwork'].choices = ((data.id,data.code)) but when I submit the form, the Select's options turn empty. Anyone knows

form submission problem

2008-10-09 Thread Stephen Cheng
I defined a field title in model the max length is 30 title=models.CharField("Title",max_length=30) while after I key in none - english characters, eg, Chinese and submit the form, it [database] can only take 10 Chinese characters,otherwise raise an exception. I also use an validation rule in th

Re: Django-sphinx with postgresql

2008-10-09 Thread Anderson Santos
Hello Rob We are using Sphinx and Postgresql and it improved our searches with less resources. We have over 300k records in one table and a usual search takes only few milisecons. I believe it's being maintained but with current code it's working very well without any update. Hope it helps An

Formsets/forms where only a few fields of a model will be changed?

2008-10-09 Thread djimmy
Hi All, Not quite up to speed, but I've got a bunch of books: STATUS_CHOICES = ( ( 0, 'Proofreading'), ( 1, 'Editing'), ( 2, 'Printing'), ) class Book(models.Model): title = models.CharField(max_length=255) author = models.ForeignKey(Author) description = models.TextFiel

Re: Django book says MSSQL works with 1.0...?

2008-10-09 Thread Malcolm Tredinnick
On Thu, 2008-10-09 at 03:58 -0700, bobhaugen wrote: > ...but Django documentation does not mention it. What is the real > current story? > > http://www.djangobook.com/en/beta/chapter02/ says: > > "As of version 1.0, Django supports five database engines: > [...] > * Microsoft SQL Server (h

Re: Access a model's original get_absolute_url

2008-10-09 Thread Erik Allik
that is, AFTER i wrote my previous letter. Erik On 09.10.2008, at 11:32, Erik Allik wrote: > > Carl is right, yes. I realized this myself a few hours before I wrote > my previous letter. :) I actually even WANT to do this after the > ABSOLUTE_URL_OVERRIDES stuff. > > Erik > > On 09.10.2008, at

Re: timeit module put my app into infinite loop

2008-10-09 Thread bruno desthuilliers
On 8 oct, 07:09, "K*K" <[EMAIL PROTECTED]> wrote: > Thank you, Bruno. > > My program running ok with your guide. > > My goal is to compare the ORM performance of Django and > TurboGears(SQLObject or SQLAlchemy). Given that both SQLObject and SQLAlchelmy are usable as standalone components, you

Re: Django book says MSSQL works with 1.0...?

2008-10-09 Thread Ulises
> "As of version 1.0, Django supports five database engines: > [...] >* Microsoft SQL Server (http://www.microsoft.com/sql/)" > > I also see these seemingly-active django + MSSQL projects in Google > code: > > http://code.google.com/p/django-mssql/ > http://code.google.com/p/django-pyodbc/ I'

Django book says MSSQL works with 1.0...?

2008-10-09 Thread bobhaugen
...but Django documentation does not mention it. What is the real current story? http://www.djangobook.com/en/beta/chapter02/ says: "As of version 1.0, Django supports five database engines: [...] * Microsoft SQL Server (http://www.microsoft.com/sql/)" I also see these seemingly-active dja

Re: check if file exists before uploading | adding a validator to a field

2008-10-09 Thread jelle
Many thanks Carl, that was most helpful! --~--~-~--~~~---~--~~ 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 em

Re: Djando developers in the Dallas area

2008-10-09 Thread Tim Chase
chimpera wrote: > I am in need of some Django help. Is there anyone in the dfw area who > can share there expertise? I'm in Frisco, and I believe that there are several others according to http://djangopeople.net/us/tx/ There are several other localities there: Plano, Coppell, Richardson, Dal

Re: Django site speed - I think I have a problem with my config!

2008-10-09 Thread [EMAIL PROTECTED]
Hi Julian, I did actually try setting it to 500, but no joy. I think I may just have a heavy app that needs sorting out! Thanks for all your help guys, Mike. On Oct 3, 4:35 pm, julianb <[EMAIL PROTECTED]> wrote: > On Oct 3, 10:08 am, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > Is t

Re: how to setup the admin media?

2008-10-09 Thread Christian Joergensen
Ethan wrote: > In my first django project, use the apache server, in the admin page, > it can't find the css file. and how does the admin css file generate? http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#id3 -- Christian Joergensen http://www.technobabble.dk --~--~-~-

  1   2   >