Re: djangosnippets.org list navigation

2008-10-09 Thread Alessandro
2008/10/9 Rob Sutherland <[EMAIL PROTECTED]>: > I found this link to a search utility for djangosnippets the other > day. > > http://henning.cco-ev.de/django/djangosnippets.html It's possible to add it to djangosnippets.org? -- Alessandro Ronchi Skype: aronchi http://www.alessandroronchi.net

Re: What happened to django.core.validators

2008-10-09 Thread Thomas Guettler
meppum schrieb: > Is there an equivalent? > > > This page explains form and field validation: http://docs.djangoproject.com/en/dev/ref/forms/validation/ HTH, Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de

django-jython-oracle

2008-10-09 Thread dusans
Im currenty trying to make a prototype for my company, which would use django-jython and a oracle database. Im expiriencing problem cuz the documentation is sparse: http://code.google.com/p/django-jython/wiki/DatabaseBackends -> jython doesnt find the .jar in classpath :( tryed for a test with

Re: test client post exception due to cStringIO

2008-10-09 Thread Thomas Guettler
from http://docs.djangoproject.com/en/dev/topics/testing/#topics-testing If you provide content_type (e.g., text/xml for an XML payload), the contents of data will be sent as-is in the POST request, using content_type in the HTTP Content-Type header. ... you give post_content_type, this

Re: advice on admin site structure

2008-10-09 Thread krylatij
You can also inherit you GalleryPage and TextPage from your Page (not Abstract). Add content_type field to your Page. So it's easier to determine page by it's id, when i will write views. After that register in admin only TextPage and GalleryPage. Hope this helps

Re: Ordering in Admin Interface

2008-10-09 Thread David Christiansen
> It's not intended to work, so it seems like everything is behaving > correctly from that respect. The admin intentionally only orders on one > field. The reason being that the UI feedback for ordering on more than > one column is generally going to be confusing (nobody's come up with a > good

Re: Ordering in Admin Interface

2008-10-09 Thread Malcolm Tredinnick
On Thu, 2008-10-09 at 00:30 -0700, David Christiansen wrote: [...] > Thanks for the explanation. Given that the reason for only ordering > on one field is that it's hard to design a UI to order on two, why not > just allow ordering on more than one field for the default ordering, > and then

Re: advice on admin site structure

2008-10-09 Thread Adda Badda
Thanks krylatji. The content_type field would replace the type field in my current setup, right? I'll give that a go. My next problem is a I need to allow the admin system to order the pages, mixing both types of page. Hopefully I'll be able to figure this out after reworking my app with your

Re: Filter horizontal question

2008-10-09 Thread Donn
Bump... --~--~-~--~~~---~--~~ 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 PROTECTED] For

Re: advice on admin site structure

2008-10-09 Thread krylatij
If you want to have some hierarchy for you pages, look at django-mptt, but with this inheritance type (non abstract) it works not correct (I have added some changes to it to support this) another way i describe below. If you don't need hierarchy, so simple add 'order' field to Page For

About Syndication Feed Framework

2008-10-09 Thread lulalala
Hi everyone I recently had an idea about how personal writing management system by using a centralised repository and a feed factory. My site is at: http://www.lulalala.com/idea My friend pointed me to here because he said tje first few news websites using Django needed something similar. I am

Re: Access a model's original get_absolute_url

2008-10-09 Thread Erik Allik
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 6:00, Carl Meyer wrote: > > On Oct 8, 2:30 pm, Erik Allik <[EMAIL PROTECTED]> wrote: >> I've thought

how to setup the admin media?

2008-10-09 Thread Ethan
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? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

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

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

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/

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

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

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 =

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

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

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? --~--~-~--~~~---~--~~

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

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 =

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: 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

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

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

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

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 =

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

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

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

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: 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

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

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

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

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

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: 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: 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

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,

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

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

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

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

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

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

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

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

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

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: 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

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

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: >

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 =

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():

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

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

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

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

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

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

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':

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

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

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

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

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

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

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: 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: 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

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

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

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

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

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: >

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."

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

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: 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:

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.

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

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

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

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: 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

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

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=dollars=%2F=0=0 this is the relevant tamperdata output, though i'm not necessarily sure how to check if the session cookie is being set

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=dollars=%2F=0=0 this is the relevant tamperdata output, though i'm not necessarily sure how to check if the session cookie is being set

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

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

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

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 =

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: 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]>

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: 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

  1   2   >