flatpages not finding site_media

2009-11-10 Thread neridaj
I'm trying to use some flatpages for static content and I don''t understand why they keep failing to load media files. I have my template_dirs defined, media_root and media_url - when used in template does not resolve to media_root i.e., template contains: results in: Failed to load source

Re: Uploading and using images in a database application

2009-11-10 Thread derek
Adrian Does the Photologue app store the image references in the database? On Nov 5, 6:58 pm, adrian wrote: > The easiest way is to use the Photologue application. > It has done most of the work for you. > > On Nov 5, 9:53 am, bruno desthuilliers

Re: Uploading and using images in a database application

2009-11-10 Thread derek
Bruno All the help is much appreciated - its working now, and I need to spend time to understand all the changes. On Nov 5, 5:53 pm, bruno desthuilliers wrote: > On 3 nov, 16:02, derek wrote: > > > Given that I am a "wet behind the ears"

Re: annotation with filter issue (left join needed)

2009-11-10 Thread Михаил Лукин
It seems that you're right :( raw SQL takes away most of benefits of ORM 2009/11/10 akaariai > > > > On Nov 10, 8:29 am, Михаил Лукин wrote: > > Well, I didn't find solution yet. Except that filter condition must be > > placed in LEFT OUTER JOIN

Re: request.POST['value'] cannot get value, 500 error

2009-11-10 Thread Tamas Szabo
Does request.POST['value'][0]['LastName'] work? It looks like your post data has an array (keyed as 'value') of dicts. You might also consider using Firebug (or something similar) to inspect the http requests and responses when you are developing. Regards, Tamas On Wed, Nov 11, 2009 at

Template not displaying

2009-11-10 Thread Denis Bahati
Hi all, am using xampp as webserver with django 1.1,when i access the browser the template does not work. The media is in c:/xampp/htdocs/adc/media/ where i put the css,img and js folders. I set admin_media_prefix='http:/127.0.0.1/adc/media/' the same to media_url. The template is at

request.POST['value'] cannot get value, 500 error

2009-11-10 Thread robinne
I am posting data from a form to a django view. The form is created using inputEx (a YUI-like interface). The form gets created much like you create a YUI form and you include names for all your fields in javascript. It is javascript that creates the form on the page. I am able to load database

Re: tiny_mce TypeError

2009-11-10 Thread neridaj
I'm using 1.2 pre-alpha, I tried pasting that code in, again, but no dice. On Nov 10, 8:06 pm, James Bennett wrote: > On Tue, Nov 10, 2009 at 9:47 PM, neridaj wrote: > > I'm just following "Practical Django Projects" and was curious if > > anyone else

Re: How to handle this race condition?

2009-11-10 Thread Continuation
Thank you. On Nov 10, 10:03 pm, Tamas Szabo wrote: > You can inspect the rowcount attribute of the cursor object after you > executed your update. > rowcount returns the number of rows affected by your update, so it will be 1 > if your where condition was true. > > On Wed,

Re: tiny_mce TypeError

2009-11-10 Thread James Bennett
On Tue, Nov 10, 2009 at 9:47 PM, neridaj wrote: > I'm just following "Practical Django Projects" and was curious if > anyone else was able to fix a TypeError when trying to add tiny_mce to > the admin for flatpages, or is this something buried in the > tiny_mce.js file?

tiny_mce TypeError

2009-11-10 Thread neridaj
Hello, I'm just following "Practical Django Projects" and was curious if anyone else was able to fix a TypeError when trying to add tiny_mce to the admin for flatpages, or is this something buried in the tiny_mce.js file? (r'^tiny_mce/(?P.*)$', 'django.views.static.serve', { 'dcument_root':

Re: How to handle this race condition?

2009-11-10 Thread Tamas Szabo
You can inspect the rowcount attribute of the cursor object after you executed your update. rowcount returns the number of rows affected by your update, so it will be 1 if your where condition was true. On Wed, Nov 11, 2009 at 10:04 AM, Continuation wrote: > > > >

Re: How to handle this race condition?

2009-11-10 Thread Continuation
> Would something like > > UPDATE bid = new_bid WHERE id = id and bid < new_bid > > work for you? This is a great idea. One question is, how do I know whether bid has been updated to new_bid or not (ie. how to tell whether the conditional test bid < new_bid is true or not)?

Re: How to handle this race condition?

2009-11-10 Thread Tamas Szabo
> > Anyways, as concurrency is hard and taking row level locks is cheap > and easy way to get the concurrency right I would suggest you use the > select for update method. Also, this way you will avoid the need to > retry failed transactions because of concurrent updates. > > IMHO, both approaches

Re: datetime problems with Django application

2009-11-10 Thread Brian Chapman
There may be another application setting the time zone, but my question still remains as to why the admin page is getting the correct time but the view is not. Brian On Tue, Nov 10, 2009 at 7:45 PM, Graham Dumpleton < graham.dumple...@gmail.com> wrote: > > > > On Nov 11, 10:41 am, BEC

Re: datetime problems with Django application

2009-11-10 Thread Graham Dumpleton
On Nov 11, 10:41 am, BEC wrote: > I have a Django application running with mod_python on Apache. In > settings.py I have set TIME_ZONE="America/New_York". Within my > application I verify that os.environ['TZ'] is indeed set to this > value. Within my view.py I use

Re: A simple database project

2009-11-10 Thread Kenneth Gonsalves
On Wednesday 11 Nov 2009 5:51:00 am Zeynel wrote: > So I want to enter in the search box "Lawyer1" and in the result page > I want to see "Lawyer1 knows Lawyer2" > if your school is a foreign key (I think it is) you need a related name to search for that. Check out ModelAdmin.search_fields in

Re: A simple database project

2009-11-10 Thread Zeynel
Hi Tomasz, I was able to build the admin page and put a search box there: class LawyerAdmin(admin.ModelAdmin): fieldsets = [ ('Name', {'fields': ['last', 'first', 'initial']}), ('School', {'fields': ['school', 'year_graduated']}), ] list_display = ('first',

Re: How to handle this race condition?

2009-11-10 Thread Craig Kimerer
Ah, you're absolutely right. I am not sure how I didn't even catch the other thing that should have grabbed my attention this morning, which was that the table I was using was MyISAM. This is why I shouldn't send emails before noon :) Sorry about that, that was my mistake. Craig On Tue, Nov

datetime problems with Django application

2009-11-10 Thread BEC
I have a Django application running with mod_python on Apache. In settings.py I have set TIME_ZONE="America/New_York". Within my application I verify that os.environ['TZ'] is indeed set to this value. Within my view.py I use datetime.datetime.now() to create a time stamp that is stored in a model

Happy 5th Brithday Firefox

2009-11-10 Thread aga toytoy
hmmm it seems we forgot to greet and thank Firefox for it's 5th year of existence! http://www.spreadfirefox.com/5years/en-US/ http://zi.pe/eft --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Imports, works from directory but not from file

2009-11-10 Thread Bill Freeman
Did you really mean "init.py", rather than the required "__init__.py". If so, that's wrong. I presume that the names of the files and directories are all lower case and contain no spaces or accented characters. I presume that you've checked and rechecked the spelling of the file name against

Happy 5th Brithday Firefox

2009-11-10 Thread aga toytoy
hmmm it seems we forgot to greet and thank Firefox for it's 5th year of existence! http://www.spreadfirefox.com/5years/en-US/ http://zi.pe/eft --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Model field validation for admin

2009-11-10 Thread pjrhar...@gmail.com
> > > Hello, I want to make a field optional (blank=True), only if another > > > text field's options match a certain value in the admin. Is there any > > > way to do this? Thanks! You want to do this in a modelform, and then specify that model form in your admin.py. Put the checks in the

Re: How to handle this race condition?

2009-11-10 Thread akaariai
You missed the 'where bid < new_bid' part of the update. In that case there is no race I am aware of. Either the transaction sees the update of the other transaction in which case the highest bid will stay in effect or it will not see the effect of the other transaction in which case there is

Re: How to handle this race condition?

2009-11-10 Thread Christophe Pettus
On Nov 10, 2009, at 11:55 AM, Craig Kimerer wrote: > That only works if you have transactions disabled for your > database. If your connections are using transactions, you still > have the race condition. The example you give isn't exactly the same as the suggestion. In the suggestion,

Re: Model field validation for admin

2009-11-10 Thread pixelcowboy
Ok, I'll try that.Thanks! On Nov 10, 10:19 am, rebus_ wrote: > 2009/11/10 pixelcowboy : > > > > > Hello, I want to make a field optional (blank=True), only if another > > text field's options match a certain value in the admin. Is there any > > way

Re: MySQL and 'NoneType object is unsubscriptable' error

2009-11-10 Thread Julien Phalip
On Nov 11, 9:37 am, Julien Phalip wrote: > On Nov 10, 9:12 pm, Daniel Roseman wrote: > > > > > On Nov 10, 1:36 am, Julien Phalip wrote: > > > > Hi, > > > > I've tried to install MySQL for an existing project, and I'm getting a > > >

Re: MySQL and 'NoneType object is unsubscriptable' error

2009-11-10 Thread Julien Phalip
On Nov 10, 9:12 pm, Daniel Roseman wrote: > On Nov 10, 1:36 am, Julien Phalip wrote: > > > > > Hi, > > > I've tried to install MySQL for an existing project, and I'm getting a > > strange error (see traceback below). Apparently "self.converter" is > >

Re: wsgi config

2009-11-10 Thread Angel Cruz
Maybe the backslash is a problem. Here is how my media alias looks like: Alias /media/ "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/django/media/" Order allow,deny Allow from all On Sun, Nov 8, 2009 at 11:37 PM, knight wrote: > > Hi. I have a problem

Re: Imports, works from directory but not from file

2009-11-10 Thread When ideas fail
I used this in my settings.py to add the open id folder on my path sys.path.append(os.path.join(FILE_ROOT, 'lib', 'openid')) and on my path it say: 'C:\\TheAbeonaFile\\Python26\\Lib\\idlelib\\lib\\openid' And both the yadis file and openid file have an init.py On 10 Nov, 22:18, Bill Freeman

Re: djangocon videos

2009-11-10 Thread Vitaly Babiy
According to there twitter (http://twitter.com/djangocon/status/4680045261) they should be up but who knows when. Vitaly Babiy On Tue, Nov 10, 2009 at 8:01 AM, Aljosa Mohorovic < aljosa.mohoro...@gmail.com> wrote: > > will conference videos be available or did something terrible > happened? > >

Re: Imports, works from directory but not from file

2009-11-10 Thread Bill Freeman
Which all of these directories are on your python path, and which of them have __init__.py files? Bill [Hint to answer first question: from pprint import pprint as pp import sys pp(sys.path) ] On Tue, Nov 10, 2009 at 5:12 PM, When ideas fail wrote: > > I have a

Imports, works from directory but not from file

2009-11-10 Thread When ideas fail
I have a folder called lib on my path and in there I have a folder called openid. If i want to import things from openid i have a problem. For example if I have these 2 import statements: from openid.yadis import xri from openid.association import Association as OIDAssociation yadis is a

Re: domains vs sub-domains

2009-11-10 Thread Evgeny
>From the user's point of view #2 might be better i'd think that most people naturally "root" path to site name On Nov 10, 12:38 pm, Paul Menzel wrote: > Am Montag, den 09.11.2009, 21:38 -0800 schrieb Chris: > > > I've recently been in discussion about which is

Re: name 'request' is not defined

2009-11-10 Thread Daniel Roseman
On Nov 10, 9:32 pm, nash wrote: > hi thanks for the reply i am trying to get django up and running with > googleapp engine as. i understand in django correct me if i am wrong > return is a global variable when a url is matched as defined in the > url.py it calls the class

Re: name 'request' is not defined

2009-11-10 Thread nash
hi thanks for the reply i am trying to get django up and running with googleapp engine as. i understand in django correct me if i am wrong return is a global variable when a url is matched as defined in the url.py it calls the class that is matched in views.py and all the variables are passed in

Re: Feedback on Django1.1.1

2009-11-10 Thread James Bennett
2009/11/10 Evgeny : > sometimes there is this error after upgrade to 1.1.1: > > http://groups.google.com/group/django-users/browse_thread/thread/c6a61a3788138745 >From the sound of it, this was a configuration problem on your system, and not an issue with Django (any

Re: Just upgraded to 1.1, can't start development server, TypeError

2009-11-10 Thread Evgeny
I think I found a workaround: first completely delete previous django installation, then install 1.1.1 the problem went away for me after this manipulation. On Nov 10, 12:39 pm, Evgeny wrote: > Same problem here. Any ideas? > Thanks! > > On Oct 14, 7:11 pm, eculver

Re: Feedback on Django1.1.1

2009-11-10 Thread Evgeny
sometimes there is this error after upgrade to 1.1.1: http://groups.google.com/group/django-users/browse_thread/thread/c6a61a3788138745 On Nov 7, 9:29 am, Tomasz Zieliński wrote: > On 7 Lis, 09:03, Good Z wrote: > > > > > Any feedback on

Re: Just upgraded to 1.1, can't start development server, TypeError

2009-11-10 Thread Evgeny
Same problem here. Any ideas? Thanks! On Oct 14, 7:11 pm, eculver wrote: > Not so sure about that. Here are my installed apps: > > INSTALLED_APPS = ( >     'django.contrib.auth', >     'django.contrib.contenttypes', >     'django.contrib.sessions', >    

Re: domains vs sub-domains

2009-11-10 Thread Paul Menzel
Am Montag, den 09.11.2009, 21:38 -0800 schrieb Chris: > I've recently been in discussion about which is better to have. > > http://media.example.com OR > http://example.com/media/ > > 1) The first method, I've been told, allows you to make more requests. > IE for example can only make like 4

Re: name 'request' is not defined

2009-11-10 Thread Daniel Roseman
On Nov 10, 7:34 pm, nash wrote: > hi i have defined a function in my view.py > > from django.http import HttpResponse > > class work(request): >         def get(self): >                 return HttpResponse("its working") > > but when i browse to mysite/work i am getting

Re: How to handle this race condition?

2009-11-10 Thread Craig Kimerer
On Mon, Nov 9, 2009 at 10:56 PM, Tamas Szabo wrote: > Would something like > > UPDATE bid = new_bid WHERE id = id and bid < new_bid > > work for you? > > It is a more optimistic approach (it assumes that the case you describe is > an exception rather than what usually happens)

name 'request' is not defined

2009-11-10 Thread nash
hi i have defined a function in my view.py from django.http import HttpResponse class work(request): def get(self): return HttpResponse("its working") but when i browse to mysite/work i am getting "name 'request' is not defined" any one have any idea what is wrong ?

Adding a search box in admin

2009-11-10 Thread Zeynel
Hello, Thanks again for all the help. I have the admin page and I added some lawyer names and schools, now I want to add the search box. In the tutorial it says "Let's add some search capability: search_fields = ['question'] ... " Translating this to my model, I entered in admin.py

Re: computed values in templates...

2009-11-10 Thread Gonzalo Delgado
El Tue, 10 Nov 2009 10:31:13 -0800 (PST) deostroll escribió: > Is there a recommended way to do this...? Yeah: write an instance method in your "Stock" class (model) that returns exactly that and call it from the template. Remember: there shouldn't be any data processing

computed values in templates...

2009-11-10 Thread deostroll
Hi, In my db I hve some fields like 'price' and 'quantity'. In one record of data I want to display the 'price x quantity'...I tried something like this: {{ stock.price * stock.quantity }} ...and got error. Is there a recommended way to do this...? --deostroll

Re: how to achieve functionality of asynchronous popups

2009-11-10 Thread elminio
Thanks, That is exactly the answer I needed. --~--~-~--~~~---~--~~ 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 from this group,

Re: How to handle this race condition?

2009-11-10 Thread Skylar Saveland
Why store it in the database? You might be able to avoid this directly if you use a model method for this attribute. Continuation wrote: > I'm working on an auction app. > > In an Auction object I store the current_high_bid for that auction. > > When a new_bid comes in, I: > 1) retrieve the

Re: how to achieve functionality of asynchronous popups

2009-11-10 Thread Javier Guerra
On Tue, Nov 10, 2009 at 10:03 AM, elminio wrote: > What I want to achieve is sort of popup which will appear on the first > user screan informing him that record created by him was changed. > > The logic described above is just a sample. What I need is to know how > to

Puzzling filter/annotation of queryset based on count

2009-11-10 Thread ben
Hi all, have been having trouble with figuring out how to construct more complicated filters on query sets, especially when mixing them with annotations. Specifically, I have: An Item, which has one of many ItemTypes A Collection, which contains many Items. What I want to construct is a

Re: How to handle this race condition?

2009-11-10 Thread Christophe Pettus
On Nov 9, 2009, at 10:56 PM, Tamas Szabo wrote: > UPDATE bid = new_bid WHERE id = id and bid < new_bid That's an even better solution, if no further processing within the locked area is required. -- -- Christophe Pettus x...@thebuild.com

Re: How to handle this race condition?

2009-11-10 Thread bruno desthuilliers
On 10 nov, 05:36, Continuation wrote: > I'm working on an auction app. > > In an Auction object I store the current_high_bid for that auction. > > When a new_bid comes in, I: > 1) retrieve the current_high_bid field of the Auction object > 2) compare it with the new_bid

Re: Model field validation for admin

2009-11-10 Thread rebus_
2009/11/10 pixelcowboy : > > Hello, I want to make a field optional (blank=True), only if another > text field's options match a certain value in the admin. Is there any > way to do this? Thanks! > This is from the top of my head, but you probably want to say null=True

Re: TemplateSyntaxError

2009-11-10 Thread Daniel Roseman
On Nov 10, 3:02 pm, Zeynel wrote: > Thanks. I will try what you suggested. But I am almost there with the > admin, the only thing is I need to change the date format so that it > takes only the year. Now DateField requires month, day and year. I > tried this > >

Model field validation for admin

2009-11-10 Thread pixelcowboy
Hello, I want to make a field optional (blank=True), only if another text field's options match a certain value in the admin. Is there any way to do this? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: How to handle this race condition?

2009-11-10 Thread Christophe Pettus
On Nov 9, 2009, at 10:17 PM, Continuation wrote: > The entire function will be wrapped within a transaction. > SELECT FOR UPDATE will acquire a row-level lock > and that lock will not be released until the function update_high_bid > () returns successfully, or until the function raises an

how to achieve functionality of asynchronous popups

2009-11-10 Thread elminio
Hello, I would like to implement functionality described below. Lets say that There is a Django application in which each user can create records and insert them into Database (for example record containing one text column). Many users can be logged in the application at the same time. One

Re: TemplateSyntaxError

2009-11-10 Thread Zeynel
Thanks. I will try what you suggested. But I am almost there with the admin, the only thing is I need to change the date format so that it takes only the year. Now DateField requires month, day and year. I tried this year_graduated = models.DateField('Year graduated', input_formats= ['%Y']) as

Re: Databrowse: Loading a large number of records

2009-11-10 Thread Alex Robbins
That error happens if you refresh the page while it is still loading from the dev server. You may have gotten impatient, refreshed and caused that error. It is possible that this isn't really the problem you are having, but just a secondary issue caused by the long load time and a page refresh.

Re: Display a view of a single record?

2009-11-10 Thread Alex Robbins
Derek, If you want something that display data but doesn't allow you to edit it, you should check out the databrowse[1] contrib app. You just register a model with it (like the admin) and it generates all the pages. It lets users look through the data, but not edit it.

Re: TemplateSyntaxError

2009-11-10 Thread Monika Sulik
When you execute manage.py sql wkw, the output is just how your current models translate into SQL. To see what's actually in the database you should do manage.py dbshell and then use whatever command your database supports (\d wkw_lawyer in PostgreSQL and DESCRIBE wkw_lawyer in MySQL). Try doing

Re: How to handle this race condition?

2009-11-10 Thread Preston Holmes
another option if you want to stay in just python and are on a POSIX system is to use system file locking to ensure you don't get concurrent calls to your updated function. http://docs.python.org/library/fcntl.html#fcntl.lockf -Preston On Nov 9, 10:17 pm, Continuation

Re: TemplateSyntaxError

2009-11-10 Thread Zeynel
Ok, thanks. I started over and created a new project sw1 and module wkw1, and now it all works. But now I noticed that, the "initial" field in "Lawyer" is required. But I want it to be optional. Do I need to start over again to make that change :( And also in the "Year Graduated" field I just

forms.ChoiceField and empty values

2009-11-10 Thread Monika Sulik
Hi, I have the following problem... I've got a form, which looks like this: class CompetitionSearchForm(forms.Form): name = forms.CharField(required=False) type = forms.ChoiceField(choices=COMPETITION_TYPE_CHOICES, required=False) The tuple COMPETITION_TYPE_CHOICES is used in a model

Re: Will PasswordField be in Django?

2009-11-10 Thread Brett Parker
On 10 Nov 21:10, Shu Hung (Koala) wrote: > On Tue, Nov 10, 2009 at 8:55 PM, Brett Parker > wrote: > > > > > Well, a password field isn't actually a different type of data than a > > text field, so you'd usually just override the form's default for the > > password

Re: Will PasswordField be in Django?

2009-11-10 Thread Lakshman Prasad
django comes with an inbuilt form that does the hashing and saving of password. from django.contrib.auth.forms import UserCreationForm Simliarly an inbuilt form that does the login, logout and such. Look at the source in the path above, and/or refer to the documentation of django auth:

Re: Will PasswordField be in Django?

2009-11-10 Thread Shu Hung (Koala)
On Tue, Nov 10, 2009 at 8:55 PM, Brett Parker wrote: > > Well, a password field isn't actually a different type of data than a > text field, so you'd usually just override the form's default for the > password field, using a modelform to specify that you want it to

Re: TemplateSyntaxError

2009-11-10 Thread Daniel Roseman
On Nov 10, 12:57 pm, Zeynel wrote: > Hi Tim, > > Yes, I syncdb several times. > > C:\sw\sw>manage.py syncdb > > C:\sw\sw>manage.py sql wkw > > BEGIN; > CREATE TABLE "wkw_school" ( >     "id" integer NOT NULL PRIMARY KEY, >     "school" varchar(200) NOT NULL > ) > ; > CREATE

djangocon videos

2009-11-10 Thread Aljosa Mohorovic
will conference videos be available or did something terrible happened? Aljosa Mohorovic --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: TemplateSyntaxError

2009-11-10 Thread Zeynel
Hi Tim, Yes, I syncdb several times. C:\sw\sw>manage.py syncdb C:\sw\sw>manage.py sql wkw BEGIN; CREATE TABLE "wkw_school" ( "id" integer NOT NULL PRIMARY KEY, "school" varchar(200) NOT NULL ) ; CREATE TABLE "wkw_lawyer" ( "id" integer NOT NULL PRIMARY KEY, "school_id" integer

Re: Will PasswordField be in Django?

2009-11-10 Thread Brett Parker
On 10 Nov 20:05, Shu Hung (Koala) wrote: > Hello, > > I am new to Django. > I'm writing an app with it. And I found there is no PasswordField in Django. > I Googled a bit. And I found, in patch #61, that someone has wrote it > already. > > Will it be in place soon? > When? Or, what is the

[newbie] New records and edited records

2009-11-10 Thread DoctorC
Hi, I'm following the book "Django 1.0 WEB Site Development" to learn django and python. I modified the function BookmarkSave so that it correctly initialize the checkbox showing if a bookmark is shared or not. I think it's correct, please confirm I used the right way to do it adding share =

Will PasswordField be in Django?

2009-11-10 Thread Shu Hung (Koala)
Hello, I am new to Django. I'm writing an app with it. And I found there is no PasswordField in Django. I Googled a bit. And I found, in patch #61, that someone has wrote it already. Will it be in place soon? When? Or, what is the matter of it? Koala Yeung

Re: annotation with filter issue (left join needed)

2009-11-10 Thread akaariai
On Nov 10, 8:29 am, Михаил Лукин wrote: > Well, I didn't find solution yet. Except that filter condition must be > placed in LEFT OUTER JOIN ... ON ( ), but i'm not sure if it's > possible with Django ORM. I notices that Aggregate base class takes 'extra' >

Re: domains vs sub-domains

2009-11-10 Thread rebus_
Hi, I personally also use option #1 due to performance, scalability and "prettiness" of URL, etc, reasons all mentioned in above posts. On the other hand if you spread your content over a bunch of sub domains you could, instead of increasing performance, downgrade it due to numerous DNS queries

Re: TemplateSyntaxError

2009-11-10 Thread Tim Chase
> (I changed "Education" to "School" because in the admin panel it > showed up as "Educations". I think "Schools" makes more sense.) Did you remember to syncdb afterwards? I'd be interested to see if the SQL you showed is what the tables in the DB actually look like. > Any ideas why Lawyer

Re: How to handle this race condition?

2009-11-10 Thread Tim Chase
>> 1) retrieve the current_high_bid field of the Auction object >> 2) compare it with the new_bid >> 3) if the new bid is higher than current_high_bid, I update >> current_high_bid to the value of the new_bid. >> >> but there's a (slight) chance that between steps (1) and (3) a >> different user

Re: MySQL and 'NoneType object is unsubscriptable' error

2009-11-10 Thread Daniel Roseman
On Nov 10, 1:36 am, Julien Phalip wrote: > Hi, > > I've tried to install MySQL for an existing project, and I'm getting a > strange error (see traceback below). Apparently "self.converter" is > None, but I can't see why. > > I can access the database just fine using the

Re: Display a view of a single record?

2009-11-10 Thread derek
Yes, the fields should not be editable in a "view". However, I do not see it as "a problem" - more as "a desirable feature". There are any number of use cases for letting users see detailed record data but not be able (or not need, at that point in time) to edit it. This feature is not meant

Re: Django internationalization problem: Error: errors happened while running xgettext on __init__.py /bin/sh: xgettext: command not found

2009-11-10 Thread Nicu Marcu
I did not know that gettext should be installed. After installing it ( apt-get install gettext) - Debian, it's working just fine. 2009/11/10 rebus_ > > 2009/11/9 NMarcu : > > > > Hello all, > > > > When I run django-admin.py makemessages -l ro I

Re: pre-save and check for existing value of image

2009-11-10 Thread ankit rai
you self.instance.fieldname use this ur from . On Tue, Nov 10, 2009 at 12:58 PM, Ramdas S wrote: > Hi, > > I have this app which has an ImageField, where the image needs to be > cropped, resized, and a few effects (all from PIL) are applied on it, the > model looks something