Django HTML Sitemap Generator?

2009-02-12 Thread Alfonso
Anyone know of an easy way/pluggable app that can generate a simple html sitemap output? I've used the sitemap module of Django to generate the .xml just fine - but surely I can manipulate that to get a html output to drop in a template? Thanks --~--~-~--~~~---~--~---

Re: How to detect inactivity session time out?

2009-02-12 Thread Brett Parker
On 11 Feb 21:40, ydjango wrote: > > > I put 15 minutes expiry/session cookie age in my django app > 1) I logged into my application > 2) I went to some page. > 3) Left that page open in browser. > 4) Came back after 16 minutes and clicked on a link on that open page > 5) I was thrown to login ho

Geos (geos-3.1.0rc2) wont 'make' on Ubuntu 8.10

2009-02-12 Thread Rhoel_in_Asia
HI folks, having a torrid time trying to get geoDjango running on Ubuntu 8.10. Not bing an expert on Ubuntu doesn't help when the manual says 'If GEOS is not in the usual directory', add to paths. Hilarious stuff when you cannot find it anywhere 'in the usual places'. Manual writers please take no

Re: DateField with Django

2009-02-12 Thread Edgard Matos
You have reason Alex. I'm sorry. On Wed, Feb 11, 2009 at 3:21 PM, Alex Gaynor wrote: > > > On Wed, Feb 11, 2009 at 12:19 PM, Edgard Matos wrote: > >> Anybody help me? >> >> On Wed, Feb 11, 2009 at 11:36 AM, Edgard Matos wrote: >> >>> Hi! >>> >>> I have a model with a DateField and I'm setting t

Re: Geos (geos-3.1.0rc2) wont 'make' on Ubuntu 8.10

2009-02-12 Thread Benjamin Wohlwend
Hi, On Feb 12, 11:03 am, Rhoel_in_Asia wrote: > HI folks, having a torrid time trying to get geoDjango running on > Ubuntu 8.10 [...] try GEOS 3.0.3 (the version that the GeoDjango docs recommend), it compiled without issue for me both on 8.04 and 8.10. http://download.osgeo.org/geos/geos-3.0.

Re: Geos (geos-3.1.0rc2) wont 'make' on Ubuntu 8.10

2009-02-12 Thread Rhoel_in_Asia
Okay, will give that a try - did wonder if its a script error in the latest version. Thanks. On Feb 12, 6:17 pm, Benjamin Wohlwend wrote: > Hi, > > On Feb 12, 11:03 am, Rhoel_in_Asia wrote:> HI > folks, having a torrid time trying to get geoDjango running on > > Ubuntu 8.10 > > [...] > > try

Re: to_field in model not working

2009-02-12 Thread Tim Sawyer
On Thursday 12 February 2009 01:47:31 Malcolm Tredinnick wrote: > On Wed, 2009-02-11 at 10:45 +, Tim Sawyer wrote: > > Hi, > > > > We're building an application with django on top of a legacy database and > > we've hit a problem with a to_field option being ignored. We've > > reproduced it wi

File Uploading

2009-02-12 Thread huw_at1
Hi all, I am trying to write a simple app that allows a user to select a file (via the browse button) from which data can be read in and parsed. I have read several examples but none seem to do exactly what I want. I have built a form and so am trying to use forms.FileField(). I can add this fiel

Re: executing raw sql results in traceback

2009-02-12 Thread Bobby Roberts
On Feb 11, 8:38 pm, Bobby Roberts wrote: > On Feb 11, 8:01 am,BobbyRoberts wrote: > > > there shouldn't be really.  The client has a search form and due to > > the way they want the search done there are about 40 option checkboxes > > for filtering in about 5 categories.  It would have been easie

Thoughts on nested Model references and JSON serialization

2009-02-12 Thread django_fo...@codechimp.net
I wanted to get the communities thoughts on this subject. I am working on a simple site that has news articles, each of which has a reference to a User object provided by django.contrib.auth that is the author of the news article. This is done right now using the following code: class NewsArtic

Re: sites framework

2009-02-12 Thread bax...@gretschpages.com
> so in admin interface i have 3 apps eventsapp, expoapp, and foodapp. > when i write in terminal > :~/DJANGOPRJ/myproject/exposite$/ python manage.py shell>>from > myproject.eventsapp.models import * > > Traceback (most recent call last): >   File "", line 1, in ? > ImportError: No module named

Re: Geos (geos-3.1.0rc2) wont 'make' on Ubuntu 8.10

2009-02-12 Thread John Handelaar
2009/2/12 Rhoel_in_Asia : > > Okay, will give that a try - did wonder if its a script error in the > latest version. Your make failure says pretty clearly that the right compiler is missing. Make sure on Ubuntu you have previously installed build-essential, g++ and python2.5-dev before trying to

Re: Documentation for Download?

2009-02-12 Thread Brian Neal
On Feb 11, 10:11 pm, Will Hardy wrote: > Hi all, > > Should the release tarball maybe contain pre-build html and pdf documentation? > That might be handy for those who don't want to install sphinx/latex etc. > > Cheers, > > Will See the recent thread on why this hasn't been done to date. But af

Error with File object

2009-02-12 Thread Stefan Tunsch
Hi! I had a working code that downloaded via FTP a file and then stored a record in the DB referencing it. I had to rewrite it because it was not handling well filenames with unicode characters in it. The problem is that now when trying to save the object to the DB I get the following error:

Re: File Uploading

2009-02-12 Thread Karen Tracey
On Thu, Feb 12, 2009 at 8:02 AM, huw_at1 wrote: > > Hi all, > > I am trying to write a simple app that allows a user to select a file > (via the browse button) from which data can be read in and parsed. I > have read several examples but none seem to do exactly what I want. I > have built a form

Re: File Uploading

2009-02-12 Thread Alex Gaynor
On Thu, Feb 12, 2009 at 9:38 AM, Karen Tracey wrote: > On Thu, Feb 12, 2009 at 8:02 AM, huw_at1 wrote: > >> >> Hi all, >> >> I am trying to write a simple app that allows a user to select a file >> (via the browse button) from which data can be read in and parsed. I >> have read several examples

Re: File Uploading

2009-02-12 Thread huw_at1
Yep I just found the thread about the enctype and indeed it was this and not my comp catching fire!!! Many thanks :) On Feb 12, 2:48 pm, Alex Gaynor wrote: > On Thu, Feb 12, 2009 at 9:38 AM, Karen Tracey wrote: > > On Thu, Feb 12, 2009 at 8:02 AM, huw_at1 wrote: > > >> Hi all, > > >> I am tryi

[Fwd: Error with File object]

2009-02-12 Thread Stefan Tunsch
I think I found a bug in the trunk. I downgraded to rev 9700 and it started to work again. Regards, Stefan Mensaje original Asunto: Error with File object Fecha: Thu, 12 Feb 2009 15:23:29 +0100 De: Stefan

Re: executing raw sql results in traceback

2009-02-12 Thread Karen Tracey
On Thu, Feb 12, 2009 at 8:11 AM, Bobby Roberts wrote: > > On Feb 11, 8:38 pm, Bobby Roberts wrote: > > On Feb 11, 8:01 am,BobbyRoberts wrote: > > > > > there shouldn't be really. The client has a search form and due to > > > the way they want the search done there are about 40 option checkboxes

Re: beforeSave callback: implementation suggestion

2009-02-12 Thread danfreak
I think I got the answer: read here: http://www.martin-geber.com/thought/2007/10/29/django-signals-vs-custom-save-method/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: UnicodeEncodeError with gettext

2009-02-12 Thread Scott
Hi Karen, Thanks for the suggestion on upgrading, I followed the steps to bring the Helper up to the latest revision hosted on Google code, but am still seeing the UnicodeEncodeErrors (not to mention that the language routing by cookie ceased to work). Does anyone have a working build that can v

Re: executing raw sql results in traceback

2009-02-12 Thread Bobby Roberts
> but I'm not entirely sure of that since you still haven't provided the > actual traceback which would show what code, exactly, is running into > trouble.  Without the traceback I have to fall back on my crystal ball, and > it's pretty cloudy at the moment. > > Karen My apologies... I didn't se

Null=True on Char/TextFields

2009-02-12 Thread tow
I know this seems to be a constant source of confusion; but I seem to have managed to confuse myself: class TextData(models.Model): text = models.TextField(blank=True) So I have a model with one textfield, whose value can be empty, and I don't want to worry about distinguishing NULLs and em

blank=True on Char/TextFields

2009-02-12 Thread tow
I know this seems to be a constant source of confusion; but I seem to have managed to confuse myself: class TextData(models.Model): text = models.TextField(blank=True) So I have a model with one textfield, whose value can be empty, and I don't want to worry about distinguishing NULLs and em

Re: Wierd FileField behavior

2009-02-12 Thread numshub
> I tried both 9765 and 9766. > Indeed, in 9765 I don't come accross the problems mentioned. In 9766 I > do. > > Files that were changed between these versions (by Jacob): > db/models/fields/files.py > core/files/base.py > > Erwin I have the same problem too. 9765 works fine. 9766 doesn't. I'm go

Re: Documentation for Download?

2009-02-12 Thread Tim Johnson
On Wednesday 11 February 2009, James Bennett wrote: > On Wed, Feb 11, 2009 at 9:01 PM, Tim Johnson wrote: > > I installed from the tarball, and I see the docs directory beneath the > > initially extracted directory and a makefile. So now my questions is: > > What is Sphinx and where do I get it?

Serving Images through apache without a virtual host

2009-02-12 Thread jacoberg2
I have been looking around at the forum and how people have been serving their images, but i can't seem to find exactly what i need. I am trying to create a site that produces a slideshow of graph plots in the form of images, so there is a very high volume of pictures that need to be served. So t

Admin site I18n - ForeignKeys, app names questions

2009-02-12 Thread 3lancer.eu
Hi, I don't know how (and if it's possible) to translate a couple of strings in the admin site. I think it will be better to show them here then to write: http://3lancer.eu/temp/django_admin_i18n_examples.gif Also, what does 'fuzzy' mean in my .po file? Couldn't find answers to my questions in

Re: Generic foreignKey model: Category

2009-02-12 Thread danfreak
Right, I created my Genric Category model using : - from django.db import models from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django import forms

Entering unicode bytestrings in Django

2009-02-12 Thread LaundroMat
Hi - I'm scraping some information from a website, but I'm having some trouble with special characters such as é. I'm using BeautifulSoup for the scraping, and would like to be able to have Django print out muy strings correctly (on the template, in the shell, in the admin). The way I go about i

Django unittests will not upload non-.txt files

2009-02-12 Thread Robert
I'm am trying to build an application that handles several types of uploads. Currently, it will work fine for .txt type files, but for all other kinds of files, the file is truncated to about 3 KB. I have determined that the file gets truncated during the request. I have included some sample co

signal connection

2009-02-12 Thread ben.dja...@googlemail.com
Sorry if this looks like a bump, i mistakenly put the original on the end of an old thread, posting now as new thread: Original: On Tue, 2009-02-10 at 09:02 +, Ben Eliott wrote: Can anyone please suggest why a signal might be failing to connect. I'm using 1.0.2 on apache + mod_wsgi. The sign

Re: signal connection

2009-02-12 Thread ben.dja...@googlemail.com
jeez, this just doesn't want to work. its one of those days. giving up. On Feb 12, 6:57 pm, "ben.dja...@googlemail.com" wrote: > Sorry if this looks like a bump, i mistakenly put the original on the > end of an old thread, posting now as new thread: > > Original: > > On Tue, 2009-02-10 at 09:02

Re: Entering unicode bytestrings in Django

2009-02-12 Thread Karen Tracey
On Thu, Feb 12, 2009 at 12:18 PM, LaundroMat wrote: > > Hi - > > I'm scraping some information from a website, but I'm having some > trouble with special characters such as é. I'm using BeautifulSoup for > the scraping, and would like to be able to have Django print out muy > strings correctly (o

ManyToManyField shown as a list of *values* in a textarea: request for code review

2009-02-12 Thread chazmatazz
Hi Django users, I want a ManyToManyField(A) to be shown in a textarea as a formatted list of a model field _x_ in the corresponding related model A (not a list of the A's pk field, which is easier). If a value for _x_ that does not exist in A is added, then I want a new record added to A (by imp

Re: ManyToManyField shown as a list of *values* in a textarea: request for code review

2009-02-12 Thread chazmatazz
I apologize, where it says CourseStudent replace with Student (I changed the name for the post). On Feb 12, 2:39 pm, chazmatazz wrote: > Hi Django users, > > I want a ManyToManyField(A) to be shown in a textarea as a formatted > list of a model field _x_ in the corresponding related model A (not

Re: Django unittests will not upload non-.txt files

2009-02-12 Thread Karen Tracey
On Thu, Feb 12, 2009 at 1:26 PM, Robert wrote: > > I'm am trying to build an application that handles several types of > uploads. Currently, it will work fine for .txt type files, but for > all other kinds of files, the file is truncated to about 3 KB. > > I have determined that the file gets tr

need help limiting choices on admin form for ForeignKey field

2009-02-12 Thread Michael Repucci
I'm new to Django, and already loving it. But I'm stumbling a bit with how to accomplish the following task. Perhaps this isn't the best approach, but most of the site is working as planned, and it was super easy to get up and running. I have a Contact model and a Person model, the latter of whic

Re: need help limiting choices on admin form for ForeignKey field

2009-02-12 Thread Alex Gaynor
On Thu, Feb 12, 2009 at 3:07 PM, Michael Repucci wrote: > > I'm new to Django, and already loving it. But I'm stumbling a bit with > how to accomplish the following task. Perhaps this isn't the best > approach, but most of the site is working as planned, and it was super > easy to get up and runni

Re: need help limiting choices on admin form for ForeignKey field

2009-02-12 Thread Michael Repucci
Oh. It doesn't mention that in the documentation. I am using 1.0.2- final. I'll check out formfield_for_dbfield. Thanks for the pointer! On Feb 12, 3:09 pm, Alex Gaynor wrote: > On Thu, Feb 12, 2009 at 3:07 PM, Michael Repucci wrote: > > > > > > > I'm new to Django, and already loving it. But I'

Re: need help limiting choices on admin form for ForeignKey field

2009-02-12 Thread Alex Gaynor
On Thu, Feb 12, 2009 at 3:12 PM, Michael Repucci wrote: > > Oh. It doesn't mention that in the documentation. I am using 1.0.2- > final. I'll check out formfield_for_dbfield. Thanks for the pointer! > > On Feb 12, 3:09 pm, Alex Gaynor wrote: > > On Thu, Feb 12, 2009 at 3:07 PM, Michael Repucci >

Re: Verbose field name DjangoUnicodeDecodeError

2009-02-12 Thread Joshua Russo
On Feb 11, 6:44 pm, Karen Tracey wrote: > On Wed, Feb 11, 2009 at 2:30 PM, Joshua Russo wrote: > > > Thanks so much. I think you are right. I will let you know tomorrow if > > I was able to fix it. I just need to figure out where the encoding is > > set in NetBeans and Textpad. I use a combinatio

Re: Entering unicode bytestrings in Django

2009-02-12 Thread LaundroMat
On Feb 12, 8:33 pm, Karen Tracey wrote: > On Thu, Feb 12, 2009 at 12:18 PM, LaundroMat wrote: > > > Hi - > > > I'm scraping some information from a website, but I'm having some > > trouble with special characters such as é. I'm using BeautifulSoup for > > the scraping, and would like to be able

bookmarks app with images

2009-02-12 Thread Tonu Mikk
Hello, I am having trouble writing a view to upload images. I am creating a bookmarks application with Django 1.02 that would have a screenshot for each bookmark. I extended the model in this way to include the images: class Photo(models.Model): title = models.CharField(max_length=50)

Re: executing raw sql results in traceback

2009-02-12 Thread Karen Tracey
On Thu, Feb 12, 2009 at 10:26 AM, Bobby Roberts wrote: > > My apologies... I didn't see Alex's post. Google some times collapses > threads on me. Replacing % with %% seemed to work. It queries the > database and returns a dataset like this: > > ((6L, u'WI', u'ST', u'test3', u'test3', u'test3',

Re: need help limiting choices on admin form for ForeignKey field

2009-02-12 Thread Michael Repucci
It seems that the formfield_for_dbfield method doesn't have a hook for the request. So unless I'm mistaken, I can't use it to filter the Contact instances by the currently logged in user (request.user). Any other thoughts? On Feb 12, 3:12 pm, Michael Repucci wrote: > Oh. It doesn't mention that

Re: need help limiting choices on admin form for ForeignKey field

2009-02-12 Thread Alex Gaynor
On Thu, Feb 12, 2009 at 3:33 PM, Michael Repucci wrote: > > It seems that the formfield_for_dbfield method doesn't have a hook for > the request. So unless I'm mistaken, I can't use it to filter the > Contact instances by the currently logged in user (request.user). Any > other thoughts? > > On Fe

Re: executing raw sql results in traceback

2009-02-12 Thread Bobby Roberts
On Feb 12, 3:29 pm, Karen Tracey wrote: > On Thu, Feb 12, 2009 at 10:26 AM, Bobby Roberts wrote: > > > My apologies... I didn't see Alex's post.  Google some times collapses > > threads on me.  Replacing % with %% seemed to work.  It queries the > > database and returns a dataset like this: >

Re: need help limiting choices on admin form for ForeignKey field

2009-02-12 Thread Michael Repucci
Oh, bummer. Is there a *not so good* way to do it in 1.0.2? It'd be nice to do it at all. Or is it perhaps not as scary as I think (as a newbie) to use the latest development version? On Feb 12, 3:35 pm, Alex Gaynor wrote: > On Thu, Feb 12, 2009 at 3:33 PM, Michael Repucci wrote: > > > > > > >

Re: need help limiting choices on admin form for ForeignKey field

2009-02-12 Thread Alex Gaynor
On Thu, Feb 12, 2009 at 3:49 PM, Michael Repucci wrote: > > Oh, bummer. Is there a *not so good* way to do it in 1.0.2? It'd be > nice to do it at all. > > Or is it perhaps not as scary as I think (as a newbie) to use the > latest development version? > > On Feb 12, 3:35 pm, Alex Gaynor wrote: >

Re: Documentation for Download?

2009-02-12 Thread Greg Ewing
Brian Neal wrote: > See the recent thread on why this hasn't been done to date. I can't help wondering whether the time it would take to add a tar command to the release process would be longer than all the time the developers have spent writing emails explaining why they haven't done it... --

admin/doc/ The requested admin page does not exist.

2009-02-12 Thread Chris Haynes
I add (r'^admin/doc/', include('django.contrib.admindocs.urls')) to urls.py and get the admin page Documentation link, but when I visit it I get a 404 error with the message "The requested admin page does not exist.". When I visit a bogus URL the error page confirms taht ^admin/doc/ is in the UR

Re: admin/doc/ The requested admin page does not exist.

2009-02-12 Thread Alex Gaynor
On Thu, Feb 12, 2009 at 4:39 PM, Chris Haynes wrote: > > I add (r'^admin/doc/', include('django.contrib.admindocs.urls')) to > urls.py and get the admin page Documentation link, but when I visit it > I get a 404 error with the message "The requested admin page does not > exist.". > > When I visi

What is the best way to keep state between posts?

2009-02-12 Thread Louis Sayers
Howdy, I've created a form that allows a user to post images to the server. Once the images are posted, I am saving them to disc, and if there are any errors, I return the form with the errors in them, and thumbnails of the successfully uploaded pictures. If they are unsuccessful when they post

admin media deployment

2009-02-12 Thread Chris Haynes
The admin interface had no styling until I added a symlink in the fcgi directory from media (my ADMIN_MEDIA_PREFIX is /media/) to the admin app media directory. The development server works fine on another machine w/o such a link. Another developer I spoke with fixed the same problem this way. Ne

Re: admin media deployment

2009-02-12 Thread Alex Gaynor
On Thu, Feb 12, 2009 at 4:49 PM, Chris Haynes wrote: > > The admin interface had no styling until I added a symlink in the fcgi > directory from media (my ADMIN_MEDIA_PREFIX is /media/) to the admin > app media directory. The development server works fine on another > machine w/o such a link. > >

Mutli-Assignable Models

2009-02-12 Thread Justin Lilly
Hi all. I have a project where I need to assign multiple models to each other via some many to many relationship. There are a few main players in my prototype: Articles, Photos and Shows. Shows has many Articles and Photos. Article has many Photos, but has one Show. Photos has one Show

Re: Admin site I18n - ForeignKeys, app names questions

2009-02-12 Thread rskm1
> Also, what does 'fuzzy' mean in my .po file? I'm not an authority on the subject but have dealt with translations and .po files quite a bit. The term "fuzzy" in this context means it's not an EXACT match, but it's very similar; i.e. a "fuzzy match". The "fuzzy" usually shows up when the origi

Re: Admin site I18n - ForeignKeys, app names questions

2009-02-12 Thread Alex Gaynor
On Thu, Feb 12, 2009 at 4:56 PM, rskm1 wrote: > > > Also, what does 'fuzzy' mean in my .po file? > > I'm not an authority on the subject but have dealt with translations > and .po files quite a bit. > > The term "fuzzy" in this context means it's not an EXACT match, but > it's very similar; i.e.

Re: bookmarks app with images

2009-02-12 Thread Louis Sayers
Firstly, make sure that you have the enctype="multipart/form-data" attribute on your form in your template. You can create an object of your form by writing: formObject = BookmarkSaveForm(request.POST, request.FILES) test if it's valid: if formObject.is_valid(): Looking at your Photo model, yo

Re: Wierd FileField behavior

2009-02-12 Thread numshub
Had a look at diff from 9765 and 9766. I think thata changes in release 9766 in db/models/fields/files.py somewhow broke admin site. 9766 address ticket #10044 allowing direct assignment of File object. It extends FileField model capability so I think we should focus to solve the issue on admin si

Re: [Fwd: Error with File object]

2009-02-12 Thread Karen Tracey
On Thu, Feb 12, 2009 at 9:55 AM, Stefan Tunsch wrote: > I think I found a bug in the trunk. > > I downgraded to rev 9700 and it started to work again. > > Regards, Stefan > I opened a ticket to track this: http://code.djangoproject.com/ticket/10249 Karen --~--~-~--~~~

Javascript problem

2009-02-12 Thread arbi
Hi all, I am trying to execute a javascript doc to display a google map. The javascript doc to refer to is "google-map.js". How do I write it in here ? : TEMPLATE : . I tryed many things and it did not work! I read many things, but I can't figure out how to solve this pb. Is there an easy solut

Re: Django unittests will not upload non-.txt files

2009-02-12 Thread Robert
Thank you, Karen. That has solved my problem completely. I appreciate the complete explanation as well. Kind regards, Robert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gro

Re: Javascript problem

2009-02-12 Thread Alex Gaynor
On Thu, Feb 12, 2009 at 5:28 PM, arbi wrote: > > Hi all, > > I am trying to execute a javascript doc to display a google map. The > javascript doc to refer to is "google-map.js". How do I write it in > here ? : > TEMPLATE : > > . > > I tryed many things and it did not work! I read many things, b

Re: Thoughts on nested Model references and JSON serialization

2009-02-12 Thread Russell Keith-Magee
On Thu, Feb 12, 2009 at 10:17 PM, django_fo...@codechimp.net wrote: > > I wanted to get the communities thoughts on this subject. I am > working on a simple site that has news articles, each of which has a > reference to a User object provided by django.contrib.auth that is the > author of the n

Get old value of Field in ModelForm clean_* method?

2009-02-12 Thread Chris Czub
Is there any way to get the old value of a field in a clean_* method on the ModelForm? That is - the validation depends on the old value of the field versus the new value. self.cleaned_data only contains the new value. Thanks, Chris --~--~-~--~~~---~--~~ You re

Re: Get old value of Field in ModelForm clean_* method?

2009-02-12 Thread Briel
Your problem is a bit unclear, but i think what you are looking for is in self.data in your clean_ method On 12 Feb., 23:56, Chris Czub wrote: > Is there any way to get the old value of a field in a clean_* method > on the ModelForm? > > That is - the validation depends on the old value of the f

Processing a file...

2009-02-12 Thread Amirouche B.
Hello, I 'd like to process some file before saving it, let's say it's an audio file that I want to be converted to ogg before it lands in the database forever. I tried to run ffmpeg2theora in the save method of the models but this doesn't work verywell, the testserver hangup after the processin

Re: File Uploading

2009-02-12 Thread 1234
enctype 2009/2/12 huw_at1 > > Yep I just found the thread about the enctype and indeed it was this > and not my comp catching fire!!! Many thanks :) > > On Feb 12, 2:48 pm, Alex Gaynor wrote: > > On Thu, Feb 12, 2009 at 9:38 AM, Karen Tracey > wrote: > > > On Thu, Feb 12, 2009 at 8:02 AM, huw_

Re: Get old value of Field in ModelForm clean_* method?

2009-02-12 Thread Chris Czub
No, that is the uncleaned data. Maybe a more explicit example will help: You go to edit an instance of a model that has a field named "title". The value of "title" for this particular instance is currently "Test". You change the value of "title" from "Test" to "Test123" and click "save". How

problem with model constructor

2009-02-12 Thread azymnis
I am in a situation where I want to create a model instance from another object. For this reason, I am trying to override the Model constructor so that it can take an object as an argument. However, this does not seem to work properly, since after I save, I cannot access the data with the object m

Re: Admin site I18n - ForeignKeys, app names questions

2009-02-12 Thread Malcolm Tredinnick
On Thu, 2009-02-12 at 16:58 -0500, Alex Gaynor wrote: [...] > I don't think strings marked as fuzzy are actually used for > translations, they are just kept around as references for the > translators benefit. That's correct. xgettext has identified that those translations aren't exact matches for

Re: Get old value of Field in ModelForm clean_* method?

2009-02-12 Thread Malcolm Tredinnick
On Thu, 2009-02-12 at 20:40 -0500, Chris Czub wrote: > No, that is the uncleaned data. > > Maybe a more explicit example will help: > > You go to edit an instance of a model that has a field named "title". > > The value of "title" for this particular instance is currently "Test". > > You chang

Re: problem with model constructor

2009-02-12 Thread Malcolm Tredinnick
On Thu, 2009-02-12 at 17:57 -0800, azymnis wrote: > I am in a situation where I want to create a model instance from > another object. For this reason, I am trying to override the Model > constructor so that it can take an object as an argument. However, > this does not seem to work properly, sinc

Re: Building a Django Blog: Change month "feb" to "02" in URL

2009-02-12 Thread twampss
Hi Frank, Thanks for the reference link. The month_format argument was exactly what I was looking for. I also didn't know that the default was set to '%b'. Once I explicitly added it in, it worked. I did this: entry_info_dict = { 'queryset': Entry.live.all(), 'date_field': 'p

Changing the name of a project

2009-02-12 Thread stevedegrace
I think I might have bitten off more than I can chew here, heh, and I need some help. I just finished my project and it looks awesome on my computer at home (running Ubuntu Intrepid). But before I deployed it, I decided I didn't like the retarded name I gave the project and I wanted to change it.

Django popular stories feed / widget

2009-02-12 Thread Rama Vadakattu
we strive hard to keep track of latest happening in the django . To assist in this process we have developed a feed/widget which brings out the popular stories in Django by examining (via friendfeed) 1) Google Reader shared items 2) Deliciuos, M

Re: Changing the name of a project

2009-02-12 Thread Malcolm Tredinnick
On Thu, 2009-02-12 at 19:45 -0800, stevedegrace wrote: > I think I might have bitten off more than I can chew here, heh, and I > need some help. I just finished my project and it looks awesome on my > computer at home (running Ubuntu Intrepid). But before I deployed it, > I decided I didn't like t

Database Error

2009-02-12 Thread waltbrad
I'm going through Sam's 24 hour. I've looked at this code for hours now, starting from about a week ago. I decided it wasn't that important and moved on. But now the author keeps referring back to this view and it hampers my continuing the code. It basically just adds a blog object as an attribut

Re: Database Error

2009-02-12 Thread Malcolm Tredinnick
On Thu, 2009-02-12 at 20:15 -0800, waltbrad wrote: > I'm going through Sam's 24 hour. I've looked at this code for hours > now, starting from about a week ago. I decided it wasn't that > important and moved on. But now the author keeps referring back to > this view and it hampers my continuing th

Re: Changing the name of a project

2009-02-12 Thread Rama Vadakattu
i think it is always good to decouple the imports and INSTALLED_APPS (in settings.py) from projectname. one way of doing this is a) in INSTALLED_APPS (settings.py) use just APPNAME instead of PROJECTNAME.APPNAME (it still works as the project path is on sys

Re: Changing the name of a project

2009-02-12 Thread Stephen DeGrace
Well, if I can't fix it it's not the end of the world because it's backed up with the old name, but I really want to figure out how to go about changing the project name. Anyway both names are pretty distinctive and extremely unlikely to occur incidentally in any unrelated strings. I'll post the t

Re: Changing the name of a project

2009-02-12 Thread Malcolm Tredinnick
On Fri, 2009-02-13 at 00:43 -0400, Stephen DeGrace wrote: > Well, if I can't fix it it's not the end of the world because it's > backed up with the old name, but I really want to figure out how to go > about changing the project name. Anyway both names are pretty > distinctive and extremely unlik

Re: Changing the name of a project

2009-02-12 Thread Ranjan Kumar
hey.. i'm not sure if it will work.. i had similar problem somtime back.. I figured out that there is a mapping for installed apps in 'django_content_type' table.. have a look into that table.. hope that helps.. On Fri, Feb 13, 2009 at 9:15 AM, stevedegrace wrote: > > I think I might have bitten

Re: Changing the name of a project

2009-02-12 Thread Stephen DeGrace
LOL I'm an even bigger idiot than you guys think :). At the end of the operation when I was changing the name of the directory itself I confused myself with a symlink and changed the name of the symlink, not the real directory. Changed the name of the directory, problem go bye bye. Weird eh? Anyway

Re: Changing the name of a project

2009-02-12 Thread Stephen DeGrace
Oh yeah, and the biggest thing: Thanks you guys! You're awesome. Now to figure out deploying the site on WebFaction with mod_wsgi :) On Fri, Feb 13, 2009 at 1:18 AM, Stephen DeGrace wrote: > LOL I'm an even bigger idiot than you guys think :). At the end of the > operation when I was changing th

using models interfaces as a communication layer (not to db directly)

2009-02-12 Thread matt pokrzywa
hello everyone, i'm planning to use django for a project in a security course i'm taking, and I have a question about leverage models: The models interface is really awesome, but for my project I can't have my frontend directly talk to my database. We are thinking of having our frontend send an

Re: using models interfaces as a communication layer (not to db directly)

2009-02-12 Thread Alex Gaynor
On Fri, Feb 13, 2009 at 12:29 AM, matt pokrzywa wrote: > > hello everyone, > > i'm planning to use django for a project in a security course i'm > taking, and I have a question about leverage models: > > The models interface is really awesome, but for my project I can't > have my frontend directly

Re: using models interfaces as a communication layer (not to db directly)

2009-02-12 Thread Rama Vadakattu
1) AppServer has to send XML means (i assume) DJango running on Apache has to send XML means let's route the URL to point to view which sends the respective XML URL is the means by which the frontend (javascript) will interact with appSERVER (django APP) means in (django

Re: using models interfaces as a communication layer (not to db directly)

2009-02-12 Thread matt pokrzywa
Hi Alex, Thanks for the quick response. I think what I really want is the latter, using XML as a backend using Django ORM. Is it feasible to do? Thanks, Matt On Feb 13, 12:34 am, Alex Gaynor wrote: > On Fri, Feb 13, 2009 at 12:29 AM, matt pokrzywa wrote: > > > > > > > hello everyone, > > >

Re: using models interfaces as a communication layer (not to db directly)

2009-02-12 Thread Alex Gaynor
On Fri, Feb 13, 2009 at 12:49 AM, matt pokrzywa wrote: > > Hi Alex, > > Thanks for the quick response. I think what I really want is the > latter, using XML as a backend using Django ORM. Is it feasible to > do? > > Thanks, > > Matt > > On Feb 13, 12:34 am, Alex Gaynor wrote: > > On Fri, Feb 13

Re: using models interfaces as a communication layer (not to db directly)

2009-02-12 Thread matt pokrzywa
Thanks for all the suggestions everyone. While it is quite the heavyweight solution (and we'll probably just do everything w/ just views in the end), could someone give me a small outline of the steps I'd need to take to pull this XML backend thing off? Or point me to the right place? Thanks! O

Error loading sqlite3 module

2009-02-12 Thread Sandeep
I just installed Python 2.6.1 and Django 1.0.2 on Windows. I am new to Python and Django and am following the tutorial for Django. Per tutorial, I am setting the 'DATABASE_ENGINE' to sqlite3 in settings.py file. However, I get the following error when I run 'python manage.py synchdb': django.co

Need to create a account_number column which is concat of id and some variable

2009-02-12 Thread gganesh
hello , i will be glad to find your help in the task mentioned below , i need to create a account_number column which is a concat of id column and with some variable ,for example, if my id column is 1 ( id =1) and account_number should be X1(account_number=X1) and if my id is 2 the account_number