Re: What is the FloatField type returned when accessing the field value ?

2007-01-06 Thread [EMAIL PROTECTED]
I just got through setting this up on Windows using SQLite and am seeing similar errors. I'm convinced this is some sort of Windows issue but am unclear if it's Django or Python in general. --~--~-~--~~~---~--~~ You received this message because you are

How to get latest db results ? (commit problem)

2007-01-06 Thread Ilia Kantor
Hello! I'm using django with Twisted + Mysql. The problem is that cursor for same SQL returns same results between requests if connection.commit() was not called. Sometimes that's a problem, because data is changed by other clients, and commit never happens. Autocommit mode is fine and it

Re: Get time of last visit

2007-01-06 Thread Per
James Bennett skrev: On 1/6/07, Per <[EMAIL PROTECTED]> wrote: > Fist i saved everything a user had seen and not seen in the database, > but i think it will be slow when the site gets bigger, so i'm trying to > find another way to do it. The built-in User model has a 'last_login' field which

Re: License Terms

2007-01-06 Thread James Bennett
On 1/6/07, Rex <[EMAIL PROTECTED]> wrote: Django will be delivered in terms of BSD license. But what about thee code we have written? Can we sell it with our own license? The only thing the Django license obligates you to do is keep the Django copyright statement associated with Django. Any

Re: What is the FloatField type returned when accessing the field value ?

2007-01-06 Thread DavidA
Chris, I seem to recall running into this same issue using MySQL on Windows. What version of MySQLdb are you using. If I'm remembering this correctly, I was using an older version of MySQLdb which mapped DB float/numeric fields to str and then I updated it and the newer version mapped them

Re: License Terms

2007-01-06 Thread Adrian Holovaty
On 1/6/07, Rex <[EMAIL PROTECTED]> wrote: I understand the terms of the BSD license. One thing still eludes me: What if I want to develop a web application / enterprise application which I want to sell to a company. Does the license terms allow it? Django will be delivered in terms of BSD

Re: newforms & object save

2007-01-06 Thread Adrian Holovaty
On 1/6/07, Robert <[EMAIL PROTECTED]> wrote: e = Entry(**form.clean_data) e.save() [...] I'm getting: Invalid value: 'author' should be a instance, not a error message when submitting the form. Hi Robert, It's telling you that when you create your Entry object, the

Re: Problem setting up a separate media server

2007-01-06 Thread Jeremy Dunck
On 1/5/07, stoKes <[EMAIL PROTECTED]> wrote: ... > > We're doing exactly the same thing. This isn't a provided dj context > > processor due to the slippery slope of including all settings in > > context. It's been raised many times. Adding media_url should > > probably be a cookbook entry...

Re: License Terms

2007-01-06 Thread Jeremy Dunck
On 1/6/07, Rex <[EMAIL PROTECTED]> wrote: Django will be delivered in terms of BSD license. But what about thee code we have written? Can we sell it with our own license? IANAL, but yes. --~--~-~--~~~---~--~~ You received this message because you are

Admin Site Fails to Load with Attribute Error

2007-01-06 Thread Ben Lamb
I'm running rev 4293 of Django, under Python 2.3.5 on both OpenBSD 3.7 and Linux 2.6.15 (Kubuntu). I have the same project deployed on both servers. When I try to access the admin site on the OpenBSD machine I get the error: AttributeError at /admin/ 'module' object has no attribute

newforms & object save

2007-01-06 Thread Robert
Hi, I'm having problems with newforms. my views.py: from django import newforms as forms from newforms.ksiazka.models import Entry,Author from django.shortcuts import HttpResponse, render_to_response from django.newforms import form_for_model def add_entry(request): EntryForm =

Re: Get time of last visit

2007-01-06 Thread James Bennett
On 1/6/07, Per <[EMAIL PROTECTED]> wrote: Fist i saved everything a user had seen and not seen in the database, but i think it will be slow when the site gets bigger, so i'm trying to find another way to do it. The built-in User model has a 'last_login' field which you might want to use for

Re: Get time of last visit

2007-01-06 Thread [EMAIL PROTECTED]
could you add this logic to the code that loads the news? have a signature like News.objects.loadNew(user) this way you just do the timestamp when you actually show news to the user --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: What is the FloatField type returned when accessing the field value ?

2007-01-06 Thread Chris Moffitt
The other thing to add to this is that the code works fine on a linux machine running with MySQL. I think it's more than just an error with Satchmo, that's why it's been posted to this list. -Chris --~--~-~--~~~---~--~~ You received this message because you

Re: post-login processing

2007-01-06 Thread Chris Ryland
On Jan 6, 3:03 pm, "Rubic" <[EMAIL PROTECTED]> wrote: When a user logs on, I want to invoke a special method. There doesn't appear to be a way to add a hook/callback to django.contrib.auth.views.login, so my approach is to: ... This works fine, but I'm wondering if there's a better, less

What is the FloatField type returned when accessing the field value ?

2007-01-06 Thread Frédéric Roland
I have a strange problem with Satchmo (eCommerce solution built using Django) with a field defined as a FloatField but is returned as an "str" instead of a Decimal. Here is an excerpt of the code: class SubItem(models.Model): """ The unique inventoriable item. For instance, if a shirt

post-login processing

2007-01-06 Thread Rubic
When a user logs on, I want to invoke a special method. There doesn't appear to be a way to add a hook/callback to django.contrib.auth.views.login, so my approach is to: 1. Create mysite/login/views.py and copy the login/logout methods from django into it. Add code to invoke post-login

<<<= 3D DESIGN SOFTWARE for home use FREE DEMO =>>>

2007-01-06 Thread TANOOJA
*Download Free 3D Designing Softwares* [image: Free 3D Designing] *3D Graphics , 3D Home Design, Auto CAD 3D, Sketch Up 3D and many more free Downloads* Please visit: *http://downloads.100stuff.com/3d_design/ **TANOOJA** * -- Tania Rajpot

Re: Question about request.has_key()

2007-01-06 Thread John M
Alex, Thank you for the reply. After writing this question, I played around more with django, and wrong some test cases to see what the behavior was, and you're absolutely right, however I think you example is wrong? Your name and value fields should be swapped? does the has_key() function

Re: Weird apache problem

2007-01-06 Thread Chris Brand
usually app disappears when some run-time error happends (or when thereare no class Admin: in models.py but I think you did not altered that, right?) It was indeed a run-time error. One of my import statements was missing the project name (i.e. I had "from app.models import..." rather than

Re: Multiple models on one form

2007-01-06 Thread [EMAIL PROTECTED]
Hmmm, somehow the django admin interface gets this done (when you add foreign key related fields). It somehow puts an index into each field name. I started digging through the django code, but ... well, I'm just not great in digging through code... On Jan 5, 6:35 am, "Russell Keith-Magee"

Get time of last visit

2007-01-06 Thread Per
Im trying to get the time since a user last visited my site, because i need to show what is new since last visit. Fist i saved everything a user had seen and not seen in the database, but i think it will be slow when the site gets bigger, so i'm trying to find another way to do it. I have made

Re: Problem setting up a separate media server

2007-01-06 Thread Rob Hudson
what about defining images in your stylesheets? The way we solve that is that if you reference your CSS with src="{{ media_url }}/css/style.css" and have urls in that CSS, define your urls with relative addressing and they'll also come from the media server. For us, we have a directory

Re: Good Web development practice

2007-01-06 Thread Adam Seering
On Jan 6, 2007, at 6:28 AM, [EMAIL PROTECTED] wrote: I do not really think that you need to Redirect after every post - only when data is altered. In general, I agree, but many Web browsers give an annoying warning message if you try to go back across a POST; it's nice to redirect so

Re: RFC newforms usage

2007-01-06 Thread [EMAIL PROTECTED]
Thanks a lot Adrian, i have since refactored the code following your suggestions and it's _a lot_ cleaner now ;-) Lorenzo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Why so slow?

2007-01-06 Thread Ramiro Morales
On 1/5/07, David Abrahams <[EMAIL PROTECTED]> wrote: [...] Most of my content is static in nature, generated on-demand from ReST sources. For those pages, the model checks the mod time of a directory in the filesystem before deciding if the content in the locmem cache is up-to-date. Sorry

Re: newforms: help on an individual field?

2007-01-06 Thread [EMAIL PROTECTED]
I am adding docs at top/bottom now (http://dpaste.com/4407/). Not in the middle. It seems your forms will be really big if you need to add docs in middle, may be then we need to break this to a few pages? I understand how could be probably done: 1. add field type 'DocField' (which will span 2

Re: Question about request.has_key()

2007-01-06 Thread [EMAIL PROTECTED]
Hm, as far I understood your question you did not yet understood how to make it in HTML? In HTML, every submit button will have name="" parameter, so when this button is pressed, you can check for the variable presense in your view. For example: ... you your view: if

Re: Why so slow?

2007-01-06 Thread Kenneth Gonsalves
On 06-Jan-07, at 3:06 PM, David Zhou wrote: maxclients 20 maxrequests per child 5 Why is your maxrequests at 5? Aren't you basically restarting a process every 5 requests? i did this when i had four sites on zettai and a 64mb memory limit - keeps memory usage right down, and my

Re: Weird apache problem

2007-01-06 Thread Julian Romero
On 1/6/07, Chris Brand <[EMAIL PROTECTED]> wrote: I got apache with mod_python up and running ok. Then I used manage.py reset on one of my apps. Since then, I can't see that app in the Admin page. It was showing up fine before. It also shows up fine if I use the development server. I've

Re: Weird apache problem

2007-01-06 Thread [EMAIL PROTECTED]
Since then, I can't see that app in the Admin page. usually app disappears when some run-time error happends (or when there are no class Admin: in models.py but I think you did not altered that, right?) please try enabling Debug in your mod_python (PythonDebug On) and look at apache log

Re: Good Web development practice

2007-01-06 Thread [EMAIL PROTECTED]
Hi Paul, I do not really think that you need to Redirect after every post - only when data is altered. Here is my 'code tempalte' for django.newforms typical view: http://dpaste.com/4406/ Typical template includes form title, action etc replaced. Also, I found it quite useful to have a form

Good Web development practice

2007-01-06 Thread paulh
The subject is a phrase cut from one of the Django tutorials. In this tutorial the authors say that after successfully processing POST data you should return an HttpResponseRedirect and that this will prevent the user using the back button and taking the action again. I have messed around with

Re: Weird apache problem

2007-01-06 Thread mrstone
A wild guess is that there is something wrong with the data in your database... ...are you using the same database from the dev server? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

SVN Access Problem

2007-01-06 Thread santosh k
Hi All, I am trying to access the latest development version from the trunk from svn , but i get this exception : svn: PROPFIND request failed on '/svn/django/trunk' svn: PROPFIND of '/svn/django/trunk': Could not resolve hostname `code.djangoproject.com': The requested name is valid and wa s

P

2007-01-06 Thread santosh k
Hi All, I am trying to access the latest development version from the trunk from svn , but i get this exception : svn: PROPFIND request failed on '/svn/django/trunk' svn: PROPFIND of '/svn/django/trunk': Could not resolve hostname `code.djangoproject.com': The requested name is valid and wa s

Re: Why so slow?

2007-01-06 Thread David Zhou
On Jan 6, 2007, at 1:52 AM, Kenneth Gonsalves wrote: On 06-Jan-07, at 11:22 AM, David Abrahams wrote: i have light traffic - but messing with those helped immensely Rather than me fishing in the dark, can you suggest some changes? Like, "increase the min" or something? i have: