Making a wiki - code suggestions welcomed

2006-08-16 Thread [EMAIL PROTECTED]
I'm making a wiki in Django, it's very basic right now (add, edit, history, diff) but as it is my first not-mini app in the framework I would welcome any comments and sugestions about the code and any other replyes :) I want to make it as it should be. Source: http://www.rk.edu.pl/diamanda.zip

smtplib with TLS in django

2006-08-16 Thread ihomestore
Does django support sending email via TLS? I am trying to use gmail smtp server to send out emails but it needs TLS. Is there a way to do this in django? Instead of using django's send_mail, I am using tlslite to send out emails via gmail's smtp server. If django supports tls, that would be

Re: showing future events only?

2006-08-16 Thread Jeremy Dunck
On 8/16/06, Ian Holsman <[EMAIL PROTECTED]> wrote: > > would this actually work? > > I thought this would have been evaluated when you start up the > process, and the show_dict is first called. > not on every request (which is what they want I'm guessing) Ack, you're right. You'll need to defer

Re: Locking problem with mod_python

2006-08-16 Thread Malcolm Tredinnick
On Thu, 2006-08-17 at 04:15 +0200, Daniel Poelzleithner wrote: [...] > I think django should have a Lock class and maybe Semaphores, too, which > check which type of server the app is running and choose the best > locking method. I think this is really beyond the scope of Django. If you need

Re: Locking problem with mod_python

2006-08-16 Thread Daniel Poelzleithner
Ivan Sagalaev wrote: > As Ian has pointed you can use file system as a device for locking > between separate processes. This is not really something specific to Django. Yes i know. There would be other solutions like shm, or global mutexes, but filelocks seem to be the best of the worst.

Re: showing future events only?

2006-08-16 Thread Ian Holsman
would this actually work? I thought this would have been evaluated when you start up the process, and the show_dict is first called. not on every request (which is what they want I'm guessing) regards Ian. On 17/08/2006, at 5:30 AM, [EMAIL PROTECTED] wrote: > > Do I need to import datetime

Re: showing future events only?

2006-08-16 Thread Jeremy Dunck
On 8/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Do I need to import datetime into urls.py or something? from datetime import datetime datetime.now() should do... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: list_display containing ForeignKey create a dead loop.

2006-08-16 Thread Malcolm Tredinnick
Hi Karen, On Wed, 2006-08-16 at 06:01 -0700, Karen Tracey wrote: [...] > Hmm, in the case where I hit this I don't believe there was a loop in > the FK relations. The whole model group goes like this: > > There are 3 models with no ForeignKeys: Entry, Author, and Publisher > There are 2 models

Re: How to build a tree on the page?

2006-08-16 Thread Malcolm Tredinnick
On Wed, 2006-08-16 at 15:36 +, spacedman wrote: > > 一首诗 wrote: > > I have a table like this > > > > id | name | parentid > > > > And parentid is a Foreign Key to ID. > > > > So I have a tree in my database. My question is that, how can I > > represent it on the web as a tree. > > If you

Re: AttributeError: 'str' object has no attribute '_meta'

2006-08-16 Thread Hawkeye
And this is one of the many reasons I love Django the community. Highly informative response, for which I thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Issue with template tags...

2006-08-16 Thread Seth Buntin
Your right. My bad. I must have read it here in the newsgroup. --~--~-~--~~~---~--~~ 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: Issue with template tags...

2006-08-16 Thread Adrian Holovaty
On 8/16/06, Seth Buntin <[EMAIL PROTECTED]> wrote: > Thanks Adrian. That was it. I think I got that from the documentation. > Should it be changed? Which part of the documentation had that? I was pretty sure we've changed all references of django.core.template to django.template, but we may

Re: Issue with template tags...

2006-08-16 Thread Seth Buntin
Thanks Adrian. That was it. I think I got that from the documentation. Should it be changed? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: AttributeError: 'str' object has no attribute '_meta'

2006-08-16 Thread Russell Keith-Magee
On 8/17/06, Hawkeye <[EMAIL PROTECTED] > wrote: Is this a bug, or was my understanding of quoted ForeignKey valuesincorrect?Could be interpreted as a bug/missing feature, but probably more in the misunderstanding column.The string quoted form exists to allow you to forward reference a table;

Re: Re: syncdb without shell access

2006-08-16 Thread Vance Dubberly
Some combination of cgi and a system or execute command is a fun way to both piss off your hosting provider and get that done. You'll need to insert all the appropriate paths but it would look something like this: os.system('/path/to/python /path/to/manage.py syncdb'); If your hosting provider

Re: AttributeError: 'str' object has no attribute '_meta'

2006-08-16 Thread Hawkeye
Hmm... Looks like I fixed this. I had: from app.user.models import UserProfile [...] owner = models.ForeignKey('UserProfile', related_name='foo') I changed it to: from app.user.models import UserProfile [...] owner = models.ForeignKey(UserProfile, related_name='foo') Is this a bug, or was my

Re: compare integers in template (newbie question)

2006-08-16 Thread Don Arbow
Oops, missed an 'endifequal' at the end of the comparison: {% for x in make_list object.get_rating_stars %} {% ifequal x '*' %} {% else %} {% endifequal %} {% endfor %} Don --~--~-~--~~~---~--~~

Re: Django 0.95 on Dreamhost

2006-08-16 Thread fiore.mlist
I've just been fighting with the same problem. Mine was with in the rewrite rules in .htaccess. Try appending a '/' in the URL to see what happens. After several hours of dorking around with it, I realized that I was getting the error when going to the URL:

Re: Issue with template tags...

2006-08-16 Thread Adrian Holovaty
On 8/16/06, Seth Buntin <[EMAIL PROTECTED]> wrote: > I have created a custom template tag that gets specific information > from the database: > > linkroll.py: > from django.core import template > from seth_blog.blog.models import Linkroll > register = template.Library() > > def linkroll(): >

Re: Django, mod_python and 403 error

2006-08-16 Thread Adrian Holovaty
On 8/16/06, Fabien Schwob <[EMAIL PROTECTED]> wrote: > Nobody have an idea on how to solve this problem ? Hey Fabien, It'd be a great help if you pasted the errors from Apache's error log. Also, what kind of 403 errors do you get -- could you include a link to a screenshot? Adrian -- Adrian

AttributeError: 'str' object has no attribute '_meta'

2006-08-16 Thread Hawkeye
I'm trying to create my first Django app. When I attempt to validate, I receive the "str object has no attribute _meta" error. Can anyone provide any insight? I'm running from the dev branch, and have included the output of "./manage.py validate" Thanks! Traceback (most recent call last):

Re: Current *preferred* fcgi setup, lets settle this once for all

2006-08-16 Thread sime
Tim Shaffer wrote: > Here is my .htaccess file... let me know if you have any questions. OK, my django.fcgi and .htaccess are *exactly* like yours (with slightly adjusted paths), and still, it doesn't work :( It just stalls for a long time and then apache throws Internal Server Error. Does

Re: Django 0.95 on Dreamhost

2006-08-16 Thread fiore.mlist
Sorry. I should have been more clear. The rules which now seem to be working for me are the ones that I posted in my previous message. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

+++++++++++++ WHAT A F***???????? IS THIS????????

2006-08-16 Thread User k
THAT IS CRAZY WHO MADE UP THAT PRICE $1,000,000 Dollars for that? http://million.b4site.com can anyone afford that? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Custom file handling

2006-08-16 Thread patrickk
don´t know if this is of any help (I didn´t have the time to work on it lately, but we´re already using it): http://www.vonautomatisch.at/django/filebrowser/ patrick Am 16.08.2006 um 19:27 schrieb Nathan Ekstrom: > > Let me clarify I need to be able to do something like > > front_image =

Re: compare integers in template (newbie question)

2006-08-16 Thread Don Arbow
On Aug 16, 2006, at 7:12 AM, [EMAIL PROTECTED] wrote: > > Waylan, > > This is a really nifty solution, but, again, it puts presentation > logic > into the views.py file, which is supposed to contain business logic. > I'd rather not do that... But nothing is ever so rigid as to require you do

Re: showing future events only?

2006-08-16 Thread Jeremy Dunck
On 8/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I've got an app for user events, using the generic list view to display > them. So far , so good. But I don't want to display them if the date is > past. So, how would I filter those out. Here's the template code, so > you can sorta see

Re: Django, mod_python and 403 error

2006-08-16 Thread Fabien Schwob
Nobody have an idea on how to solve this problem ? On 8/10/06, Fabien Schwob <[EMAIL PROTECTED]> wrote: > Hello, > > The development of my Django site is on the way. And in order to try > it online, I've decided to install it under Apache + mod_python. But > when I'm trying to access it, I get a

Re: showing future events only?

2006-08-16 Thread [EMAIL PROTECTED]
Do I need to import datetime into urls.py or something? I'm passing show_dict = { 'queryset': Show.objects.filter(show_date__gte=datetime.now()), 'template_object_name': 'show', 'allow_empty': 'true', } but it throws an error: NameError at /shows/ name 'datetime' is not defined

Re: showing future events only?

2006-08-16 Thread [EMAIL PROTECTED]
I'm using the generic list view. There was some reason I didn't think the generic date view was right for this, although I can't remember what it was now. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: showing future events only?

2006-08-16 Thread Corey Oordt
I thought a change was made in the generic date views to show only future events. It is the allow_future parameter, I believe. Corey On Aug 16, 2006, at 1:38 PM, [EMAIL PROTECTED] wrote: > > I've got an app for user events, using the generic list view to > display > them. So far , so

Re: Issue with template tags...

2006-08-16 Thread Joe
You may have a name conflict. Rename the file 'linkroll.py' to 'linkroll_tags.py' or something similar. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Re: How to build a tree on the page?

2006-08-16 Thread Vance Dubberly
Thanks for sharing that spaceman. On 8/16/06, spacedman <[EMAIL PROTECTED]> wrote: > > > 一首诗 wrote: > > I have a table like this > > > > id | name | parentid > > > > And parentid is a Foreign Key to ID. > > > > So I have a tree in my database. My question is that, how can I > > represent it on

Re: showing future events only?

2006-08-16 Thread Ian Clelland
On 8/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I've got an app for user events, using the generic list view to display > them. So far , so good. But I don't want to display them if the date is > past. So, how would I filter those out. Here's the template code, so > you can sorta see

Re: Locking problem with mod_python

2006-08-16 Thread Ivan Sagalaev
Daniel Poelzleithner wrote: > After further investigation, i found out that locking of any kind > doesn't work with apache in prefolk mode, and more or less in the > threaded mode. I haven't found a nice and clean solution yet to do > locking on requests, which worries me a little bit. Locking

Issue with template tags...

2006-08-16 Thread Seth Buntin
I have created a custom template tag that gets specific information from the database: linkroll.py: from django.core import template from seth_blog.blog.models import Linkroll register = template.Library() def linkroll(): links = Linkroll.objects.all()[:5] return {'links': links} #

limit_choices_to Users in a Group

2006-08-16 Thread Waylan Limberg
I'm not sure if my problem is related to this thread[1] or if I'm just misunderstanding something with regard to limit_choices_to. First I tried this (in relevant part): from django.contrib.auth.models import User class Project(models.Model): coordinator = models.ForeignKey( User,

Re: Custom file handling

2006-08-16 Thread Nathan Ekstrom
Let me clarify I need to be able to do something like front_image = model.ImageField(upload_to='plan_images/hp/p%id/lrg') and have %id be replaced with the models id field. Giving a final save path of something like /plan_images/hp/p1/lrg. I also want to create a preview size of the image and

Re: compare integers in template (newbie question)

2006-08-16 Thread Adam Endicott
[EMAIL PROTECTED] wrote: > I'd really love to be able to do something like this: > {% if videoObject.rating > 0 %}*{% endif %} > {% if videoObject.rating > 1 %}*{% endif %} > {% if videoObject.rating > 2 %}*{% endif %} If this type of code is your goal, you could do something like: {% ifequal

Re: showing future events only?

2006-08-16 Thread [EMAIL PROTECTED]
Got it! added import datetime then show_dict = { 'queryset': Show.objects.filter(show_date__gte=datetime.datetime.now()), 'template_object_name': 'show', 'allow_empty': 'true', } Thank you Ian! I knew it had to be something fairly straightforward, but sometimes it's all a matter of

Re: syncdb without shell access

2006-08-16 Thread Jeremy Dunck
On 8/16/06, Jason F. McBrayer <[EMAIL PROTECTED]> wrote: > > Robin Gruyters <[EMAIL PROTECTED]> writes: > > >> > > My hosting provider doesn't give shell access, so I can't > >> > > execute like "syncdb", "startapp", "startproject", etc. > >> > > > >> > > Is there another way to do this? (e.g. by

Re: Custom file handling

2006-08-16 Thread Jay Parlar
On 8/16/06, Nathan Ekstrom <[EMAIL PROTECTED]> wrote: > > Saving with the same name is fine I just need a custom way to specify > the directory. Well, my patch gets you that, but again, not from the Admin. Jay P. --~--~-~--~~~---~--~~ You received this message

Re: Manipulators Question

2006-08-16 Thread alex kessinger
Your right, I don't deny that I am still a noob at this, I know there is probably a better way out there and I just can't see how to do that. is there anyway I can see your model and your manipulator class? --~--~-~--~~~---~--~~ You received this message because

Re: Custom file handling

2006-08-16 Thread Nathan Ekstrom
Saving with the same name is fine I just need a custom way to specify the directory. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: compare integers in template (newbie question)

2006-08-16 Thread [EMAIL PROTECTED]
Thanks, Alan! Widthratio is exactly what I'm looking for to solve this problem! I still wish for a custom "if" tag to solve non-charting problems in templates, and I guess I'll just have to write it and post it to the wiki. But for now, widthratio does exactly what I need, when I need it. Mae

Re: Re: how to redirect to a new page,but keep the browser's url unchanged

2006-08-16 Thread Ian Clelland
On 8/16/06, James Bennett <[EMAIL PROTECTED]> wrote: > Being able to see the correct current URL is a vital security feature > in web browsers, and (short of using JavaScript to open a new window > which lacks a location bar -- something not guaranteed to work because > browsers allow users to

Re: How to build a tree on the page?

2006-08-16 Thread Russell Hay
I just realized that it isn't the entire picture needed to build the tree. Also look at the "tree" function in: http://code.b0b.net/rep/GameDB/trunk/gamedb/driver/views.py -Russell On Wed, Aug 16, 2006 at 06:48:13AM -0700, ? wrote: > > I have a table like this > > id | name |

showing future events only?

2006-08-16 Thread [EMAIL PROTECTED]
I've got an app for user events, using the generic list view to display them. So far , so good. But I don't want to display them if the date is past. So, how would I filter those out. Here's the template code, so you can sorta see what I'm getting at: {% for show in

Feeds as a web service

2006-08-16 Thread James
Anyone thought of using Django's feeds to supply XML in a sort of simple, read-only, web service kinda way? :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: How to build a tree on the page?

2006-08-16 Thread Waylan Limberg
On 8/16/06, 一首诗 <[EMAIL PROTECTED]> wrote: > Is there any example that I could study? You may find some of the examples here[1] helpful. [1] http://code.djangoproject.com/wiki/CookBookDataModels -- Waylan Limberg [EMAIL PROTECTED] --~--~-~--~~~---~--~~

Re: Locking problem with mod_python

2006-08-16 Thread Daniel Poelzleithner
Ian Holsman wrote: > aren't semaphores inter-process (not cross process)? > > try using a file handle instead.. After further investigation, i found out that locking of any kind doesn't work with apache in prefolk mode, and more or less in the threaded mode. I haven't found a nice and clean

Re: compare integers in template (newbie question)

2006-08-16 Thread [EMAIL PROTECTED]
I can do that, but it would couple presentation with my Video model, and I'd rather not. After all, I suspect that denying me the proper "if" tag was Django's political statement of "thou shalt not couple presentation with business logic, and we shall enforce it". It'd be a shame to couple

Re: compare integers in template (newbie question)

2006-08-16 Thread [EMAIL PROTECTED]
Waylan, This is a really nifty solution, but, again, it puts presentation logic into the views.py file, which is supposed to contain business logic. I'd rather not do that... A custom template tag is possibly my solution, and yes, I'm surprised that no one else had done it yet, too. Mae

Re: How to build a tree on the page?

2006-08-16 Thread Chris Moffitt
> So I have a tree in my database. My question is that, how can I > represent it on the web as a tree. Something like this : > > Is there any example that I could study? > I used the category model here - http://code.djangoproject.com/wiki/CookBookCategoryDataModelPostMagic Then, used

Re: Re: VMWare image for running/developing Django

2006-08-16 Thread Felix Ingram
I thought that this thread sounded interesting so I had a go creating several vmware images. The first was an Ubuntu which weighed in at over 500 mb (all sizes are the 'used' portion from df -h), which then stopped working (I think I _may_ have deleted the kernel image while trying to save

Re: syncdb without shell access

2006-08-16 Thread Jason F. McBrayer
Robin Gruyters <[EMAIL PROTECTED]> writes: >> > > My hosting provider doesn't give shell access, so I can't >> > > execute like "syncdb", "startapp", "startproject", etc. >> > > >> > > Is there another way to do this? (e.g. by creating a runsync.py >> > > script?! (or something?)) If you can

Re: compare integers in template (newbie question)

2006-08-16 Thread Waylan Limberg
> > How about adding a method to your Video model? > > Video model: > def get_rating_stars(self): > return "***" # Implementation left as an exercise for the reader ;-) > This isn't much of an exercise, although it may not be immediately obvious to the noobi. def get_rating_stars(self):

Re: list_display containing ForeignKey create a dead loop.

2006-08-16 Thread Karen Tracey
Malcolm Tredinnick wrote: > On Tue, 2006-08-15 at 23:22 -0700, 一首诗 wrote: > > But if there is a loop in FK relations, it will never stopped! > > Wow. Looks like you're right. Good debugging! Hmm, in the case where I hit this I don't believe there was a loop in the FK relations. The whole model

Re: How to build a tree on the page?

2006-08-16 Thread spacedman
一首诗 wrote: > I have a table like this > > id | name | parentid > > And parentid is a Foreign Key to ID. > > So I have a tree in my database. My question is that, how can I > represent it on the web as a tree. If you can rework your database slightly you can use Modified Preorder Tree

Re: Where to put Admin functions for users?

2006-08-16 Thread Waylan Limberg
Corey, The general consensus seems to be that you use the built-in admin to get things rolling. Then, after building the front end and to have a fully functioning app, you'll most likely want to build your own customized back end, unless you happen to have a simple publishing/blogging system were

Re: How to build a tree on the page?

2006-08-16 Thread Russell Hay
Mine probably isn't terribly efficient (I'm just learning) but, http://code.b0b.net/rep/GameDB/trunk/gamedb/driver/controller.py I use a third-party tree javascript library that I found here: http://www.dhtmlgoodies.com -Russell On Wed, Aug 16, 2006 at 06:48:13AM -0700, ? wrote: > >

Re: how to redirect to a new page,but keep the browser's url unchanged

2006-08-16 Thread Waylan Limberg
You may want to take a look at this thread [1]. Particularly the responce by Ivan Sagalaev. Personally, I wouldn't want to serve (large) files that way, but I suppose it may be a requirement for some projects. If your just trying to restrict access, I'd go with Adrain's suggestion[2]. [1]

Re: Manipulators Question

2006-08-16 Thread [EMAIL PROTECTED]
Hit me (not too hard) if I'm wrong, but hiding fields is not the prettiest way to change the behaviour of the manipulator, because: - it could bring security issues (someone hacking the HTML form to include hidden fields in it, which will be taken into account when the manipulator eats the POSTed

Re: search in django

2006-08-16 Thread Adrian Holovaty
On 8/15/06, Andy Dustman <[EMAIL PROTECTED]> wrote: > In fact, it does LIKE %string%, which is quite expensive. Usually want > I want out of an admin search is a startswith match, i.e. LIKE > string%, which can use an index. Unfortunately there doesn't seem to > be a way to do this yet. Maybe

Re: Re: how to redirect to a new page,but keep the browser's url unchanged

2006-08-16 Thread James Bennett
On 8/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > That works if i redirect a django view page to another django view > page. > what if i want to redirect to a non-django view page,like a mp3 file. Being able to see the correct current URL is a vital security feature in web browsers, and

Re: how to redirect to a new page,but keep the browser's url unchanged

2006-08-16 Thread [EMAIL PROTECTED]
That works if i redirect a django view page to another django view page. what if i want to redirect to a non-django view page,like a mp3 file. Chris Long 写道: > If you had two views: > > def view_1(request): > >return render_to_response(...) > > def view_2(request): > >

Re: list_display containing ForeignKey create a dead loop.

2006-08-16 Thread 一首诗
Sorry for my mistake! Because my code is on a PC without Internet Connection, I can not just coyp and paste the function name. I've an idea about how to elminate the loop. Add an optional para to the function which included all processed Foreign Key RelationShip in the form of [ [table1Name,

Re: Django 0.95 on Dreamhost

2006-08-16 Thread Gábor Farkas
Apple wrote: > >> generally this means that you should put in some url-rewriting... > > Do you mean url rewriting in my url.py or in my .htacess? > > I've tried removing the .htacess file and directly accessing the fcgi > file. It still generates a 500 Error. At this point I have not a clue >

how to redirect to a new page,but keep the browser's url unchanged

2006-08-16 Thread [EMAIL PROTECTED]
If i use ResponseRedirect to redirect to a new page , the browser's url will change to the new url. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: OperationalError after inpectdb

2006-08-16 Thread [EMAIL PROTECTED]
Thank you. I was looking through the ForeignKey class for clues, but did not find any. I find it amazing how much of a working model you get from inspectdb, but obviously, it cannot account for old crusty schemas. david --~--~-~--~~~---~--~~ You received this

Re: OT: Sort messages by thread in OS X Mail

2006-08-16 Thread Corey Oordt
I was sorting by subject and it was doing an ok job. Thanks for pointing this out. I always feel stupid when there is such an obvious feature that I never noticed... Corey On Aug 15, 2006, at 10:04 PM, Sean Schertell wrote: > > Hey guys, > > I hope I'm not the only schmuck to arrive so

Re: list_display containing ForeignKey create a dead loop.

2006-08-16 Thread Malcolm Tredinnick
On Tue, 2006-08-15 at 23:22 -0700, 一首诗 wrote: > Hah! > > I've just found what happened! > > django.db.models.fill_cache_table is a function that calls itself until > it processed all table connected by FK. For anybody else wondering why they can't this method, it's called fill_table_cache() (I

Re: how to redirect to a new page,but keep the browser's url unchanged

2006-08-16 Thread Chris Long
If you had two views: def view_1(request): return render_to_response(...) def view_2(request): return view_1(request) Will return the view_1 but will be under the view_2 URL. Chris --~--~-~--~~~---~--~~ You received this message because

Re: geographic targeting with django

2006-08-16 Thread [EMAIL PROTECTED]
You can get the database from IP database, ZIP code database and cities database from: http://www.ip2location.com http://www.zipcodeworld.com http://www.geodatasource.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: geographic targeting with django

2006-08-16 Thread Guillermo Fernandez Castellanos
Hi, I'm using those: http://www.hostip.info/ They have a very handy API: http://www.hostip.info/use.html Enjoy, G On 8/16/06, David Blewett <[EMAIL PROTECTED]> wrote: > You could combine the maxmind GeoIP database 1 + cross-referencing that with > the CivicSpace ZIP code database 2. > >

Re: Accessing db_table in _pre_save()

2006-08-16 Thread Brett Parker
On Tue, Aug 15, 2006 at 07:57:49PM -0700, Julio C?sar Carrascal Urquijo wrote: > > I'm using a cursor inside the _pre_save() method for one of my models > and figured it would be wise to use the table name gerated by Django > instead of just hard-coding the name. Err, _pre_save() was ousted as

Re: upload error | deleting object after it has been uploaded...

2006-08-16 Thread jelle
Hi Ian, Many thanks for your very clear explanation! That was exacty the problem which got me stuck... > As a workaround, try giving another field, such as the title, the > attribute "core=True", and see if that help things. Works flawless now! Many thanks! I hope your patch will be added to

Re: 1062, "Duplicate entry '1' for key 2"

2006-08-16 Thread cyberco
I found the error. I was using the ipython shell to run 'run manage.py reset myapp' but unfortunatly things got cached. Running 'sqlreset' instead of 'reset' showed me that some old SQL was used, so updating the models didn't change the SQL. :( Restarting IPython fixed the problem.

IPython shell caching SQL/models?

2006-08-16 Thread cyberco
I was using the ipython shell to run 'run manage.py reset myapp' (because I was using IPython anyway) but unfortunatly it seemed like IPython cached the models or SQL. Running 'sqlreset' instead of 'reset' showed me that some old SQL was used, so updating the models didn't change the SQL. that

Re: How do I store project in subversion?

2006-08-16 Thread Kjell Magne Fauske
If you need some place to host your Subversion repository I'll recommend Google Code hosting: http://code.google.com/hosting/faq.html I recently moved a project to Google code hosting, and it was really easy. A SVN repository was set up for me automatically. - Kjell Magne Fauske

ANN: Small security hole in compile-messages.py fixed

2006-08-16 Thread Adrian Holovaty
The Django team discovered and fixed a small security hole in the django/bin/compile-messages.py helper script, which is the script that compiles message files (.po files) into binary format (.mo files). The compile-messages.py script uses the name of the .po file to build arguments to a system

Re: list_display containing ForeignKey create a dead loop.

2006-08-16 Thread 一首诗
Hah! I've just found what happened! django.db.models.fill_cache_table is a function that calls itself until it processed all table connected by FK. But if there is a loop in FK relations, it will never stopped! I will see if I could make a simple patch for it.