newforms file upload

2007-05-02 Thread Vance Dubberly
Am I correct in my guess that uploading files and new forms are two things that just don't go together? I'm about to just do the file handling myself ( not a big deal ) but thought I'd check with the smart people before I went there. -- To pretend, I actually do the thing: I have therefore

Re: Preselected drop-down menu value with oldforms...

2007-05-02 Thread Mike Axiak
Hello dbee, If on lines above that you wrote: errors = new_data = {} then Python will use reference and make errors and new_data point to the same object. Thus, writing new_data['drop_selection'] = 'US' renders errors['drop_selection'] = 'US' since they are in fact the same object. Instead

Preselected drop-down menu value with oldforms...

2007-05-02 Thread dbee
Guys, I'm trying to preselect a value for a drop down menu by passing that menu a value. Problem is though, that the value comes out preselected AND it also comes out as an ***error beside the drop down menu. I'm entering the value with new_data NOT with errors... It looks something like this

Re: Django on EC2 and S3

2007-05-02 Thread Joseph Heck
You've pretty well nailed "issues with hosting on EC2" on the head. Some companies (non-Django related) are doing it, and they're backing up their databases to S3 and maintain a permanent proxy on dedicated hardware external to EC2 (as opposed to dyndns). To my knowedlge, there's not been much

Re: Job: Internships at World Online in Lawrence

2007-05-02 Thread Gerry Steele
Does being an Northern Irish student exclude me? Though I guess the geography precludes it anyway :-\ Jacob Kaplan-Moss wrote: > On 5/2/07, Christian Markwart Hoeppner <[EMAIL PROTECTED]> wrote: > >> A shame I'm not a student. I would be applying right now :D >> > > Oops -- looks like

Re: Job: Internships at World Online in Lawrence

2007-05-02 Thread Jacob Kaplan-Moss
On 5/2/07, Christian Markwart Hoeppner <[EMAIL PROTECTED]> wrote: > A shame I'm not a student. I would be applying right now :D Oops -- looks like I wasn't quite clear enough about this: although we expect students to apply, the program's in no way limited to students! The idea is to find

generic detail info view displaying _set.all()

2007-05-02 Thread Tobias Bender
Hi. Assuming I have these models: #models.py class Publisher(models.Model): name = models.CharField(maxlength=30) street = models.CharField(maxlength=30) class Book(models.Model): name = models.CharField(maxlength=30) publisher = models.ForeignKey(Publisher) What do I have

Re: django i18n and google bots

2007-05-02 Thread Phil
I've already submitted a sitemap to google. But as Eugene said, and after doing some research today, I'm afraid that the bots are impervious to cookies. This means that I will have to construct URL with a language designator )c: On May 2, 8:12 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >

Django on EC2 and S3

2007-05-02 Thread [EMAIL PROTECTED]
I plan to go very big with django and use EC2 from Amazon. Right now, I have the basic situation. http://media.djangobook.com/content/chapter21/scaling-1.png (linux instance,media, postgres on the same virtual machine) But I plan to go bigger ;-) just in case

Re: db class from SQL create table statements

2007-05-02 Thread Mark Phillips
On May 2, 2007, at 12:47 PM, Brandon Low wrote: > python manage.py inspectdb Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: db class from SQL create table statements

2007-05-02 Thread Brandon Low
python manage.py inspectdb On 2007-05-02 (Wed) at 12:46:10 -0700, Mark Phillips wrote: > > I am not quite sure how to search for this... > > I have an existing database in mysql; a great many tables and columns > are involved. Is there a way to create the django data classes by > reading

db class from SQL create table statements

2007-05-02 Thread Mark Phillips
I am not quite sure how to search for this... I have an existing database in mysql; a great many tables and columns are involved. Is there a way to create the django data classes by reading the database schema or create table statements? - Mark, a lazy man by trade, a curious sort by

Re: Job: Internships at World Online in Lawrence

2007-05-02 Thread Christian Markwart Hoeppner
This are great news! Django is making it's way into the big world, and I'm glad to be part of the community. A shame I'm not a student. I would be applying right now :D Run everyone! You're wasting the oportunity of your life! El mié, 02-05-2007 a las 14:22 -0500, Jacob Kaplan-Moss escribió: >

Re: operationalError 2002, mysql on osx 10.9

2007-05-02 Thread Mark Phillips
On May 2, 2007, at 12:26 PM, Michael K wrote: > > On May 2, 3:25 pm, Michael K <[EMAIL PROTECTED]> wrote: >> >> Try setting DATABASE_HOST to 'localhost' instead of blank. What OS >> are you running this on? > > This will teach me to read the subject closely. I should have went > with my gut

Re: operationalError 2002, mysql on osx 10.9

2007-05-02 Thread Mark Phillips
On May 2, 2007, at 12:25 PM, Michael K wrote: > > On May 2, 10:09 am, Mark Phillips <[EMAIL PROTECTED]> wrote: >> Being a newbie has its challenges... > > I know exactly what you mean. > >> The server is running mysql, I use phpMyAdmin and a couple of other >> applications successfully with it.

Re: operationalError 2002, mysql on osx 10.9

2007-05-02 Thread Michael K
On May 2, 3:25 pm, Michael K <[EMAIL PROTECTED]> wrote: > > Try setting DATABASE_HOST to 'localhost' instead of blank. What OS > are you running this on? This will teach me to read the subject closely. I should have went with my gut feeling that it was Mac OS X :) Michael

Re: operationalError 2002, mysql on osx 10.9

2007-05-02 Thread Michael K
On May 2, 10:09 am, Mark Phillips <[EMAIL PROTECTED]> wrote: > Being a newbie has its challenges... I know exactly what you mean. > The server is running mysql, I use phpMyAdmin and a couple of other > applications successfully with it. > There is an existing database of the same name as the

Job: Internships at World Online in Lawrence

2007-05-02 Thread Jacob Kaplan-Moss
Howdy folks -- I'm extremely excited to announce our new internship program here in Lawrence. Starting this summer we're going to be hiring interns to join our kick-ass team and learn the ropes. If you're a student, or if you're trying to break into the world of next-generation web development,

Re: Unknown column 'appname_modelname.category_id' in 'field list

2007-05-02 Thread Bruno Tikami
have you tried to "syncdb" your project with mysql just, do it once more. I think it's worth a try ;) On 5/2/07, Bruno Tikami <[EMAIL PROTECTED]> wrote: > > nerezus, I'm gonna check out your problem & try to simulate this error for > you man. > > The "category_id" field it complains it

Re: Unknown column 'appname_modelname.category_id' in 'field list

2007-05-02 Thread Bruno Tikami
nerezus, I'm gonna check out your problem & try to simulate this error for you man. The "category_id" field it complains it generated automatcally by Django. It ALWAYS create a field called _id if you don't create an AutoField atributte. You should see it on select * from publications_category ;)

Re: django i18n and google bots

2007-05-02 Thread [EMAIL PROTECTED]
I don't know if it would help, but if you sign up for the google webmaster tools you can set a preferred site root. Also, submitting a sitemap might help. On May 2, 7:37 am, Eugene Morozov <[EMAIL PROTECTED]> wrote: > I think there's no other solution as to use language designator in > URLs and

how to select from a huge set of data?

2007-05-02 Thread Ulf Dambacher
Hi I'm doing a project with a technical database. The model consists of different constants. The key is autogenerated. Each entry has a category and a name. Togther they are uniqe Now I'd like the user to be able to select exactly one from this >300 data lines within a (new)form. Currently

Re: Unknown column 'appname_modelname.category_id' in 'field list

2007-05-02 Thread nerezus
I tried to use sqlite3 instead of mysql, and it starts work. But I need mysql, how to make this code work with it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

special session-time usecase

2007-05-02 Thread dummy
Hi all, I use django.contrib.sessions with SESSION_EXPIRE_AT_BROWSER_CLOSE=True. I need a way to expire a session on certain amount of time of inactivity in the browser. Each new request to django should retrigger the expire time. Is there a possibility to modifiy the session module or

Re: complex data retrieval?

2007-05-02 Thread patrick k.
Am 02.05.2007 um 18:43 schrieb [EMAIL PROTECTED]: > > You didn't post your full model code ... I didn't see anything about > auditoriums in it :) ... can you post the relevant part of your model > for that? sorry, I used the term "auditorium" for better understanding - nothing about that in

Re: newforms is_valid issue

2007-05-02 Thread maeck
d = Person.objects.get(id=1) p = forms.models.form_for_instance(d) f=p() After I do this both "f.is_valid()" and "f.is_bound" are false. However, there is correct data in the form if I do "print f" (and that confuses me). An alternative way I tried was: d = Person.objects.get(id=1) p =

Auction Ads - advertise eBay auctions on your site and get paid from eBay

2007-05-02 Thread [EMAIL PROTECTED]
It's free to join and they pay 100% eBay commissions! http://www.auctionads.com/refer_7d25c3d1a5ecc615205e --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: connecting to multiple databases

2007-05-02 Thread [EMAIL PROTECTED]
I'll give the merging a shot...then try and see about getting it committed... it might take me a few weeks...since it's my initial voyage through the Django code base, and subversion branches, etc plus I still have tons of deadlines at work on top of that :) At anyrate...when I get all of

Re: complex data retrieval?

2007-05-02 Thread [EMAIL PROTECTED]
You didn't post your full model code ... I didn't see anything about auditoriums in it :) ... can you post the relevant part of your model for that? So you are basically trying to list movie times/cinema for each movie..right? W/out knowing your exact model code...what you have in your py file

Re: each request results in 2 hits on web server

2007-05-02 Thread Enrico
I knew it! ;) Tricky! --~--~-~--~~~---~--~~ 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, send email to [EMAIL

Re: complex data retrieval?

2007-05-02 Thread va:patrick.kranzlmueller
here´s an example of how the page should look like: http://www.skip.at/AT/kinoprogramm/abfrage/prog_film.php? blnr=1=0=3_tag=02.+05.=9315=Das +wilde+Leben (we´re just redesigning that page using django) patrick Am 02.05.2007 um 17:47 schrieb [EMAIL PROTECTED]: > > Oops... that should have

Re: connecting to multiple databases

2007-05-02 Thread Brian Luft
Hi carole.zieler, I posted a reply to you earlier but don't see it here so I guess it went to the groups twilight zone. Anyway I was just saying I'm glad to hear you are having success with the current state of the multidb branch. I've used it as a proof of concept but am hesitant to run with

Re: complex data retrieval?

2007-05-02 Thread va:patrick.kranzlmueller
I´m not quite sure about this. how would you retrieve the "cinema_list" queryset? moreover, your template misses one for-loop (the one for the screens/ auditoriums). don´t know if this is helpful, but here´s what the template looks like currently (which is a mess):

Re: complex data retrieval?

2007-05-02 Thread [EMAIL PROTECTED]
Oops... that should have been {{ screens.screening_date }} {{ screens.screening_time }} Forgot the 's'. If this isn't quite what you mean...let me know... I may have misunderstood what you were looking for. On May 2, 11:44 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > You should be

Re: complex data retrieval?

2007-05-02 Thread [EMAIL PROTECTED]
You should be able to do something like this: {% for cinema in cinema_list %} {{ cinema }} {% for screens in cinema.cinemaprogram_set.all %} {{ screen.screening_date }} {{ screen.screening_time }} {% endfor %} {% endfor %} Go to this page:

Re: newbie -- trouble using Postgres

2007-05-02 Thread BasicSci007
Uhh. Is a "backend" a postreSQL client? I am able to run psycopg2.connect from Python and read the pg_databases table. Really appreciate your help! On May 2, 8:54 am, "Honza Král" <[EMAIL PROTECTED]> wrote: > are you sure you are using the correct backend, note that there are > two backends

Re: connecting to multiple databases

2007-05-02 Thread [EMAIL PROTECTED]
I've just posted over in django-dev that I'm intersted in taking over maintenance of this branch ... I'm not to skilled with subversion... but I'm going to go ahead and give it a shot, and attempt over the next two weeks ( out of town for a few days on vacation ) to merge the changes to the trunk

Re: each request results in 2 hits on web server

2007-05-02 Thread omat * gezgin.com
Thanks Enrico, it was an emtpy css left in the base template... On 2 Mayıs, 17:41, Enrico <[EMAIL PROTECTED]> wrote: > I got the same situation a long time ago... > > After a lot of headaches, I've noticed that I had an empty image tag, > so the browser calls the current page twice, one time

Re: connecting to multiple databases

2007-05-02 Thread brutimus
I've also seen a lot of demand for the multi-db support; however, I do understand the time that this would take to get updated, stabilized, and worked into trunk. I have several apps I would like to work on where I need to pull data from a couple legacy databases (datawarehouse type dbs), but

Re: each request results in 2 hits on web server

2007-05-02 Thread Enrico
I got the same situation a long time ago... After a lot of headaches, I've noticed that I had an empty image tag, so the browser calls the current page twice, one time for the page itself, another for the image with empty "src". I bet your problem is almost the same. Try checking the embedded

each request results in 2 hits on web server

2007-05-02 Thread omat * gezgin.com
Hi all, I am running the latest svn version on development web server and in one of my applications, for each request, the view function is called twice. Whether the request that triggers the view function is GET or POST, another GET request follows the original and the view function is called

operationalError 2002, mysql on osx 10.9

2007-05-02 Thread Mark Phillips
Being a newbie has its challenges... Before going any further on the answers to my earlier post, I thought I should walk through the setup process once more. I set up a new app. I can load the "it worked!" page using a browser on the localhost with "runserver". When I ran the "manage.py

Re: IEPngFix Hack for Django ?

2007-05-02 Thread dbee
Lot's of people turn off javascript ... Anyone with the FF No-script extension will have it off by default Regardless though, the js method doesn't work for css embedded images, so I'm back to square one :-( On 2 May, 13:10, Gerry Steele <[EMAIL PROTECTED]> wrote: > > The only problem

Re: TextInput({'onKeydown': 'some javascript code'} problem

2007-05-02 Thread Ivan Sagalaev
hoamon wrote: > no.setAttribute("onKeydown", 'Element.update("NO_CHECK", " src=http://mydomain/arrows.gif>");'); Instead of assigning a raw onkeydown attribute it's better to attach an event. Look into prototype.js' docs, I bet it can do this in a cross-browser fashion. Something like

Re: newbie -- trouble using Postgres

2007-05-02 Thread Honza Král
are you sure you are using the correct backend, note that there are two backends for postgreSQL, you want the one with psycopg2 in it On 5/2/07, BasicSci007 <[EMAIL PROTECTED]> wrote: > > Can't seem to get django and postgres to hook up. MySQL or sqlite3 > work fine. postgres seems to work fine

Re: TextInput({'onKeydown': 'some javascript code'} problem

2007-05-02 Thread hoamon
that's original way i use, but i don't understand why IE can't work. i put the source below here to my form block ... var no = document.getElementById("id_no"); var no_check = document.createElement("no_check"); no_check.innerHTML = '

Re: django i18n and google bots

2007-05-02 Thread Eugene Morozov
I think there's no other solution as to use language designator in URLs and placing language links on the main page. There's no way Google or any other bot can crawl the site several times with different cookies or something. Currently I'm redoing site in Django that suffers the same problem and

Re: IEPngFix Hack for Django ?

2007-05-02 Thread Gerry Steele
> The only problem though, is what about user's without javascript > enabled ? Who would do that? I sure understand turning off flash/java etc. But who would turn off javascript? And surely lynx users wont be too worried about png opacity anyway.

Re: IEPngFix Hack for Django ?

2007-05-02 Thread dbee
Hi RajeshD, Yeah, thanks. The javascript solution is certainly easy to work with. The only problem though, is what about user's without javascript enabled ? The htc file solution is a b**ls to get working. But it's certainly a more robust solution ... I can't seem to get it to work though,

Re: Dealing with DB2

2007-05-02 Thread Russell Keith-Magee
On 5/2/07, Javier Villavicencio <[EMAIL PROTECTED]> wrote: > > Russell Keith-Magee wrote: > > On 5/2/07, mo <[EMAIL PROTECTED]> wrote: > >> Hi, > >> I'm new to Django... > >> Is there any special reason that Django does not support DB2? > > > > The obvious reason is that nobody has offered to

Re: Dealing with DB2

2007-05-02 Thread Javier Villavicencio
Russell Keith-Magee wrote: > On 5/2/07, mo <[EMAIL PROTECTED]> wrote: >> Hi, >> I'm new to Django... >> Is there any special reason that Django does not support DB2? > > The obvious reason is that nobody has offered to provide a backend > implementing DB2 support, and it hasn't been required by

Re: Dealing with DB2

2007-05-02 Thread Russell Keith-Magee
On 5/2/07, mo <[EMAIL PROTECTED]> wrote: > > Thanks Russ, > > So do you think that it's got no problem for using in production use, > except for losing some features? Well, this is not a guarantee, I haven't tried it myself, and if it does break you get to keep all the little pieces; but in the

Re: tests in separate project directory

2007-05-02 Thread Russell Keith-Magee
On 5/2/07, SanPy <[EMAIL PROTECTED]> wrote: > > I have some unit tests that are not directly app / model related. I > want to put those tests in a separate directory in my svn trunk (e.g. > myprojects/project1/trunk/project, myprojects/project1/trunk/tests). > How can I make these tests run

Re: Dealing with DB2

2007-05-02 Thread mo
Thanks Russ, So do you think that it's got no problem for using in production use, except for losing some features? Thanks again, Mo Babaei On May 2, 1:46 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 5/2/07, mo <[EMAIL PROTECTED]> wrote: > > > > > Thanks, > > I'll check it out, >

Re: Dealing with DB2

2007-05-02 Thread Russell Keith-Magee
On 5/2/07, mo <[EMAIL PROTECTED]> wrote: > > Thanks, > I'll check it out, > Is it possible to use DB2 in a Django application, whit out using > Django database models? Sure - you can still use the URL dispatching, view building, templating systems etc without having access to a database backend.

Re: Dealing with DB2

2007-05-02 Thread mo
Thanks, I'll check it out, Is it possible to use DB2 in a Django application, whit out using Django database models? Regards, Mo Babaei Russell Keith-Magee wrote: > On 5/2/07, mo <[EMAIL PROTECTED]> wrote: > > > > Hi, > > I'm new to Django... > > Is there any special reason that Django does not

Re: django i18n and google bots

2007-05-02 Thread Phil
I have indeed access to my logs, I'll check that and let you know. Many thanks Malcolm. On May 2, 10:32 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Wed, 2007-05-02 at 08:16 +, Phil wrote: > > Guys, > > > I use the i18n framework of django to offer my site content in two > >

Re: django i18n and google bots

2007-05-02 Thread Malcolm Tredinnick
On Wed, 2007-05-02 at 08:16 +, Phil wrote: > Guys, > > I use the i18n framework of django to offer my site content in two > language: French and English. As the language preference is kept in a > cookie, all the URLs of my site are therefore language agnostic. All > is working fine. > >

django i18n and google bots

2007-05-02 Thread Phil
Guys, I use the i18n framework of django to offer my site content in two language: French and English. As the language preference is kept in a cookie, all the URLs of my site are therefore language agnostic. All is working fine. But, when the googlebots hits my site, they only hit the French-

tests in separate project directory

2007-05-02 Thread SanPy
I have some unit tests that are not directly app / model related. I want to put those tests in a separate directory in my svn trunk (e.g. myprojects/project1/trunk/project, myprojects/project1/trunk/tests). How can I make these tests run through the django test runner (i.e. when executing 'python

Re: Dealing with DB2

2007-05-02 Thread Russell Keith-Magee
On 5/2/07, mo <[EMAIL PROTECTED]> wrote: > > Hi, > I'm new to Django... > Is there any special reason that Django does not support DB2? The obvious reason is that nobody has offered to provide a backend implementing DB2 support, and it hasn't been required by the core developers. There may be

Dealing with DB2

2007-05-02 Thread mo
Hi, I'm new to Django... Is there any special reason that Django does not support DB2? Thanks, Mo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to