Re: Circular dependencies problem

2007-11-13 Thread Thomas Guettler
Am Dienstag, 13. November 2007 09:08 schrieb Thomas Guettler: > Am Dienstag, 13. November 2007 03:35 schrieb [EMAIL PROTECTED]: > > Hello, > > > > i'm new to django so excuse if this is a really stupid question. > > > > I have these three apps with are inter dependable, how can I make this > >

Re: Circular dependencies problem

2007-11-13 Thread Thomas Guettler
Am Dienstag, 13. November 2007 03:35 schrieb [EMAIL PROTECTED]: > Hello, > > i'm new to django so excuse if this is a really stupid question. > > I have these three apps with are inter dependable, how can I make this > work in Django maintaining all of this modules separate. Do you really need

max_length / Upgrade error in tutorial part 1 (polls)

2007-11-13 Thread matimba
I am stepping through Dajngo Tutorial (Part 1, to create polls application) and get this error. Unexpected keyword argument 'max length' when running "manage syncdb" If I change it to "maxlength" it works: I did see note in tutorial regarding old version and I was using an earlier version

Re: max_length / Upgrade error in tutorial part 1 (polls)

2007-11-13 Thread Matt McClanahan
On Nov 13, 12:38 am, [EMAIL PROTECTED] wrote: > I am stepping through Dajngo Tutorial (Part 1, to create polls > application) and get this error. > > Unexpected keyword argument 'max length' when running "manage syncdb" > > If I change it to "maxlength" it works: This is the proper solution when

Re: CSS problem

2007-11-13 Thread David
Thank you Lazlo, today your my hero! David --~--~-~--~~~---~--~~ 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: Verticity

2007-11-13 Thread [EMAIL PROTECTED]
http://www.verticity.com On Nov 13, 2:26 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Verticity is currently hiring software enginers and programmers > specialy dot net developers in thier regional office Karachi. > little about verticity inc: > > VertiCity was founded on the premise

Re: max_length / Upgrade error in tutorial part 1 (polls)

2007-11-13 Thread matimba
Thanks for clarifying that Matt - I thought I was going crazy. On Nov 13, 11:01 am, Matt McClanahan <[EMAIL PROTECTED]> wrote: > On Nov 13, 12:38 am, [EMAIL PROTECTED] wrote: > > > I am stepping through Dajngo Tutorial (Part 1, to create polls > > application) and get this error. > > >

Verticity

2007-11-13 Thread [EMAIL PROTECTED]
Verticity is currently hiring software enginers and programmers specialy dot net developers in thier regional office Karachi. little about verticity inc: VertiCity was founded on the premise that through the medium of the internet geographic barriers could be broken down and a truly global city,

[i18n] Questions on how it works...

2007-11-13 Thread Nicolas Steinmetz
Hello, I read the i18n documentation but I'm not really at ease with it. If I understood well : * To translate models, I need to use gettext_lazy or ugettext_lazy * In template : ** I need to set {% load i18n %} at the top of my template (should it be only in base.html or to any template part

Re: Circular dependencies problem

2007-11-13 Thread [EMAIL PROTECTED]
But then this N:M field would only be used some times... it doesn't seam as a good way to do this. I could always create a big app with all the models but I would like to be able have apps for each main class so my views.py is cleanly separated. Any more ideas? please. Regards, Luís On Nov

Re: Circular dependencies problem

2007-11-13 Thread Thomas Guettler
Am Dienstag, 13. November 2007 12:00 schrieb [EMAIL PROTECTED]: > But then this N:M field would only be used some times... it doesn't > seam as a good way to do this. > > I could always create a big app with all the models but I would like > to be able have apps for each main class so my views.py

Re: ImportError: No module named mysql.base

2007-11-13 Thread Karen Tracey
That ticket you found suggests the real problem is not a missing mysqldb, but a too-old version. I know nothing of CentOS or yum -- is it possible there is a more uplevel package available for you to install? That would be the easiest solution. If not, you could download/build/install mysqldb

Re: learning django and python

2007-11-13 Thread sebey
is that a joke or for real? sorry don't get it On Nov 13, 1:47 am, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On 12-Nov-07, at 9:02 PM, sebey wrote: > > > good thanks for can I learn python with django > > while learningdjango(): > python.learn() > sql.learn() > > -- > >

Re: learning django and python

2007-11-13 Thread sebey
is that a joke or for real? sorry don't get it On Nov 13, 1:47 am, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On 12-Nov-07, at 9:02 PM, sebey wrote: > > > good thanks for can I learn python with django > > while learningdjango(): > python.learn() > sql.learn() > > -- > >

Re: learning django and python

2007-11-13 Thread Kenneth Gonsalves
On 13-Nov-07, at 6:04 PM, sebey wrote: > is that a joke or for real? sorry don't get it for real - you cant learn python or sql through django - so make a systematic plan of learning the two *while* you are learning django. Meaning that, dont first go and learn python and *then* learn

Time zone problem

2007-11-13 Thread Robert
Hi, In my settings.py I have TIME_ZONE set to 'Europe/Warsaw'. When printing the settings.TIME_ZONE and os.environ['TZ'] in my views.py I am getting strange results. TIME_ZONE always returns 'Europe/Warsaw', but os.environ['TZ'] returns one of 'Europe/Warsaw' and 'America/Chicago'. It's not

Re: Django authentification application with openid using django auth contrib

2007-11-13 Thread Benoit Chesneau
Version 0.2 : - include new patch for django_openid 2.0 - clean code. New username_control decorator - fix yadis import - urls localization You could downlad it here : http://django-authopenid.googlecode.com/files/django_authopenid-0.2.tar.gz Documentation :

binding data with imageupload in newforms

2007-11-13 Thread Kenneth Gonsalves
hi, I have a form to edit some data which is spread over two models. In this case, I have to retrieve the existing data from the models, bind that to the form and open the form. One of the fields happens to be an image field. The newforms documentations says this: file_data = {'mugshot':

Re: learning django and python

2007-11-13 Thread Kenneth Gonsalves
On 13-Nov-07, at 6:55 PM, sebey wrote: > has anyone tryed this I guess you have ken but is a good and quick way > to learn django and python and sql (mysql is it or again silly?) this > is really intersting I loved to learn more for me - while learning django, I always had Python in a

Re: How much memory does a django instance need was Does Hostmonster support Django?

2007-11-13 Thread Forest Bond
Hi, On Tue, Nov 13, 2007 at 07:41:17AM +0530, Kenneth Gonsalves wrote: > On 12-Nov-07, at 6:25 PM, Forest Bond wrote: > > Maybe you need to decrease your ServerLimit? Each forked server process > > leads to increased memory usage. For a really low volume site, you can get > > away with

No need for FileField

2007-11-13 Thread Thomas Guettler
Hi, I have model Object and I want to store 0..N files for each. To keep the files together the files should be saved under a directory like this: .../objects/ID/ FileField does not support this. Now I found a simple solution, that I want to share. The solution is simple: I don't need

Re: How much memory does a django instance need was Does Hostmonster support Django?

2007-11-13 Thread Kenneth Gonsalves
On 13-Nov-07, at 7:10 PM, Forest Bond wrote: > I guess maybe you could try to reduce your imports. heavy use of PIL and reportlab is there even though there are at the most three users at a time. I remember running 4 sites on pre .91 django on zettai and keeping well within the 64 mb

Re: Circular dependencies problem

2007-11-13 Thread [EMAIL PROTECTED]
Ok, I will do like this. Thanks On Nov 13, 12:03 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote: > Am Dienstag, 13. November 2007 12:00 schrieb [EMAIL PROTECTED]: > > > But then this N:M field would only be used some times... it doesn't > > seam as a good way to do this. > > > I could always

How put admin in deployment

2007-11-13 Thread mamcxyz
In test mode, I can acces the "admin" site, but when I deploy the site I can't do it. Before, I setup another fastcgi process to it, but I think that is overkill (I must run this under a VPS). Any trick to put admin under the regular fastcgi process?

Re: How put admin in deployment

2007-11-13 Thread Dima Dogadaylo
On Tue, 2007-11-13 at 14:56 +, mamcxyz wrote: > In test mode, I can acces the "admin" site, but when I deploy the site > I can't do it. > > Before, I setup another fastcgi process to it, but I think that is > overkill (I must run this under a VPS). Any trick to put admin under > the regular

Re: learning django and python

2007-11-13 Thread sebey
well I have a book on php,apache and mysql so are there? any differences between mysql and postgreSQL for django (proforanmce features etc.) On Nov 13, 1:36 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On 13-Nov-07, at 6:55 PM, sebey wrote: > > > has anyone tryed this I guess you have ken

Re: learning django and python

2007-11-13 Thread Tim Chase
> well I have a book on php,apache and mysql so are there? any > differences between mysql and postgreSQL for django > (proforanmce features etc.) They're becoming closer in terms of their features. A couple observations in my experience: - MySQL tends to be faster and have some nice "my

Re: Dynamic ImageField

2007-11-13 Thread Peter
Thanks for posting the example links. Is there any documentation on "save_file" and what each field actually is for this method? I was using some random numbers in the folder creation and wanted to make sure the folders exist before I save the file. Also, is there a big reason to override this

Re: XMLField validation within a model

2007-11-13 Thread jim
OK.. i got the first part.. NULL and '' are different from the db perspective: sqlite> CREATE TABLE t2( a TEXT NOT NULL); sqlite> insert into t2 values(''); sqlite> select * from t2; sqlite> insert into t2 values('ttt'); sqlite> select * from t2; ttt sqlite> insert into t2 values(NULL); SQL

Re: XMLField validation within a model

2007-11-13 Thread James Bennett
On 11/12/07, jim <[EMAIL PROTECTED]> wrote: > 2. Do I need to call the validation explicitly? Validation will be done automatically by forms generated from this model (e.g., the admin). It will not be done automatically by a raw save() of an object (since save() assumes you've validated the data

Re: Dynamic ImageField

2007-11-13 Thread Marty Alchin
On Nov 13, 2007 11:03 AM, Peter <[EMAIL PROTECTED]> wrote: > Also, is there a big reason to override this vs the _save_FIELD_file > method as shown in this example: > http://gulopine.gamemusic.org/2007/11/customizing-filenames-without-patching.html I'll admit, that post was thrown together in a

Re: Dynamic ImageField

2007-11-13 Thread Peter
No worries, I'm just trying to make sense of all the options. : ) Nonetheless, is there any documentation on what I can get out of each field in the save_file method, or examples of how I can access the filename and directory where the file is being saved within this method? Marcin's first

Missing Documentation cross-reference to shortcuts ?

2007-11-13 Thread glopglop
A lookup on google shows that the page http://www.djangoproject.com/documentation/shortcuts/ isn't linked from anywhere on the documentation (and the site), and I had to search it to find it. (see

Re: Announcing Django Evolution!

2007-11-13 Thread SmileyChris
On Nov 13, 8:08 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > Announcing Django Evolution! > > > http://code.google.com/p/django-evolution/ Good job, Russ and Ben! The project gets the smiley seal of approval :)

Re: learning django and python

2007-11-13 Thread cjl
Sebey: You may want to check out a tutorial I am working on: http://www.instantdjango.com It provides a 'newbie-friendly' introduction to Django, even if you're not familiar with Python yet. I haven't finished the second chapter yet, but I think the first chapter will help get you started, or

Re: Missing Documentation cross-reference to shortcuts ?

2007-11-13 Thread jfine
glopglop wrote: > A lookup on google shows that the page > http://www.djangoproject.com/documentation/shortcuts/ > isn't linked from anywhere on the documentation (and the site), and I > had to search it to find it. > > (see >

Simple save() override not working

2007-11-13 Thread Mike Feldmeier
I know, I've seen a million posts about this, but they all seem to relate to m2m fields. While I do have an m2m field in the table (blog entry <-> tags), it's one of the simple fields I'm having trouble with. def save(self): > import datetime > if not self.publish_date and

Re: Simple save() override not working

2007-11-13 Thread Mike Feldmeier
I should clarify: it's not failing, it just doesn't seem to be calling the custom save method... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Missing Documentation cross-reference to shortcuts ?

2007-11-13 Thread James Bennett
On 11/13/07, jfine <[EMAIL PROTECTED]> wrote: > I've added this problem to that ticket. Please don't do that: we generally operate on a principle of one ticket per issue, and one issue per ticket. Piling a bunch of different things into one ticket just makes it impossible to sort them out and

Exposing Django to a Java Client

2007-11-13 Thread OliverMarchand
Dear Django Users, Some while ago in May Brian Corrigan mentioned the following solution to exposing Django to an outside application to me. On May 24, 12:32 pm, brian corrigan <[EMAIL PROTECTED]> wrote: > We have used Django along side Java applications by using Jython and > HTTP requests from

Re: learning django and python

2007-11-13 Thread Raisins
I love Instantd Django. I made installing and depolying django and python a breeze also I can move from my work to home every easy just by carrying around my thumbdrive. I highly suggest it to anyone on the fence about either Python or django. I haven't found an easier cleaner way to deploy them

Re: Announcing Django Evolution!

2007-11-13 Thread Nicolás Miyasato
On Nov 13, 4:08 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > Announcing Django Evolution! > > > http://code.google.com/p/django-evolution/ Good job! I hope the best for the project. -- Nicolás Miyasato

Re: [i18n] Questions on how it works...

2007-11-13 Thread Nicolas Steinmetz
Nicolas Steinmetz a écrit : > Any idea about this ? my fault, I forgot the locale middleware and I set a "conf/locale" structure within my app whereas it should be just "locale". This way, I do not need blocktrans any longer. So it's solved...

Ordering by related table problem

2007-11-13 Thread Scott SA
Hi, Okay, I've been having trouble getting this to work, though it _looks_ easy. My results have proven otherwise (django 0.96, by the way.. I'm modifying an esisting system, not creating a new one so don't have an upgrade option right now). For simplicity, heres a table overview Table_1

Re: Django profiler to find a project weak spots

2007-11-13 Thread lispingng
hey, i have been rather interested in the profiling of my django apps (i'm a not-very-newbie) will look at it and provide useful (i sincerely hope) feedback On Nov 12, 6:23 pm, Dima Dogadaylo <[EMAIL PROTECTED]> wrote: > Hi, > > I wrote a Django pofiler that can be used to find weak performance

Re: learning django and python

2007-11-13 Thread lispingng
sebey: a python overview you can go through in an hour or 2 is byteofpython. it's very short, and though u wont get everythng in it, it gives you a feel for what python is about. i lso find reading the django code can be very informative (after u have got some python under your belt) you can get

German django forum

2007-11-13 Thread Jan Meier
Hi, there is a new Forum for django help/support in german, if you speak german check it out: http://www.django-resource.de/ See you there, Jan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Feeds

2007-11-13 Thread Miguel Galves
Kenneth, I dont understand your question. What do you mean by "if you want a feed, you have to give one"... I'm trying to create one :-) On Nov 12, 2007 10:08 AM, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > > On 12-Nov-07, at 5:32 PM, Miguel Galves wrote: > > > I'm giving a feed to

Re: KeyError, Submit Empty Field and Form Validation

2007-11-13 Thread Gloria W
This was an excellent response, and helped me immediately. Thank you. ~G~ --~--~-~--~~~---~--~~ 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

Re: Ordering by foreign key, class Meta

2007-11-13 Thread Michael
Thanks Malcolm, this helped me on one problem I had. But, I've another similar problem but in my case, I've multiple foreign keys, so I'm not sure what to do about the database table name part. My models: class Member(models.Model): # first_name, last_name, etc. class Meta: ordering

Hybrid-django server leaving connections open...

2007-11-13 Thread John Penix
Hi, We've stuck a bit of ORM-using code from our "pure" django server into another server that was only using django templates. We have been seeing connections left open occasionally. I browsed the mailing list archives and it sounds like django should be closing the connection. I'm wondering

Adding QuerySets

2007-11-13 Thread Ronaldo Z. Afonso
Hi all, Is it possible to join two, or more, querySets? For example: q = q1 + q2 Being q the union of q1 and q2. Thanks. Ronaldo. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Using Django Template Engine

2007-11-13 Thread Malcolm Tredinnick
On Mon, 2007-11-12 at 23:04 -0800, Brot wrote: > Hello, > > I found a code example for "Using Markup" in the django wiki: > http://code.djangoproject.com/wiki/UsingMarkup > I need a similar solution, but with the internal django template > library. Is there any solution for this requirement? >

Re: 403 errors handler

2007-11-13 Thread Malcolm Tredinnick
On Mon, 2007-11-12 at 23:29 -0800, eXt wrote: > Hi! > >I'd like to know if there is any method to handle 403 errors and > display pretty error pages for them. > >I need to handle some errors raised by Admin (raised when a user > clicks an add symbol but doesn't have the permission to

Re: ImportError: No module named mysql.base

2007-11-13 Thread Josh
Thanks Karen. I was a little wary about compiling my own copy of mysqldb, but it appears as though that's my only option in this circumstance. It's amazing how many little things I'm used to Linux doing for me... doing all that by hand on CentOS wasn't nearly as fun as I remember it being :)

Re: Feeds

2007-11-13 Thread Kenneth Gonsalves
On 14-Nov-07, at 4:39 AM, Miguel Galves wrote: > I dont understand your question. What do you mean by > "if you want a feed, you have to give one"... if you want a feed, you have to give an absolute url -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/

Re: Ordering by foreign key, class Meta

2007-11-13 Thread Malcolm Tredinnick
On Wed, 2007-11-14 at 00:00 +, Michael wrote: > Thanks Malcolm, this helped me on one problem I had. But, I've > another similar problem but in my case, I've multiple foreign keys, so > I'm not sure what to do about the database table name part. > > My models: > class Member(models.Model):

Re: Hybrid-django server leaving connections open...

2007-11-13 Thread James Bennett
On 11/13/07, John Penix <[EMAIL PROTECTED]> wrote: > We've stuck a bit of ORM-using code from our "pure" django server into > another server that was only using django templates. We have been seeing > connections left open occasionally. I browsed the mailing list archives and > it sounds like

Re: Adding QuerySets

2007-11-13 Thread Malcolm Tredinnick
On Tue, 2007-11-13 at 22:23 -0200, Ronaldo Z. Afonso wrote: > Hi all, > > Is it possible to join two, or more, querySets? > For example: > > q = q1 + q2 > > Being q the union of q1 and q2. It's spelt "|", so q1|q2 is meant to work. It even does work sometimes, but not always (another one of

initial data ignored for Form with __init__

2007-11-13 Thread Ken
I'm using 0.96. I define the following form class TForm(forms.Form): admin = forms.ChoiceField() x = forms.IntegerField() def __init__(self, data=None, **kwargs): super(TForm, self).__init__(data, kwargs) admins = [(a.name, a.name) for a in Admin.objects.all()]

Re: initial data ignored for Form with __init__

2007-11-13 Thread Joseph Kocherhans
On 11/13/07, Ken <[EMAIL PROTECTED]> wrote: > > I'm using 0.96. I define the following form > > class TForm(forms.Form): > admin = forms.ChoiceField() > x = forms.IntegerField() > > def __init__(self, data=None, **kwargs): > super(TForm, self).__init__(data, kwargs) >

Accessing legacy DBs with table-less models

2007-11-13 Thread Tomek
Hi All, I am using "django_restapi" (http://code.google.com/p/django-rest- interface/) to quickly gain access in a RESTful way to some tables in a legacy database. I am only really interested in reading the records and sending them back in XML or JSON format. I don't need to create, update or

Re: Ordering by related table problem

2007-11-13 Thread Malcolm Tredinnick
On Tue, 2007-11-13 at 15:19 -0700, Scott SA wrote: > Hi, > > Okay, I've been having trouble getting this to work, though it _looks_ easy. > My results have proven otherwise (django 0.96, by the way.. I'm modifying an > esisting system, not creating a new one so don't have an upgrade option

Re: Accessing legacy DBs with table-less models

2007-11-13 Thread Tomek
Wow, what a quick reply! Thanks Malcolm. I'm pretty new to Django so excuse my inability to express myself in Django terms. I agree with your comments regarding taking the right approach to solving the problem (how very Pythonic of you :-) I tried django_restapi because it offered a quick

Re: Accessing legacy DBs with table-less models

2007-11-13 Thread Malcolm Tredinnick
On Wed, 2007-11-14 at 02:36 +, Tomek wrote: > Wow, what a quick reply! Thanks Malcolm. > > I'm pretty new to Django so excuse my inability to express myself in > Django terms. > > I agree with your comments regarding taking the right approach to > solving the problem (how very Pythonic of

Re: Accessing legacy DBs with table-less models

2007-11-13 Thread Tomek
Thanks for that. You just gave me a good idea. I could simply replace that crazy SQL code with an equivalent view! This way I don't have to write any nasty code to deal with old craziness. In the last 10 minutes I have looked again at django_restapi code and I have discovered an example for

Re: Accessing legacy DBs with table-less models

2007-11-13 Thread Tomek
Bugger, the view approach won't work as the SQL query takes parameters. On Nov 14, 3:59 pm, Tomek <[EMAIL PROTECTED]> wrote: > Thanks for that. You just gave me a good idea. I could simply replace > that crazy SQL code with an equivalent view! This way I don't have to > write any nasty code to

Re: Ordering by related table problem

2007-11-13 Thread Scott SA
On 11/14/07, Malcolm Tredinnick ([EMAIL PROTECTED]) wrote: >On Tue, 2007-11-13 at 15:19 -0700, Scott SA wrote: >> Hi, >> >> Okay, I've been having trouble getting this to work, though it _looks_ easy. >My results have proven otherwise (django 0.96, by the way.. I'm modifying an >esisting

Re: Hybrid-django server leaving connections open...

2007-11-13 Thread John
On Nov 13, 5:04 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 11/13/07, John Penix <[EMAIL PROTECTED]> wrote: > > > We've stuck a bit of ORM-using code from our "pure" django server into > > another server that was only using django templates. We have been seeing > > connections left

use the same database for different web sites

2007-11-13 Thread markandeya
Dear Django Friends, I started the tutorial in the Docs folder. So i had a mysite folder and inside that i had a polls subfolder. Everything works fine. Then i wanted to try the generic codes in a new folder, also a subfolder of mysite, called genpolls. I created the views, urls and models python

Re: use the same database for different web sites

2007-11-13 Thread Malcolm Tredinnick
On Tue, 2007-11-13 at 21:48 -0800, [EMAIL PROTECTED] wrote: > Dear Django Friends, > I started the tutorial in the Docs folder. So i had a mysite folder > and inside that i had a polls subfolder. Everything works fine. Then i > wanted to try the generic codes in a new folder, also a subfolder of

Re: Verticity

2007-11-13 Thread jhon.bowl
On Nov 13, 2:33 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > http://www.verticity.com > > On Nov 13, 2:26 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > > > Verticity is currently hiring software enginers and programmers > > specialy dot net developers in thier regional