Re: Django admin site

2007-03-10 Thread James Bennett
On 3/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > When deploying site using apache + mod_python, how to make it can read > Django admin css? Let say I am using a share webhosting. This is covered in the "serving media files" and "serving the admin files" sections of the mod_python deploy

Re: OperationalError: Unable to close due to unfinalised statements

2007-03-10 Thread James Bennett
On 3/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Ok, thanks. Now it solved. I am moving the database file to a > directory that writable to others and change the database file > permission to be writable by others. But I think it will be a security > issue. What do you suggest? If you'

Re: 'table per sub-class' mapping strategy

2007-03-10 Thread Laurie
On Mar 10, 5:57 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Hi Laurie, > > On Sat, 2007-03-10 at 17:45 -0500, Laurie Harper wrote: > > [...] > > > I want Project needs to be a sub-type of Page (hence inheriting from > > Page rather than just models.Model). Page.objects.all() should return

Re: Combining querysets into one list for an event calendar

2007-03-10 Thread shelbybark
Yes indeed. Thanks again, I just finished up the first roughed version of this using the itertools.chain function. Worked beautifully. Thanks for your patience with us "newbies" On Mar 10, 5:08 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sat, 2007-03-10 at 14:59 -0800, shelbybark

Django admin site

2007-03-10 Thread [EMAIL PROTECTED]
Dear all, When deploying site using apache + mod_python, how to make it can read Django admin css? Let say I am using a share webhosting. thanks and best regards, Mico --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: OperationalError: Unable to close due to unfinalised statements

2007-03-10 Thread [EMAIL PROTECTED]
Ok, thanks. Now it solved. I am moving the database file to a directory that writable to others and change the database file permission to be writable by others. But I think it will be a security issue. What do you suggest? regards, On Mar 11, 8:22 am, "James Bennett" <[EMAIL PROTECTED]> wrote:

Re: OperationalError: Unable to close due to unfinalised statements

2007-03-10 Thread James Bennett
On 3/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > do you mean that the directory and file of SQLite database file shall > be able to be written by Apache? Yes. TO use SQLite under Apache/mod_python, the SQLite database must be readable and writable by the user Apache is running as. Wheth

Re: We have telugu

2007-03-10 Thread Kenneth Gonsalves
On 11-Mar-07, at 6:45 AM, Kenneth Gonsalves wrote: >> Would love tobut is it available in the main packageor is >> there any way of obtaining it? > > it is there under ~locale/te/LC_MESSAGES - two files, django.po and > djangojs.po that is in the svn trunk - also available under 'browse

Re: We have telugu

2007-03-10 Thread Kenneth Gonsalves
On 10-Mar-07, at 8:04 PM, theju wrote: > Would love tobut is it available in the main packageor is > there any way of obtaining it? it is there under ~locale/te/LC_MESSAGES - two files, django.po and djangojs.po -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/

Re: OperationalError: Unable to close due to unfinalised statements

2007-03-10 Thread [EMAIL PROTECTED]
Hi James, do you mean that the directory and file of SQLite database file shall be able to be written by Apache? IMHO it is not safe to let Apache write database file specially if the file is inside users' home directory. Does it mean I have to move the database file to a 'writable by all' direct

Re: Testing Django App Running on Dev Server with Selenium

2007-03-10 Thread Grig
Paul -- have you tried running the Selenium RC server non- interactively, then interacting with it via one of the languages it supports? Python for example, since you're doing Django development. Look in the python sub-directory of the selenium-rc distribution, and modify the test_google.py script

Re: OperationalError: Unable to close due to unfinalised statements

2007-03-10 Thread James Bennett
On 3/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > OperationalError: Unable to close due to unfinalised statements Usually this means that there's a permissions issue with SQLite. This often pops up when switching from the development server to Apache, because on hosting services Apache a

Re: Combining querysets into one list for an event calendar

2007-03-10 Thread Malcolm Tredinnick
On Sat, 2007-03-10 at 14:59 -0800, shelbybark wrote: > Thanks for the quick reply, Malcolm. I'll look into that. All of my > python "programming" is done with Google and my "Beginning Python" > book, but this gives me something to start with. It's the One True Way to learn. :-) Regards, Malcolm

Re: model validation

2007-03-10 Thread Malcolm Tredinnick
On Sat, 2007-03-10 at 16:59 -0600, Greg Donald wrote: > On 3/10/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > I assume you mean via some way other than a form or the admin interface, > > Model validation doesn't occur in the model itself? Validation happens on the strings submitted from

Re: Combining querysets into one list for an event calendar

2007-03-10 Thread shelbybark
Thanks for the quick reply, Malcolm. I'll look into that. All of my python "programming" is done with Google and my "Beginning Python" book, but this gives me something to start with. Your help is much appreciated. Thanks, Steven On Mar 10, 4:51 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrot

Re: model validation

2007-03-10 Thread Greg Donald
On 3/10/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > I assume you mean via some way other than a form or the admin interface, Model validation doesn't occur in the model itself? > because in those two cases, field validation should catch it. What is "field validation" exactly? Thanks,

Re: 'table per sub-class' mapping strategy

2007-03-10 Thread Malcolm Tredinnick
Hi Laurie, On Sat, 2007-03-10 at 17:45 -0500, Laurie Harper wrote: [...] > I want Project needs to be a sub-type of Page (hence inheriting from > Page rather than just models.Model). Page.objects.all() should return > both Page and Project instances; inserting a Project should create a > row in t

Re: Combining querysets into one list for an event calendar

2007-03-10 Thread Malcolm Tredinnick
On Sat, 2007-03-10 at 14:43 -0800, shelbybark wrote: > I'm trying to figure out how to combine the results of a few different > querysets to have a list of upcoming events on a basic calendar page. > I don't know for sure if this is possible. Any direction would be > appreciated. QuerySets act li

'table per sub-class' mapping strategy

2007-03-10 Thread Laurie Harper
I'm trying to write a Django app on top of an existing database which was created for another project. That project was written in Java using Hibernate for the ORM, and the resulting schema is based on a 'class per table' strategy, giving something like this: Table: Page ID INTEGER PRIMARY KEY Nam

Combining querysets into one list for an event calendar

2007-03-10 Thread shelbybark
I'm trying to figure out how to combine the results of a few different querysets to have a list of upcoming events on a basic calendar page. I don't know for sure if this is possible. Any direction would be appreciated. Thanks, Steven --~--~-~--~~~---~--~~ You re

Re: Django keeps growing, performance keeps dropping

2007-03-10 Thread gilhad
On Mar 7, 4:26 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > My site just keeps getting bigger and bigger, and the performance has > gotten excruciatingly slow. > ... > Problem is, I really don't know what to do about it, or even what I > need to be looking at, really. I've gone through a

Administration features in user pages - newbie

2007-03-10 Thread Gilhad
(aka what help should I read just now) Hello, I started to work with django and it is great. But I have too much of work just now to read all documentation before using it, so I read only the tutorial and some parts of what I did need to work. But now I do not know, where I should continue ...

Re: FileField/ImageUpload saves upload-to path as \...\...\ instead of /.../.../ in database

2007-03-10 Thread Jay Parlar
On 3/10/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Umm ... Jay? He's using django-users already. :-) Heh, silly me. The first two emails *were* sent to django-dev (and django-users), so Gmail automatically tagged them as such. All the subsequent emails showed up in my django-dev folder b

Re: FileField/ImageUpload saves upload-to path as \...\...\ instead of /.../.../ in database

2007-03-10 Thread Malcolm Tredinnick
On Sat, 2007-03-10 at 14:41 +, shevken wrote: > Hi All, > > Is there a way to change the default path of the image to use > backslash (/../) instead of the forward slash? Firstly, you've got back- and forward-slash reversed: a backslash is '\' and a forward slash is '/'. Best we all use the

Re: User id foreign key

2007-03-10 Thread Malcolm Tredinnick
On Sat, 2007-03-10 at 18:07 +, Christian Hoeppner wrote: > Hi there! > > I wonder if there's a way to link a user to some kind of database entry > using a foreign key field. The problem is, how would I define something > like this? What's the actual name/path/something I use to reference the

Re: model validation

2007-03-10 Thread Malcolm Tredinnick
On Sat, 2007-03-10 at 11:53 -0600, Greg Donald wrote: > Why doesn't this prevent me from entering an empty string into the database? > > name = models.CharField(maxlength=32, blank=False, null=False) I assume you mean via some way other than a form or the admin interface, because in those two ca

Re: Django keeps growing, performance keeps dropping

2007-03-10 Thread Bren
On Mar 9, 4:08 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Both those numbers seem pretty excessive to me. My question to this > board is, what sort of query would lead a newbie like myself into this > sort of mess.. in other words, what would be an example of bad code > I've probably don

Re: FileField/ImageUpload saves upload-to path as \...\...\ instead of /.../.../ in database

2007-03-10 Thread Malcolm Tredinnick
On Sat, 2007-03-10 at 12:28 -0500, Jay Parlar wrote: > django-dev is not the appropriate group for this, you want > django-users. Django-dev is for discussion on the development of > Django itself, not development "with" Django. Umm ... Jay? He's using django-users already. :-) Malcolm --~--~

Re: Reversed edit_inline?

2007-03-10 Thread Malcolm Tredinnick
On Sat, 2007-03-10 at 06:21 -0800, Anders Olsson wrote: > This is an issue I'm sure many must have encountered before but I > haven't found a solution. Given these models... > > class Address(models.Model): > street = models.CharField(maxlength=150) > zip = models.CharField(maxlength=10)

Re: Error in "template"

2007-03-10 Thread Malcolm Tredinnick
On Sat, 2007-03-10 at 14:21 +, mo wrote: > Hi, > > I get an Error when i execute the following line: > > >>> from django.template import Template You either have to import the django configuration module and configure your settings manually, or set the DJANGO_SETTINGS_MODULE environment var

Re: How to define non-persisted attributes in Model

2007-03-10 Thread anders conbere
well like I said you can either make that particular field not a model object, or you could just add the attributes at run time. I'm not familiar with using the json serializer so I'm not sure about the specifics there, but for simply adding attributes to the model that wouldn't be saved to the d

Re: Using .values() on a query?

2007-03-10 Thread [EMAIL PROTECTED]
Malcom... thanks for all the info :) I didn't paste all of my model code into the sample... each of those tables actually has Foreign Keys to a few other things..which also contains foreign keys... The page that was slowing down was a page where I basically had a drop down showing Companies (

User id foreign key

2007-03-10 Thread Christian Hoeppner
Hi there! I wonder if there's a way to link a user to some kind of database entry using a foreign key field. The problem is, how would I define something like this? What's the actual name/path/something I use to reference the auth_user objects? Thanks! -- Chris M. Hoeppner Web design & consulta

model validation

2007-03-10 Thread Greg Donald
Why doesn't this prevent me from entering an empty string into the database? name = models.CharField(maxlength=32, blank=False, null=False) Thanks, -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: changed template syntax?

2007-03-10 Thread sean
Hi Malcolm, just tried the new revison and the problem is gone. Thanks a lot for the fast fix. Sean > I think this should be fixed now in [4693]. Turned out to be a simple > change, but finding the line to change took a few minutes. > > Please give it a run and feel free to point out any problem

Re: FileField/ImageUpload saves upload-to path as \...\...\ instead of /.../.../ in database

2007-03-10 Thread Jay Parlar
django-dev is not the appropriate group for this, you want django-users. Django-dev is for discussion on the development of Django itself, not development "with" Django. Jay P. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

Re: How to define non-persisted attributes in Model

2007-03-10 Thread Kenny Lee
I need a model as i will need to save to the database. Just that i need to serialize the object to send it to json, and it will be helpful to have some custom attributes for temporary processing, but will not be saved to the db. On 3/10/07, anders conbere <[EMAIL PROTECTED]> wrote: > > > I would j

Re: How to define non-persisted attributes in Model

2007-03-10 Thread anders conbere
I would just not make it a model.* since you don't want that value to be part of the Database, just don't use the ORM for it. ~ Anders On 3/10/07, shevken <[EMAIL PROTECTED]> wrote: > > class Message(models.Model): > description = models.CharField(maxlength=200) > author = models.Foreign

How to define non-persisted attributes in Model

2007-03-10 Thread shevken
class Message(models.Model): description = models.CharField(maxlength=200) author = models.ForeignKey(User) temp = models.CharField(maxlength=100) When i syncdb, i do not want the column temp to be created. Is there any arguments i can pass to enable this? Eg. temp = models.CharFie

FileField/ImageUpload saves upload-to path as \...\...\ instead of /.../.../ in database

2007-03-10 Thread shevken
Hi All, Is there a way to change the default path of the image to use backslash (/../) instead of the forward slash? I declared the following in my model img = models.ImageUpload(upload_to='upload/img/') but in the database the column's value is saved as upload\img \django.jpg When i display

Re: We have telugu

2007-03-10 Thread theju
Would love tobut is it available in the main packageor is there any way of obtaining it? On Mar 10, 9:42 am, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On 10-Mar-07, at 8:59 AM, theju wrote: > > > First of all let me congratulate Kenneth and his developers for their > > awesome work.

Reversed edit_inline?

2007-03-10 Thread Anders Olsson
This is an issue I'm sure many must have encountered before but I haven't found a solution. Given these models... class Address(models.Model): street = models.CharField(maxlength=150) zip = models.CharField(maxlength=10) city = models.CharField(maxlength=100) class Person(models.Mode

Error in "template"

2007-03-10 Thread mo
Hi, I get an Error when i execute the following line: >>> from django.template import Template Traceback (most recent call last): File "", line 1, in ? File "/usr/local/lib/python2.4/site-packages/Django-0.95.1-py2.4.egg/ django/template/__init__.py", line 894, in ? add_to_builtins('dja

Re: choosing ajax framework (for my projects) :)

2007-03-10 Thread limodou
On 3/10/07, Georgi Stanojevski <[EMAIL PROTECTED]> wrote: > > limodou напиша: > > > You can see an example at : http://limodou.51boo.com > > Your forms(I tried user registration) don't give any feedback while they > are being submited that's really, really bad usability. :) > > When you do somethin

Re: json serialization without certain fields and with extra information?

2007-03-10 Thread shevken
Hey guys, How do you de-serialize the object back at the ajax response. class Cart(models.Model): ... def get_total_quantity(): return quantity; self.response = self.xmlhttp.responseText; // parse the response into a JSON object var json_data = self.response.parseJSON(); alert(jso

Re: choosing ajax framework (for my projects) :)

2007-03-10 Thread Georgi Stanojevski
limodou напиша: > You can see an example at : http://limodou.51boo.com Your forms(I tried user registration) don't give any feedback while they are being submited that's really, really bad usability. :) When you do something with ajax it's really important to give feedback to the user that some

OperationalError: Unable to close due to unfinalised statements

2007-03-10 Thread [EMAIL PROTECTED]
Dear all, I am trying to deploy my blog using apache+mod_python. When I browsed to: http://tentangmico.info/mysite/admin, I got OperationalError. Here is my traceback: Mod_python error: "PythonHandler django.core.handlers.modpython" Traceback (most recent call last): File "/usr/lib/python2.4

Bit torrent class

2007-03-10 Thread Hubi
Hello, i'm looking for bit torrent class for Django which can scrape information (seed, peer) about the torrent file from trackers. I have a big hope, that You will be able to help me :) Thanks in advance. --~--~-~--~~~---~--~~ You received this message because

Re: Tutorial part 2, Problem with edit_inline

2007-03-10 Thread Rotlaus
Hi Rob, On Mar 9, 11:53 pm, Rob J Goedman wrote: > If you are using svn, doing an ' svn -r 4692 up ' in the django_src dir > followed by ' python setup.py install ' will make the model work. Thanks. That worked just fine. --~--~-~--~~~---~--~~ You received th

extra_context for comments templates

2007-03-10 Thread omat * gezgin.com
Hi all, I have set the comments application up to run with my applications and it is functioning as expected. I over rid the templates belonging to the comments application by copying them to my site's templates/ comments folder. This also works fine. But, my base template that comment pages lik