Re: syncdb error

2007-08-18 Thread James Bennett
On 8/18/07, Pawel Pilitowski <[EMAIL PROTECTED]> wrote: > I just updated to the latest django version (5925) and ran syncdb and > get the following error. > > Any suggestions? If you're tracking SVN, it's an *extremely* good idea to also watch the development timeline[1] and read the django-devel

TinyMCE problem

2007-08-18 Thread Rufman
i tried installing tinymce with django, but i seem to have a problem with the js import. i tried to google of another tutorial...but alas nothing seemed to work. in your tutorial (http://code.djangoproject.com/wiki/AddWYSIWYGEditor) there are paths that i do not have, idk if i'm looking in the

Re: accessing id attribute of a ForeignKey without additional DB queries

2007-08-18 Thread kahless
On Aug 16, 1:42 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > This behaviour is valid, and will remain so. Django uses this feature > internally in many places, especially in the serializers. thanks, good to know :) > Any suggestions on how to improve the documentation of this issue are

Re: unbit.it hosting

2007-08-18 Thread Chris Hoeppner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > File > "/usr/lib/python2.4/site-packages/django/db/backends/mysql/base.py", > line 97, in cursor >kwargs['port'] = int(settings.DATABASE_PORT) > > ValueError: invalid literal for int(): marco_db1 What's your value for DATABASE_PORT? -BEGIN

In-line Comments

2007-08-18 Thread [EMAIL PROTECTED]
Hi, we're currently translating this book: www.producingoss.com and I'm trying to find an in-line comment system similar to the one used by the djangobook of the fsf for their licences. I read somewhere that the code for that was in an unreleaseable state, but somewhere else that they would be re

Re: Database cached?

2007-08-18 Thread SjoerdOptLand
Hello all, Thanks a lot for your suggestions. As they say: "The solution is always simple", it is this line of code: from django.db import connection connection.connection = None this closes the connection and forces Django to make a new one. Only throwing away the _result_cache of a queryset w

How to create model with dual primary key in Django?

2007-08-18 Thread richard
I'm working on a database-backed Web site which requires a few tables to use dual primary keys (two columns acted together as primary key; each of them is not unique in itself). How to do that properly? (I'm aware of 'unique_together', however that is not really meant for primary key creation, is

How to create model with dual primary key in Django?

2007-08-18 Thread richard
I'm working on a database-backed Web site which requires a few tables to use dual primary keys (two columns acted together as primary key; each of them is not unique in itself). How to do that properly? (I'm aware of 'unique_together', however that is not really meant for primary key creation, is

Software Problem Solving

2007-08-18 Thread John Travolta
Software problem solving http://windowsxpsp2pro.blogspot.com/ --~--~-~--~~~---~--~~ 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 fro

Re: Best practice for non-root base URL setup?

2007-08-18 Thread Przemyslaw Wegrzyn
Chris Moffitt wrote: > We've developed a similar sort of capability for Satchmo. You can > browse the source here- > http://www.satchmoproject.com/trac/browser/satchmo/trunk/satchmo > Seems I've done more or less the same in my

Django-tagging, is it possible to add a TagField to a UserProfile?

2007-08-18 Thread David Larlet
Hi, I try to add a TagField to a UserProfile and it doesn't seemed to work (it didn't find obj._get_pk_val() when I save the profile), did someone had already done that? Regards, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Django-tagging, is it possible to add a TagField to a UserProfile?

2007-08-18 Thread David Larlet
2007/8/18, David Larlet <[EMAIL PROTECTED]>: > Hi, > > I try to add a TagField to a UserProfile and it doesn't seemed to work > (it didn't find obj._get_pk_val() when I save the profile), did > someone had already done that? > > Regards, > David > Hum, forget about that, I just forget to add the t

Re: How to create model with dual primary key in Django?

2007-08-18 Thread Peter Melvyn
On 8/18/07, richard <[EMAIL PROTECTED]> wrote: > I'm working on a database-backed Web site which requires a few tables > to use dual primary keys (two columns acted together as primary key; > each of them is not unique in itself). How to do that properly? > (I'm aware of 'unique_together', howev

Re: unbit.it hosting

2007-08-18 Thread Marco A.
I was a refresh problem coused by the use of fastcgi I was use the wrong setting.py.. I restarted the server and it work great ! Thanks 2007/8/18, Chris Hoeppner <[EMAIL PROTECTED]>: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > File > > "/usr/lib/python2.4/site-packages/django/db/ba

unique_together and composite columns indexing

2007-08-18 Thread Peter Melvyn
Hi all, if I'm not mistaken, if I have a model with unique constraint 'unique_together', Django does not support composite index of related columns, i.e. class AModel (models.Model): col_a = models.CharField(maxlength=20, db_index=True) col_b = models.CharField(maxlength=20, db_index=Tru

What's possible in the admin?

2007-08-18 Thread Rob Hudson
I have a list of things I'd like to do in the admin for a new client but I'm not sure if all of these are possible. I'm hoping those more familiar with admin tweaking could provide a Yes/No for these? I've heard something about how the new admin branch allows for multiple admins, so possibly one

Re: Best practice for non-root base URL setup?

2007-08-18 Thread John Shaffer
On 8/18/07, Przemyslaw Wegrzyn <[EMAIL PROTECTED]> wrote: > However Django 0.96 doesn't support named URL patters yet, so I can't > use {% url %} tag. Even in 0.96, you can use a view as the argument to the url tag. Where we use "{% url satchmo_cart %}", in 0.96 we would have to use "{% url satch

Repairing Tips for Windows XP

2007-08-18 Thread Porsche Fan
Repairing Tips for Windows XP, Improve your System speed !!! http://windowsxpsp2pro.blogspot.com/ --~--~-~--~~~---~--~~ 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

Djapian API

2007-08-18 Thread Rafael \"SDM\" Sierra
Hi all, I wrote a module 3th-part to Django: http://code.google.com/p/djapian/ It's a simple interface between Django and Xapian (a search engine), it's just a fork of search-api (I think it's too slow, and I know that there is another priority) -- Rafael "SDM" Sierra http://stiod.com.br/ --~-

Re: Using Django to generate Flash/Flex content

2007-08-18 Thread SamFeltus
FWIW There is a greatly improved version up... It's a pre alpha version of a website to create/edit Flash movies... http://samfeltus.com/django/SonomaSunshine_v0.13_raw_for_django.tar.gz I'd be happy to spend some time on explaining/improving it if anyone ever found it interesting. --~--~---

What's the best approach to allow users to upload data to a Django Web site?

2007-08-18 Thread Divan Roulant
Hello, I've implemented my models and my site works fine. A user can create an account and log in. Now it's time for me to allow a user to upload data, once logged in. However, I'm stuck with that question: once a user is logged in to my site, should I link her to the Django admin site (with rest

Re: Best practice for non-root base URL setup?

2007-08-18 Thread Przemyslaw Wegrzyn
John Shaffer wrote: >On 8/18/07, Przemyslaw Wegrzyn <[EMAIL PROTECTED]> wrote: > > >>However Django 0.96 doesn't support named URL patters yet, so I can't >>use {% url %} tag. >> >> > >Even in 0.96, you can use a view as the argument to the url tag. Where >we use "{% url satchmo_cart %}", i

Repair Operating System - manual

2007-08-18 Thread Porsche Fan
Step-by-step manual for repairing Microsoft Operating System http://windowsxpsp2pro.blogspot.com/ --~--~-~--~~~---~--~~ 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

Re: adodbapi with mssql 2000

2007-08-18 Thread Michal PL
On Aug 18, 3:26 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 8/17/07, Michal PL <[EMAIL PROTECTED]> wrote: > > > > > I'm new here so let me say hello and sorry for my English to > > everybody. > > > I got a problem with MS SQL 2000 and (probably) adodbapi library. When > > django tr

Re: What's the best approach to allow users to upload data to a Django Web site?

2007-08-18 Thread Jeremy Dunck
On 8/18/07, Divan Roulant <[EMAIL PROTECTED]> wrote: > However, I'm stuck with that question: > once a user is logged in to my site, should I link her to the Django > admin site (with restricted permissions) or should I implement myself, > for my site, the views and templates to allow that user to

Batch import using a lot of memory

2007-08-18 Thread Berry
I have this rather simple batch import program. Problem is that it keeps eating memory. I am processing a 30+ Mb file. To be able to handle it I spit it in files of 10.000 lines. With each new file it is processing the import is getting slower and slower. When it has processed about 50 files my c

Re: Batch import using a lot of memory

2007-08-18 Thread Jeremy Dunck
On 8/18/07, Berry <[EMAIL PROTECTED]> wrote: > Why is this program eating memory? If settings.DEBUG = True, django.db.connection.queries logs all queries sent to the DB. Either turn off debug, or truncate that list occasionally, maybe once for each outer loop. from django.db import connection c

Re: Batch import using a lot of memory

2007-08-18 Thread Berry
I have read this warning a thousand times by now! And I still made this mistake! I am running this batch script on my development machine where DEBUG is set to True! I set DEBUG to False and memory is just fine now! Program is running smoothly. Thanks very much. I will never make this mistake ag

Re: What's the best approach to allow users to upload data to a Django Web site?

2007-08-18 Thread Divan Roulant
That's what I though initially but since I am fairly new to Django and Web development, I wanted to check it out with more experienced developers, just in case. Thanks! Divan On Aug 18, 3:50 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > On 8/18/07, Divan Roulant <[EMAIL PROTECTED]> wrote: > >

OperationalError

2007-08-18 Thread Alvaro Mouriño
Hi list, I'm developing a (yet another) shopping cart and I'm having a problem when counting the items in the cart. In my model I have an "Order" class which is the cart and a "OrderItem" class which are the items in the cart. In the Order class I have this code: [PYTHON] class Order(models.Mod

URGENT ACTION REQUIRED!

2007-08-18 Thread Howe
Designer fragrances for less 01. For Women - Davidoff Cool Water EDT 30ml RRP: £21.00 04. For Women - Escada Signature by Escada EDP 30ml RRP : £22.99 05. For Women - Gucci Rush EDT Spray 75ml RRP: £47.00 06. For Women - Elizabeth Arden Green Tea EDT 50ml RRP: £19.00 07. For W

Re: What's the best approach to allow users to upload data to a Django Web site?

2007-08-18 Thread Jeremy Dunck
On 8/18/07, Divan Roulant <[EMAIL PROTECTED]> wrote: > > That's what I though initially but since I am fairly new to Django and > Web development, I wanted to check it out with more experienced > developers, just in case. OK, if you're new to webdev, one more bit of advice: In general do not trus

UnicodeDecodeError in template rendering

2007-08-18 Thread cesco
Hi, I'm using sqlite3 as db for my django project. In order to load the data in the db I first generated a unicode string (which contains danish characters "ø, æ, å") and dumped such a string to a file (in json format) as follows: f_hdl = file(json_offers_path, 'w') f_hdl.write(offer_entry.encode

Re: What's the best approach to allow users to upload data to a Django Web site?

2007-08-18 Thread Divan Roulant
Thanks Jeremy for pointing me on this topic. My goal is to implement a prototype locally and then, move into learning how to put it right on the Web (https, LAMP and everything...). God, so much work (and learning curve) ahead! :-) Divan On Aug 18, 6:12 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wro

Re: UnicodeDecodeError in template rendering

2007-08-18 Thread Kai Kuehne
Hi, On 8/19/07, cesco <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm using sqlite3 as db for my django project. > In order to load the data in the db I first generated a unicode string > (which contains danish characters "ø, æ, å") and dumped such a string > to a file (in json format) as follows: > f

Make Operating System Faster !!

2007-08-18 Thread John Travolta
Tune up your system and make it faster http://windowsxpsp2pro.blogspot.com/ --~--~-~--~~~---~--~~ 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 u

Re: Make Operating System Faster !!

2007-08-18 Thread Alvaro Mouriño
On 8/18/07, John Travolta <[EMAIL PROTECTED]> wrote: > Tune up your system and make it faster This list gets lots of spam, doesn't it? Is there a way to prevent it from hitting the mailboxes of the list subscribers? AlvAro "You can't change the world, but you can change your mind." Software Libr

type object 'HtmlFormatter' has no attribute 'encoding'

2007-08-18 Thread Evan H. Carmi
Hi, I am trying to get pygments and markdown highlighting working on my blog. When I try and save a post that has ` in it I get an attribute error. My models are (more beautifully here http://dpaste.com/17230/) ignore the _highlight_python_code part. that was from a previous attempt: from djan

Re: OperationalError

2007-08-18 Thread Doug B
> [PYTHON] > class Order(models.Model): > def count_items(self): > items = 0 > for item in self.orderitem_set.filter(order=self): > items += item.quantity > return items > count = property(count_items) > [/PYTHON] For the instance.othermodel_set object

Re: type object 'HtmlFormatter' has no attribute 'encoding'

2007-08-18 Thread Kai Kuehne
Hi, On 8/19/07, Evan H. Carmi <[EMAIL PROTECTED]> wrote: > #from dpaste.com/16735 > `print "hello world"` > > I am using a PostgreSQL database. Looks like my code, but you missed something. :) Add the parenthesis on line 94 and it'll work: formatter = HtmlFormatter() > Thanks, > Evan

Re: type object 'HtmlFormatter' has no attribute 'encoding'

2007-08-18 Thread Kai Kuehne
You could also use the codehilite extension for markdown: http://achinghead.com/markdown/codehilite/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-u

Re: OperationalError

2007-08-18 Thread Doug B
> q="select SUM(quantity) as item_count from %s where order=%s" % > (self.orderitem_set.model._meta.db_table,self._get_pk_val()) Sorry, that first one is wrong. q="select SUM(quantity) as item_count from %s where order_id=%s" % (self.orderitem_set.model._meta.db_table,self._get_pk_val()) I wish

Re: OperationalError

2007-08-18 Thread Alvaro Mouriño
On 8/18/07, Doug B <[EMAIL PROTECTED]> wrote: > > > [PYTHON] > > class Order(models.Model): > > def count_items(self): > > items = 0 > > for item in self.orderitem_set.filter(order=self): > > items += item.quantity > > return items > > count = property(c

Django with cmemcache extension issues

2007-08-18 Thread [EMAIL PROTECTED]
I have the middlwear enabled to cache using memcached as the cache location. Memecached is running and it seems to work fine with the dev server; however, upon enabled the middlwear with memcached using cmemcached and restarting the web server, or even starting and stopping it - the server will dr

Re: Django with cmemcache extension issues

2007-08-18 Thread Jeremy Dunck
On 8/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: ... > however, upon enabled the middlwear with memcached using > cmemcached... I've tried > cacheing with the file system as the source and its fine. With respect, you may have better luck asking people directly involved with cmemcache. --

Re: OperationalError

2007-08-18 Thread Doug B
> I tried that, but I get the same error, the traceback displays that > line as the "buggy" one: for item in self.orderitem_set.all(): def count_items(self): items = 0 for item in self.fielddef_set.all(): items += item.id return items I added that to one o

Re: What's possible in the admin?

2007-08-18 Thread Malcolm Tredinnick
On Sat, 2007-08-18 at 08:38 -0700, Rob Hudson wrote: > I have a list of things I'd like to do in the admin for a new client > but I'm not sure if all of these are possible. I'm hoping those more > familiar with admin tweaking could provide a Yes/No for these? I've > heard something about how the

Re: UnicodeDecodeError in template rendering

2007-08-18 Thread Malcolm Tredinnick
On Sat, 2007-08-18 at 22:46 +, cesco wrote: > Hi, > > I'm using sqlite3 as db for my django project. > In order to load the data in the db I first generated a unicode string > (which contains danish characters "ø, æ, å") and dumped such a string > to a file (in json format) as follows: > f_hd

Re: Make Operating System Faster !!

2007-08-18 Thread Malcolm Tredinnick
On Sat, 2007-08-18 at 21:43 -0300, Alvaro Mouriño wrote: > On 8/18/07, John Travolta <[EMAIL PROTECTED]> wrote: > > Tune up your system and make it faster > This list gets lots of spam, doesn't it? Is there a way to prevent it > from hitting the mailboxes of the list subscribers? In reality, the

Re: type object 'HtmlFormatter' has no attribute 'encoding'

2007-08-18 Thread Malcolm Tredinnick
On Sat, 2007-08-18 at 18:06 -0700, Evan H. Carmi wrote: > Hi, > > I am trying to get pygments and markdown highlighting working on my blog. > > When I try and save a post that has ` in it I get an attribute error. > > My models are (more beautifully here http://dpaste.com/17230/) ignore > the _

Re: What's possible in the admin?

2007-08-18 Thread oggie rob
The short story is all of these should be doable in the admin, and most will also be quite simple. The long story is below. Note, however, that some of my suggestions are based on the old admin rather than newforms-admin, but from what I have seen of newforms-admin, it should be fairly similar in

Re: Ajax Form Submission Trouble

2007-08-18 Thread [EMAIL PROTECTED]
On Aug 14, 3:11 am, dor <[EMAIL PROTECTED]> wrote: > Try this: onclick="this.disabled=true;" > Notice the "disabled" instead of "disable"! didn't work :( In IE7. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: Ajax Form Submission Trouble

2007-08-18 Thread [EMAIL PROTECTED]
Thejaswi Puthraya wrote: > > I seem to have some terribly stupid users that repeadtly press the > > submit button on an ajax comments form. How can clear the form after > > the user submits the message like youtube does (they are ajax'd > > aswell). I've tried onclick="this.disable=true" and all,

Re: Django with cmemcache extension issues

2007-08-18 Thread Sasha Weberov
On Aug 18, 10:01 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > On 8/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > ... > > > however, upon enabled the middlwear with memcached using > > cmemcached... I've tried > > cacheing with the file system as the source and its fine. > > With respe

Re: Cache middleware causing unit tests to fail

2007-08-18 Thread Eratothene
I think you better not disable cache middleware in tests. If tests fail, so will be in production. I had similar problem, I thought it was something wrong with tests, but really it was problem in the code. My site was running well on django built-in server, but not on apache mod_python. The probl

Re: Cache middleware causing unit tests to fail

2007-08-18 Thread Placid Publishing, LLC
Sadly there is not much to trace back, the dev server runs fine with memcache, but mod_python/apache doesn't. Mod_python/apache work with the file system cache as does the dev server, with memcache as the cache storage mod_python/apache will just use up almost all cpu and ram, and the load nev

Re: Cache middleware causing unit tests to fail

2007-08-18 Thread Sasha Weberov
On Aug 19, 12:43 am, "Placid Publishing, LLC" <[EMAIL PROTECTED]> wrote: > Sadly there is not much to trace back, the dev server runs fine with > memcache, but mod_python/apache doesn't. Mod_python/apache work with the > file system cache as does the dev server, with memcache as the cache > stor

How to install django on Apache/Linux

2007-08-18 Thread shabda
I have apache installed on linux with mod_php, mysql. I am trying to get django working here, and am following the intsallation steps at http://www.djangobook.com/en/beta/chapter21/ . Step 1. Install mod_python did yum install mod_python. Checked that mod_python is installed. Step 2. Add this to y

Re: How to install django on Apache/Linux

2007-08-18 Thread James Bennett
On 8/19/07, shabda <[EMAIL PROTECTED]> wrote: > I am *very* confused here, I have only installed mod_python, and > nothing specific to django. SO how would the line > PythonHandler django.core.handlers.modpython work? If you have Django installed on the server and on the Python path, it will wor

Re: Ajax Form Submission Trouble

2007-08-18 Thread Thejaswi Puthraya
> I'm using mochikit Try, onclick="$('button_id').disabled=true;" It is 'disabled' and not 'disable'. Check out button properties at http://www.w3schools.com/htmldom/dom_obj_button.asp According the W3Schools...disabled works since IE5.0...so I see no reason why it shouldn't work in IE7.0 Che