Re: Admin dies when foreign key added

2006-05-30 Thread char
As described in ticket #1839, the solution for me at any rate was to make sure I didn't have any field names with the same name as a model class name (disregarding case). So in your code, rename agent to something else, like listingAgent. fyl wrote: > I am getting an error in admin when trying

Re: order_by in different tables

2006-05-30 Thread olive
None of the documented method works for me: The only way I found to make it works (affter having suffered a lot) is: MyRelatedModel.objects.all().extra( select={'my_field': 'SELECT my_field FROM myapplication_mymodel WHERE myapplication_mymodel.id = myapplication_myrelatedmodel.mymodel

Re: Admin dies when foreign key added

2006-05-30 Thread char
Not exactly the same symptom but the exact same exception is described in ticket #1839. fyl wrote: > I am getting an error in admin when trying to do an add. The error is > mentioned in bugs but not related to the condition I have. It is 'bool' > object has no attribute 'get' in get_manipulator

how to use instance method in the validator_list of a field in model?

2006-05-30 Thread favo
somebody know how to use instance method in the validator_list of a field in model? I can't get the "self". class Category(models.Model): """ Inhert Category """ title_en = models.CharField(maxlength=256, null=True) parent = models.ForeignKey('self', related_name="direct_children",

Re: Admin dies when foreign key added

2006-05-30 Thread char
I'm having the exact same problem. No solution yet though. --~--~-~--~~~---~--~~ 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 fro

Re: Apache, mod_python and Windows - problems inside

2006-05-30 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > The mod_python 3.28, Apache 2.2.* is not yet supported, you had better > use Apache 2.0.* with mod_python 3.28 Yeah, I was going through the mod_python mailing archives as suggested and I saw something about that. Thanks for the post though. I'll give it a shot to

Re: Apache, mod_python and Windows - problems inside

2006-05-30 Thread [EMAIL PROTECTED]
The mod_python 3.28, Apache 2.2.* is not yet supported, you had better use Apache 2.0.* with mod_python 3.28 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Why is sqlall outputting INTEGER instead of SERIAL?

2006-05-30 Thread Adrian Holovaty
On 5/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > When I use "syncdb" the primary keys of my tables are of type SERIAL, > but when I do a "sqlall" or "sql" or "sqlreset", I get INTEGER instead. > Why the discrepancy? > I'm using Postgres. This is a Postgres feature. "serial" isn't actual

Re: Wiki or Blogs done with django

2006-05-30 Thread Adrian Holovaty
On 5/29/06, Bryan Murdock <[EMAIL PROTECTED]> wrote: > The code for the djangoproject.com blog is open source: > > http://code.djangoproject.com/browser/djangoproject.com > > Looks like it hasn't been ported to magic removal either. :-( As of today, it has indeed been ported to magic-removal. A

Re: Apache, mod_python and Windows - problems inside

2006-05-30 Thread Ian Holsman
have you tried searching the mod-python archives? http://modpython.org/pipermail/mod_python/ it sounds like a mod-python specific issue, so you are probably get a better response over there. regards Ian On 31/05/2006, at 8:59 AM, [EMAIL PROTECTED] wrote: > > Well the solution I was able to

Re: Django and daemon?

2006-05-30 Thread Russell Blau
"spacedman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Wouldn't it be better to setup 'procmail' to process incoming emails as > they arrive. Then your procmail script could update the database. Ahh, thanks, it always helps to take the blinders off. The only downside is th

Re: Apache, mod_python and Windows - problems inside

2006-05-30 Thread [EMAIL PROTECTED]
Well the solution I was able to find said that I needed to copy mscoree.dll over to my apache\bin directory, that didn't work. I've tried it in the modules directory, that didn't work I'm really at a loss --~--~-~--~~~---~--~~ You received this message because y

Re: Wiki or Blogs done with django

2006-05-30 Thread Paulo
This list rocks! Thank you all for providing your code for us to take a look at. I've finally gotten Django working on my Powerbook and CentOS box and am in the process of writing a portfolio/blog app to get more acquainted with how the framework works. Being able to see how others approach thing

Re: html input tag width corresponding to CharFields always fixed

2006-05-30 Thread JHeasly
Is there a way to fold this into a model that uses only generic views (i.e., without getting into custom manipulators)? And if so, an example would be humongously appreciated! John H. --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

Re: Advice on meta applications

2006-05-30 Thread Ian Holsman
are you planning on open sourcing this? if so I'd be glad to help as I have a similar app for a client. On 31/05/2006, at 6:53 AM, Scott Finnie wrote: > > Looking for some advice on how to handle my little problem, all help > gratefully appreciated. > > Apologies it's quite long. > > Story thus:

Re: Wiki or Blogs done with django

2006-05-30 Thread Ian Holsman
would it make sense for you 4-5 blog writers to join up together and write up a common blog app? it seems like such a waste of resources for all of you. On 31/05/2006, at 6:40 AM, wam wrote: > > I've recently been updating my site to be entirely django powered. As > others have done, I applied

Re: users editing only their own info

2006-05-30 Thread spacedman
Ground up would be my way of doing it. Lets break it down... You need an 'update' view that only shows the fields you want changing. That means a custom manipulator that only mentions the fields you want to modify. Protect this view by making sure the logged-in user is the user mentioned in the U

Re: Django and daemon?

2006-05-30 Thread spacedman
Wouldn't it be better to setup 'procmail' to process incoming emails as they arrive. Then your procmail script could update the database. As long as you are using a decent database server (*cough*POSTGRES*cough*) then concurrency shouldnt be a problem. --~--~-~--~~~--

Django and daemon?

2006-05-30 Thread Russell Blau
I'm kind of a newbie at this (web applications, that is, not Python programming), so I'd appreciate any advice others can offer. I'm developing a Django app (post-M-R) that will communicate by email with some remote hosts (which are running archaic software that can't easily be updated to use som

Re: prepopulate_from

2006-05-30 Thread Samuel Wright
Hi All If one uses mysite/article/slug as a url, then duplicate slugs would be a problem. Ok, for most sites mysite/article/month/day/slug fixes the problem, but only up to a point. would you go down the /mysite/article/234/slug route? Any suggestions? Cheers On 26/01/06, Adrian Holovaty <[EMA

Re: Apache, mod_python and Windows - problems inside

2006-05-30 Thread Ian Holsman
I'm guessing it can't find one of the DLL's it requires to load. OR you haven't got the loadmodule line correct. On 31/05/2006, at 6:52 AM, [EMAIL PROTECTED] wrote: > > I've read the documentation on the django site, I've searched google > and I've tried the one solution that I managed to find,

users editing only their own info

2006-05-30 Thread tsnyder
Hi Everyone, I'm looking for some ideas here. I need to set up a site where we initially enter the names, contact info, and other information about people in our organization. After we get this entered, we would like each person to be able to log on and edit their own contact information, or

Re: No Model Inheritance in Magic-Removal?

2006-05-30 Thread gabor
James Bennett wrote: > On 5/30/06, Russell Blau <[EMAIL PROTECTED]> wrote: >> "it'll work for now..." BUT, as has been discussed here over the past few >> weeks, it is not guaranteed to work for the future -- there is a warning in >> the new docs *not* to use OneToOneField because it's expected to

Advice on meta applications

2006-05-30 Thread Scott Finnie
Looking for some advice on how to handle my little problem, all help gratefully appreciated. Apologies it's quite long. Story thus: I need to build an application for holding a simple inventory of components in the IT estate: servers, applications, network switches, etc. They all have a cor

Apache, mod_python and Windows - problems inside

2006-05-30 Thread [EMAIL PROTECTED]
I've read the documentation on the django site, I've searched google and I've tried the one solution that I managed to find, but it's just not working. Perhaps you guys could help me out (once again)... Apache 2.2.2, mod_python 3.28 for Python 2.4 and (obviously) Python 2.4 on Windows XP SP2. T

Re: Wiki or Blogs done with django

2006-05-30 Thread wam
I've recently been updating my site to be entirely django powered. As others have done, I applied the 'Fixing the Magic' document to Ross Poulton's blog tutorial and have applied some of my own tweaks as well. So far I am fairly happy with the result. Source code is at https://svn.wamber.net/proje

Why is sqlall outputting INTEGER instead of SERIAL?

2006-05-30 Thread [EMAIL PROTECTED]
When I use "syncdb" the primary keys of my tables are of type SERIAL, but when I do a "sqlall" or "sql" or "sqlreset", I get INTEGER instead. Why the discrepancy? I'm using Postgres. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: No Model Inheritance in Magic-Removal?

2006-05-30 Thread [EMAIL PROTECTED]
Well, I just switched back to a two-day-old backup. I'm an OO guy at heart and I really can't bring myself to replace inheritance with one-to-one relations or delegates or copy/paste. *sigh* - I'll just have to do it all again when there's a stable release >= 0.95 which supports inheritance. It'

Re: No Model Inheritance in Magic-Removal?

2006-05-30 Thread James Bennett
On 5/30/06, Russell Blau <[EMAIL PROTECTED]> wrote: > "it'll work for now..." BUT, as has been discussed here over the past few > weeks, it is not guaranteed to work for the future -- there is a warning in > the new docs *not* to use OneToOneField because it's expected to change > soon. That warn

Re: No Model Inheritance in Magic-Removal?

2006-05-30 Thread Russell Blau
"James Bennett" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > On 5/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Now that I knew what I was looking for, I found a note in this page: > > http://code.djangoproject.com/wiki/WikiStart : "[...] so if you need > > model subcl

Re: Controlling Display of Foreign Key Input Fieldsets in Admin

2006-05-30 Thread Paul Childs
Forgot to mention I am using Django 0.91 --~--~-~--~~~---~--~~ 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

Re: No Model Inheritance in Magic-Removal?

2006-05-30 Thread Don Arbow
On May 30, 2006, at 10:35 AM, Mark Striebeck wrote: > what has been discussed for two months? that model inheritance will > not > longer be supported? or that there is a alternate way to support the > concept? What was discussed is that model inheritance is not yet ready for prime time. Som

Re: No Model Inheritance in Magic-Removal?

2006-05-30 Thread James Bennett
On 5/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Now that I knew what I was looking for, I found a note in this page: > http://code.djangoproject.com/wiki/WikiStart : "[...] so if you need > model subclassing stick to one of the older stable releases". "or use workarounds like one-to-on

Re: No Model Inheritance in Magic-Removal?

2006-05-30 Thread [EMAIL PROTECTED]
> it has been discussed here for two months And what good is THAT supposed to do? As opposed to, e.g., maybe including this in the list of backwards-incompatible incompatible changes http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges or on the http://code.djangoproject.com/wiki/Remo

Re: Dynamic template extension

2006-05-30 Thread Ivan Sagalaev
tomass wrote: >I don't seem to be able to do {% extends "base_{{ reseller }}_.html" %} >for instance. > > You can use the variable here like this: {% extends some_var %} But without anything fancy like concatenations. You should hence set some_var to a full template name before it gets i

Re: No Model Inheritance in Magic-Removal?

2006-05-30 Thread Mark Striebeck
what has been discussed for two months? that model inheritance will not longer be supported? or that there is a alternate way to support the concept? (i just subscribed to this list a few days ago but have the same issue as daniel)     MarkS Douglas Campos wrote: it has been discussed her

Re: No Model Inheritance in Magic-Removal?

2006-05-30 Thread Douglas Campos
it has been discussed here for two months On 5/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi. > > Please tell me it isn't so... > > I cannot BELIEVE that I spent several hours yesterday migrating my > project to the "Magic-Removal branch", now that it's been merged to > trunk an

No Model Inheritance in Magic-Removal?

2006-05-30 Thread [EMAIL PROTECTED]
Hi. Please tell me it isn't so... I cannot BELIEVE that I spent several hours yesterday migrating my project to the "Magic-Removal branch", now that it's been merged to trunk and adopted by so many people, only to discover after my stuff breaks and I do some reading up in the newsgroup, that mod

Dynamic template extension

2006-05-30 Thread tomass
Hi Folks, I'm wondering if there's a way to include dynamic (context) data in an {% extends %} statement. I don't seem to be able to do {% extends "base_{{ reseller }}_.html" %} for instance. Thanks, Tom --~--~-~--~~~---~--~~ You received this message because y

order_by in different tables

2006-05-30 Thread Guillermo Fernandez Castellanos
Hi, I've been reading the documentation about order_by(). They say, amont others, that: """ To order by a field in a different table, add the other table's name and a dot, like so: Entry.objects.order_by('blogs_blog.name', 'headline') """ Unfortunately, I do not quite get the example, and I've n

QuerySet._combine loses where clause

2006-05-30 Thread Graham King
I have a custom manager for one of my model objects which limits the objects returned. When I use the search features of the admin interface, it seems most of the details of my query set get lost, so the result is no longer limited by the details I passed to the 'extra' method. The co

Re: mysqldb error

2006-05-30 Thread Andy Dustman
On 5/28/06, Thn <[EMAIL PROTECTED]> wrote: > > Hi all - I'm using the latest code (rev 2997). > Otherwise it's mod_python 1.10 / apache2 / python2.3 / mysql 5.0.21 / > MySQLdb 2.0 -- all installed from Debian packages. You must be a time-traveller if you have MySQLdb-2.0 installed; 1.2.1 is the l

update_object and preserving fields

2006-05-30 Thread Marcin Kaszynski
Hello, is there a way to make update_object preserve values of some fields without putting them in the update form? I have a model with a 'creator' field: class Company(models.Model): creator = models.ForeignKey(auth.User, ) [...] I want to set this field automatically when a Compan

Re: Please help with project setup

2006-05-30 Thread David Larlet
2006/5/30, tekNico <[EMAIL PROTECTED]>: > One may also consider one of the two articles to be the translation of> the other (which is what I plan on doing for my project), thus> considering the both to be different articles and having no > information on the language in the url.> So something like

Re: confused about licensing

2006-05-30 Thread Darren Redmond
Nicola, Thanks for the prompt response. Let's hope the explanation keeps our legal team happy, otherwise I need another database. cheers Darren tekNico wrote: >> I have been using django with postgres on windows while builiding my >> application for the last month or so. >> I have just spend

Django Default Behavior with File Writes Unintuitive?

2006-05-30 Thread [EMAIL PROTECTED]
Hi all, I had a previous post on this issue which I did not get very many answers to. In particular, I did not have many responses those who may be more directly involved with the development of this great Framework (or maybe more appropriately the Admin extension of it? which is such a feature

Re: Admin password field

2006-05-30 Thread James Bennett
On 5/30/06, stane <[EMAIL PROTECTED]> wrote: > to create password open python shell > import md5 > md5.new('password').hexdigest() > > copy string into password field Or use the 'set_password' function defined in Django's auth module. -- "May the forces of evil become confused on the

Re: Please help with project setup

2006-05-30 Thread tekNico
> One may also consider one of the two articles to be the translation of > the other (which is what I plan on doing for my project), thus > considering the both to be different articles and having no > information on the language in the url. > So something like this : > "/articles/topic/subtopic/a

Re: confused about licensing

2006-05-30 Thread James Bennett
On 5/30/06, Darren Redmond <[EMAIL PROTECTED]> wrote: > Now my understanding of GPL is that if a product uses it, it can't claim > to be BSD. So given that django imports psycopg dynamically, > how does Django maintain its BSD status? Building a bit on Nicola's response, I feel it's useful to poi

Re: Please help with project setup

2006-05-30 Thread tekNico
>> I suppose it would be ok for my article authors to mark up their >> articles using simple HTML tags, like H1 and IMG, and save the entire >> article as a TextField. It would be really great, though, if articles >> could be converted to PDF files automatically, and using HTML tags >> would ruin

Re: Admin password field

2006-05-30 Thread stane
to create password open python shell import md5 md5.new('password').hexdigest() copy string into password field Todd O'Bryan wrote: > If you create a user without a password, then go into the Admin > interface to edit the user, it won't let you save unless you enter a > password. >

Re: confused about licensing

2006-05-30 Thread tekNico
> I have been using django with postgres on windows while builiding my > application for the last month or so. > I have just spend the day putting the app onto a linux box. It has just > been pointed out to me by one of my colleagues, > while building psycopg on the linux box, that it is a Gnu Pub

Controlling Display of Foreign Key Input Fieldsets in Admin

2006-05-30 Thread Paul Childs
I have been searching for a difinitive answer to a few questions but can't find any. I am trying to get control of how foreign key fieldsets display in the Django admin. For example I have a Repair model. It is a foreign key for SupportingDoc, Photo, and PartNumber. These are all to be edited inl

Admin site and TEMPLATE_STRING_IF_INVALID

2006-05-30 Thread [EMAIL PROTECTED]
Hello, I have strange behaviour with the Admin site: When setting the variable TEMPLATE_STRING_IF_INVALID, Some parts of the admin pages disappear! For instance, the login page will consist in a grey background, and just the white login div with the form. Same for the main page of the admin site

Admin password field

2006-05-30 Thread Todd O'Bryan
If you create a user without a password, then go into the Admin interface to edit the user, it won't let you save unless you enter a password. While that wouldn't ordinarily be a problem, the password has to be in the form algorithm$salt$hash Am I the only person who can't do these things

Re: Please help with project setup

2006-05-30 Thread Scott Anderson
TinyMCE (http://tinymce.moxiecode.com/) is an RTE that was extremely easy to integrate with Django for me. There are processors which can convert HTML to PDF, as well, but how well they work depends on the HTML and CSS being used. Regards, -scott On Tue, 2006-05-30 at 11:22 +, Kristoffer w

Admin dies when foreign key added

2006-05-30 Thread fyl
I am getting an error in admin when trying to do an add. The error is mentioned in bugs but not related to the condition I have. It is 'bool' object has no attribute 'get' in get_manipulator_fields, line 112. Here are parts of my model: class Agent(models.Model): uid = models.IntegerField

Re: Directory structure for pluggable apps and projects

2006-05-30 Thread adurdin
An application can be independent of a project -- there's no need for it to be contained in a project's directory. All that matters is that the application's parent directory is on sys.path so that "import" will find it. So "Apps/" can just be an empty directory initially, then use "django-admin

M-R / ImageField / file upload / custom manipulator

2006-05-30 Thread funk
Hi there, i am experiencing problems with the use of ImageField (model) in M-R, revision 3007. MySQL gets sql errors when saving. It seems to be wanting to save the uploaded image without quotes or something. This does not belong to mysql code i think since i want to save my file at MEDIA_ROOT...

confused about licensing

2006-05-30 Thread Darren Redmond
hi all, I have been using django with postgres on windows while builiding my application for the last month or so. I have just spend the day putting the app onto a linux box. It has just been pointed out to me by one of my colleagues, while building psycopg on the linux box, that it is a Gnu P

Re: Please help with project setup

2006-05-30 Thread Brice Carpentier
On 5/30/06, Kristoffer <[EMAIL PROTECTED]> wrote: > > >The author was also able to add images elsewhere using the rich text > >editor we provided him with. > > This seems like what I want for this project. > However, if there isn't a rich text editor available that is easy to > plug in with Django

Re: Please help with project setup

2006-05-30 Thread Brice Carpentier
On 5/30/06, Kristoffer <[EMAIL PROTECTED]> wrote: > > >I would prefer a fourth option : > >d. /articles/topic/subtopic/article/display?lang=en > > This seems like a good way. However, how search engine friendly is it? > If I had links to /articles/topic/subtopic/article/display?lang=en and > /arti

Re: Please help with project setup

2006-05-30 Thread Kristoffer
>The author was also able to add images elsewhere using the rich text >editor we provided him with. This seems like what I want for this project. However, if there isn't a rich text editor available that is easy to plug in with Django, this option isn't for me. I suppose it would be ok for my ar

Re: Please help with project setup

2006-05-30 Thread Kristoffer
>I would prefer a fourth option : >d. /articles/topic/subtopic/article/display?lang=en This seems like a good way. However, how search engine friendly is it? If I had links to /articles/topic/subtopic/article/display?lang=en and /articles/topic/subtopic/article/display?lang=de, would say google i

Re: Is Django suitable for a big numbers of visitors??

2006-05-30 Thread Jyrki Pulliainen
On 5/29/06, wiz <[EMAIL PROTECTED]> wrote: > > How can I verify that caching works? > "apache benchmark" or something like that. I've found FunkLoad more functional. You can run multiple threaded queries with it for desirable amount of iterations with intervals. It simulates better multiple users

Re: Please help with project setup

2006-05-30 Thread Brice Carpentier
On 5/30/06, Kristoffer <[EMAIL PROTECTED]> wrote: > 3. An article needs some basic layout, for example headlines and > images. The images for an article may vary from article to article. How > could I extend my model to achieve this? > For a project I worked on, which was Plone-driven, we defined

Re: Please help with project setup

2006-05-30 Thread Brice Carpentier
On 5/30/06, Kristoffer <[EMAIL PROTECTED]> wrote: > 2. Each article come in two languages. Which would be the best way to > achieve that? > a. /articles/topic/subtopic/article/en > b. /articles/en/topic/subtopic/article > c. /articles/topic/subtopic/article?en I would prefer a fourth option : d.

remote_ident

2006-05-30 Thread Axel Steiner
Hi, I'm a little bit confused about request.META['remote_ident']... Apache2 is configured for ident ("IdentityCheck on" in httpd.conf), so I get the correct value with a simple test CGI script. But with Django, the value of request.META['remote_ident'] is set irregular. So one time I get the va

Re: Please help with project setup

2006-05-30 Thread Kristoffer
Thanks for your reply! I'll have a closer look at your suggestions for questions 1 and 2. A bit of clarification for question 3: The article authors need to include images in their articles. The number of images, if any, may vary from article to article. The images should also be "integrated" w

Re: Please help with project setup

2006-05-30 Thread David Larlet
2006/5/30, Kristoffer <[EMAIL PROTECTED]>: Hi all,I need to write a system where articles can be published and I amthining about using Django, and I am impressed!I have studied the tutorial but still have a few questions before I candecide if Django is the way to go for me. I'm in the same case so 

Please help with project setup

2006-05-30 Thread Kristoffer
Hi all, I need to write a system where articles can be published and I am thining about using Django, and I am impressed! I have studied the tutorial but still have a few questions before I can decide if Django is the way to go for me. 1. The articles are grouped in topics and up to an infinite