form_for_model and hidden foreign key?

2007-02-21 Thread dballanc
Please forgive me if this is a stupid question, but I haven't been able to find a good answer searching! Doesn't help that I'm only a few weeks acquainted with both both Django and Python. I'm definitely liking it so far. Anyway, I've got a custom user model with several required foreign keys.

Re: my problem from HELL: Pleas help me out on this

2007-02-21 Thread Jay Parlar
On 2/21/07, enquest <[EMAIL PROTECTED]> wrote: > > I have two models for testing purpose... I realy need to solve this > problem. If not I will have to stop using Django what would be a pitty. > But I can't spend an other day searching This problem occurs on a > Debian apache2 server (fresh in

Re: my problem from HELL: Pleas help me out on this

2007-02-21 Thread James Bennett
On 2/21/07, enquest <[EMAIL PROTECTED]> wrote: > It seems as soon I import "from bar.models import Test" do then this > class will not show up in the the ADMIN. I restarted apache 100 time, > changed the code 100 times to figure out. Tryied everthing. But as soon > as I do an "import Test" for exa

MultiWidget subclass not calling compress

2007-02-21 Thread Justin Findlay
I have a simple MultiValueField and MultiWidget (that I modified from this example http://groups.google.com/group/django-users/browse_thread/thread/9b64e524dcf9d279/1e1144d1d7d69bb9). from django import newforms as forms class ContactWidget(forms.MultiWidget): def __init__(self,attrs=None,c

my problem from HELL: Pleas help me out on this

2007-02-21 Thread enquest
I have two models for testing purpose... I realy need to solve this problem. If not I will have to stop using Django what would be a pitty. But I can't spend an other day searching This problem occurs on a Debian apache2 server (fresh install) model 1 from django.db import models from bar.mod

Re: Postgre and mysql

2007-02-21 Thread Kenneth Gonsalves
On 21-Feb-07, at 11:51 PM, James Bennett wrote: > consumer-level hosting plans, and tends to have more "friendly" > administration features (e.g., web-based control panels for managing a > database). for those who *must* go the gui/web way there is pgadmin and phgpgadmin -- regards kg http:/

Re: Question about queries

2007-02-21 Thread SmileyChris
Hi Josh, Try: prev = album.photo_set.filter(id__lt=).order_by('-id')[: 1] --~--~-~--~~~---~--~~ 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 T

Changing Default Type For OneToOneField

2007-02-21 Thread [EMAIL PROTECTED]
Hi, I'm just learning Django, so I apologize in advance for what may be a remedial question, but here goes: I created two models. In the first, I defined the Primary Key to be a 60 character CharField into which I'm putting a UUID (uuid.uuid4(), to be specific). In the second model, I created

Question about queries

2007-02-21 Thread [EMAIL PROTECTED]
I've been struggling with a problem recently and since I'm not a programmer, I feel like I'm beating my head against a wall. I have a Django app that will act as a photo gallery for photos I've taken over the years and I've organized those photos into albums. I have a page that lists all the pic

mod_python and static methods

2007-02-21 Thread Rory Campbell-Lange
We've been caught out with an obvious problem on our Django app -- a calculation module uses static methods and instead of these being used per-invocation (of the calculation module) they are shared generally until apache is restarted. I'd be grateful for any suggestions on how to work around thi

Re: error in SQL syntax for allow_empty=True in list_detail.py

2007-02-21 Thread abe
thanks, that patch solved it. -abe On Feb 21, 4:52 pm, Michael Radziej <[EMAIL PROTECTED]> wrote: > abe: > > > > > I'm trying to call object_list in > > > django/views/generic/list_detail.py > > > with allow_empty=True > > > but if I use {{object_list.count}} in a template I get the following >

Created pluggable board and wiki applications

2007-02-21 Thread kahless
Hi, Since i haven't found any existing board / wiki applications which would fit my needs and are easy enough to integrate into a custom django project, i have created my own .. i tried to stick to the http://code.djangoproject.com/wiki/DosAndDontsForApplicationWriters as much as possible.. and

Question about queries

2007-02-21 Thread [EMAIL PROTECTED]
I've been struggling with a problem recently and since I'm not a programmer, I feel like I'm beating my head against a wall. I have a Django app that will act as a photo gallery for photos I've taken over the years and I've organized those photos into albums. I have a page that lists all the pic

newforms question: select widget

2007-02-21 Thread [EMAIL PROTECTED]
I just want to render a formfield as a select field without having to create a Form class. Why does this not work? from django import newforms as forms ConfForm = forms.models.form_for_model(Conference) form = ConfForm() choices = ( ('Monday','Monday',), ('Tuesday','Tuesday',), ('Wed

Re: Newforms: Setting field width?

2007-02-21 Thread aaloy
You can specify the with using css styles. As on rendering you know the form field id, you can create a css style for that id. 2007/2/21, ScottB <[EMAIL PROTECTED]>: > > > All my form elements on a newforms form are rather tiny. Is there any > > way to specify the width of these fields? -- Ant

Re: Postgre and mysql

2007-02-21 Thread James Bennett
On 2/21/07, Grupo Django <[EMAIL PROTECTED]> wrote: > Hello, I want to know which of these two databases are prefered by > django. I can choose and I'd like to know if there is some differences > in performance or integration (like foreign keys). > If someone knows a comparative between both of th

Re: podcast-feed

2007-02-21 Thread patrick k.
thanks. that´s exactly what I was looking for. patrick. Am 20.02.2007 um 21:06 schrieb [EMAIL PROTECTED]: > > I did it, but not using the syndication. I just use a generic list > view and point to a template to build the xml. Not hard at all. Here's > my template: > > > http://www.itun

Re: error in SQL syntax for allow_empty=True in list_detail.py

2007-02-21 Thread Michael Radziej
abe: > I'm trying to call object_list in > > django/views/generic/list_detail.py > > with allow_empty=True > > but if I use {{object_list.count}} in a template I get the following > error: > > > (1064, "You have an error in your SQL syntax; check the manual that > corresponds to your MySQL s

error in SQL syntax for allow_empty=True in list_detail.py

2007-02-21 Thread abe
I'm trying to call object_list in django/views/generic/list_detail.py with allow_empty=True but if I use {{object_list.count}} in a template I get the following error: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right s

generic views & limit_choices_to

2007-02-21 Thread Antonio
hi all, I'm trying to use django generic views for my models ... the problem is that I don't find the method to update a ForeingKey() field in a form: class Conferma(models.Model): fk_prev = models.ForeignKey(Previsione, verbose_name="previsione", limit_choices_to=(models

RESOLVED Re: Yet another ManyToMany with "Self" question ...

2007-02-21 Thread ZebZiggle
Yup, adding "symmetric = False" to the model field fixed it. Cheers, Sandy --~--~-~--~~~---~--~~ 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: Postgre and mysql

2007-02-21 Thread Kenneth Gonsalves
On 21-Feb-07, at 8:06 PM, Grupo Django wrote: > Hello, I want to know which of these two databases are prefered by > django. I can choose and I'd like to know if there is some differences > in performance or integration (like foreign keys). in brief, postgres tries to be standards compliant - s

Re: Yet another ManyToMany with "Self" question ...

2007-02-21 Thread ZebZiggle
More on this ... it seems that django adds two entries to the join table. Doing: manager.subordinates.add(employee) added two entries: id = 7 from = 1to = 2 id = 8 from = 2to = 1 Is this the correct behavior? I would assume only one relationship should be added (from = 1 to = 2) H

Re: Yet another ManyToMany with "Self" question ...

2007-02-21 Thread ZebZiggle
Anyone? --~--~-~--~~~---~--~~ 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 PROTECTED] For mo

Seeking best-practices: modular site hosting multiple URLs

2007-02-21 Thread Sundial Services
I would like to find references to "best practices" regarding the design of a major site with these characteristics: (1) The site will support multiple URLs, which appear visually to be entirely separate sites but which will share much of the same implementation. The "site" module obviously pro

Re: Postgre and mysql

2007-02-21 Thread Tim Chase
> Hello, I want to know which of these two databases are prefered by > django. I can choose and I'd like to know if there is some differences > in performance or integration (like foreign keys). http://www.djangoproject.com/documentation/faq/#what-are-django-s-prerequisites "PostgreSQL is recomm

Re: Postgre and mysql

2007-02-21 Thread Sundial Services
The essential differences to consider are (1) transactional support, and (2) data-types and SQL support. Both systems can be expected to deliver comparable performance under ordinary loads. On Feb 21, 9:36 am, "Grupo Django" <[EMAIL PROTECTED]> wrote: > Hello, I want to know which of these two d

Re: Looking for competent Django Developer mod of Existing Client Database package

2007-02-21 Thread Sundial Services
>From your description, I conclude that your application must be "generally, in good shape, running okay, and so on." That now you simply want it to be extended. Fortunately for you, the Django framework makes this a very straightforward process. (The fact that one Django installation is now su

Postgre and mysql

2007-02-21 Thread Grupo Django
Hello, I want to know which of these two databases are prefered by django. I can choose and I'd like to know if there is some differences in performance or integration (like foreign keys). If someone knows a comparative between both of them it would be good, not only about django integration but a

Re: Pro Django: Web Development Done Right

2007-02-21 Thread Trey Darley
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Boy, I sure wish I could buy the book already! - --Trey Russell Keith-Magee wrote: > On 2/21/07, Jaroslaw Zabiello <[EMAIL PROTECTED]> wrote: >> I have just found "Pro Django: Web Development Done Right" book in >> Amazon. Is it related with DjangoB

Re: Pro Django: Web Development Done Right

2007-02-21 Thread Russell Keith-Magee
On 2/21/07, Jaroslaw Zabiello <[EMAIL PROTECTED]> wrote: > > I have just found "Pro Django: Web Development Done Right" book in > Amazon. Is it related with DjangoBook or it is another, different book? They are one and the same book. The draft chapters are being published online for comment to ma

Re: Captcha example

2007-02-21 Thread Mike
Hi Joe, Thanks for taking the time to respond--that makes sense to me. I had to go all the way to Poland but finally found a working code example (Dziękuję!). Here's the link in case it's helpful for someone else: http://www.rkblog.rk.edu.pl/w/p/django-and-captcha-images/ --~--~-~--~

Re: Newforms: Setting field width?

2007-02-21 Thread ScottB
> All my form elements on a newforms form are rather tiny. Is there any > way to specify the width of these fields? By default no length is specified for inputs, so they will be whatever size the browser defaults to. It's not the prettiest, but if you specify the widget to use, you can set attri

Pro Django: Web Development Done Right

2007-02-21 Thread Jaroslaw Zabiello
I have just found "Pro Django: Web Development Done Right" book in Amazon. Is it related with DjangoBook or it is another, different book? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To pos

Pro Django: Web Development Done Right

2007-02-21 Thread Jaroslaw Zabiello
I have just found "Pro Django: Web Development Done Right" book in Amazon. Is it related with DjangoBook or it is another, different book? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To pos

ImageField and adding username to the path

2007-02-21 Thread Benedict Verheyen
Hi, in my application, i want to enable the users to upload pics. These pictures are thus linked to the user. I want to reflect that on a filesystem bases by saving the pics in a directory that also has the authenticated user. Getting the authenticated user isn't a problem, customizing the path

cant get date js thingie using form_for_model

2007-02-21 Thread Kenneth Gonsalves
hi i was using form_for_model and it worked great - only thing, I didnt get the fancy date entry js thingie like in admin. What do I need to do to get that? -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ Yo