Re: Sessions without cookies for mobile sites

2007-01-12 Thread Michael Radziej
davo schrieb: > For the record, django/mobile ended up in the 'too difficult' basket > due to the session difficulties, which is a shame because we were > digging it development-wise. I'd love to use it for the next pure web > app though - keep up the good work guys :) There is a thread in django

Re: Django's FastCGI init.d script for Linux

2007-01-12 Thread Michael Radziej
Hi, could you put this into the wiki? This type of stuff is a lot of help to new users, but in the mailing list it gets lost. Please note for which type of linux your script is intended, since init scripts for, e.g. debian or SUSE, look quite different. Michael -- noris network AG - Deutschh

Re: Django joining multiple tables together

2007-01-11 Thread Michael Radziej
David Cramer schrieb: > Why does Django join "files_file" twice? I do a > .filter(file__game=blah).select_related(fields=['file', 'type']) so it > joins the files table twice? This would happen the same with a normal > .select_related() as well. Maybe the SQL engine optimizes this but I'm > not s

Re: Design Q: binding of model attributes to admin application

2007-01-10 Thread Michael Radziej
Hi George, are you aware about the graphviz thing that does just what you are writing? http://code.djangoproject.com/wiki/DjangoGraphviz So long, Michael -- noris network AG - Deutschherrnstraße 15-19 - D-90429 Nürnberg - Tel +49-911-9352-0 - Fax +49-911-9352-100 http://www.noris.de - The

Re: solidDB and Django

2007-01-10 Thread Michael Radziej
David Cramer schrieb: > As we were having issues lately with handling database load, I'm > looking at alternatives for MySQL/Innodb in the future. One thing that > came up was solidDB. I'm curious as to if this would be possible to use > with Django, or if anyone has used this in the past and has

Re: Creating an empty queryset

2007-01-10 Thread Michael Radziej
Adam Seering schrieb: > I would strongly second that. This seems to have fallen somewhat > dead, though. Any thoughts?; anyone in favor of it?; anyone know of > any reasons not to do it? +1 from me. I have already missed it several times. The "where 1=0 solution" looks stupid. And the chan

Re: Django inspectsb and varchar-fields in MySQL

2006-12-01 Thread Michael Radziej
Adrian Rochau schrieb: > Hello! > > I'm writing a frontend for a MySQL-based testsystem. I used inspectdb > to create my Django-models and many fields are guessed correct, but > every varchar-field has a length multiplyed by 3. Do you know why? UTF-8? Michael -- noris network AG - Deutschher

Re: Curious about 1.0 release.

2006-10-25 Thread Michael Radziej
Jeremy Dunck schrieb: > LJWorld.com, Lawrence.com, Tabblo.com, > http://projects.washingtonpost.com/congress/, > http://www.chicagocrime.org/ I'm curious: Are they all 0.95? Michael -- noris network AG - Deutschherrnstraße 15-19 - D-90429 Nürnberg - Tel +49 911 9352-0 - Fax +49 911 9352-100 h

Re: Adding variable numbers of related objects in a form

2006-10-25 Thread Michael Radziej
Malcolm Tredinnick schrieb: > On Tue, 2006-10-24 at 08:19 -0700, exdnc wrote: >> Is there a 'proper' way to get the framework to add more than >> num_in_admin related objects to both the Add/ChangeManipulator and to >> the FormWrapper? Thanks! > > The short answer to your question is "no": the n

Re: syncdb complaining table already exists

2006-10-24 Thread Michael Radziej
yary schrieb: > Hi, new to Django- > > I have my data model all created. I can run syncdb once, and it creates > my database schema: > > C:\webapp\Site>python manage.py syncdb > Creating table auth_message > Creating table auth_group > Creating table auth_user > Creating table auth_permission >

Re: Question about select_related and query caching

2006-10-23 Thread Michael Radziej
DavidA: > > DavidA wrote: >> I have some models that look like this >> >> class Analyst(models.Model): >> name = models.CharField(maxlength=20, unique=True) >> >> class Strategy(models.Model): >> name = models.CharField(maxlength=20) >> description = models.CharField(maxlength=80) >>

Re: ForeignKey in other models.py

2006-10-17 Thread Michael Radziej
Vittorino Parenti schrieb: > Hi, > i found this in django documentation: > > "Note, however, that you can only use strings to refer to models in the > same models.py file -- you cannot use a string to reference a model in a > different application, or to reference a model that has been imported

Re: Postgresql duplicate keys and django problem

2006-10-17 Thread Michael Radziej
[EMAIL PROTECTED] schrieb: > Few days ago I've started to get such errors in the Admin Panel when I > want to add something: > ## > IntegrityError: ERROR: duplicate key violates unique constraint > "rk_news3_pkey" > > INSERT INTO "rk_news3" > ("news_title","news_t

Re: template error

2006-10-16 Thread Michael Radziej
doug schrieb: > Hey- > > > Why am I getting this error if the template file exists? > > # > Template-loader postmortem > > Django tried loading these templates, in this order: > > * Using loader > django.template.loaders.filesystem.load_template_source: > o /home

Re: What IDE do you use? (semi-OT)

2006-10-09 Thread Michael Radziej
Hi, I like KDevelop, for Linux. Works also fine for django templates. Has syntax highlighting, class browsing, ctags, bookmarks, and all the usual editor stuff. I really like the class browser for looking up source code within django--Alt+C, start entering the class name, and you're there. B

off-topic, Re: Unicode and django/db/backends/util.py

2006-10-04 Thread Michael Radziej
Gábor Farkas schrieb: > explicit is better than implicit :) Oh come on, I can't hear that particular one any more. Why does python have implicit storage handling with automatic reference counting? We'd use C or Assembler if we really believed in that Mantra. But your advice is right, of cour

Re: Serious Question... Web2.0

2006-09-29 Thread Michael Radziej
Tom Smith schrieb: > As everyone knows (or as yet to learn) the success of many > technologies is down to how snazzy the end result is... > > So it surprises me that I can't find any reference to anyone uses > MochKit (or any other client-based toolkit) with Django... in fact > that seems t

Re: Why I'm giving up on Django

2006-09-28 Thread Michael Radziej
Sean Schertell schrieb: > > (3) FormWrappers are great until you need to do anything even > slightly different from the django prescribed method, then you have > to use custom manipulators which I found to be a giant pain in the > ass. I spent literally several days working on one form (yes

Re: Model-level DB cache

2006-09-28 Thread Michael Radziej
Greg Plesur schrieb: > So that's a work-around that I can use, but...is it okay behavior? That > seems pretty broken. Is it possible that Django's DB connection has > auto-commit off, but explicitly calls COMMIT internally on save() > operations when there's no Django-level transaction in pla

Re: Model-level DB cache

2006-09-28 Thread Michael Radziej
Hawkeye schrieb: > I had the same reaction at first... "this has to be a transaction > issue", but I decided to give it a try. > > I'm working from trunk, and here's what I did to recreate the problem: > > == > {{ In manage.py shell }} a = Foo.objects.all() a > [< Foo: Foo 5>,

Re: Model-level DB cache

2006-09-27 Thread Michael Radziej
Greg Plesur schrieb: > Hi all, > > I'm a new subscriber to this list, and am having an issue that I'm > hoping you can help me with (I also posted this as a trouble-ticket, > because I'm not seeing any references to this issue anywhere and it > seems buggy): > > It looks like my models are ca

Re: Does raising 404 makes use django's auth system?

2006-09-27 Thread Michael Radziej
Filipe schrieb: > works perfectly. Haven't detected any side effect yet. > thanks. Good to know! Perhaps you should file a ticket that context_processors.auth should behave better when there's no session. If you do, please include a link to this thread. Michael --~--~-~--~~-

Re: How to create unions (or how to extend a QuerySet)?

2006-09-27 Thread Michael Radziej
Holger Schurig schrieb: > I have a list that looks like this: > >list = Device.objects.all().order_by('parent', 'name') > > and I use this list in a view. Works fine. However, I want to > have the items with a special name at the top of the generated > list. I can easily create two lists,

Re: Does raising 404 makes use django's auth system?

2006-09-26 Thread Michael Radziej
Filipe schrieb: > Michael Radziej wrote: >> Well, as a work around, if you don't use a database, you should >> remove >> "django.core.context_processors.auth", >> from TEMPLATE_CONTEXT_PROCESSORS in settings.py > > hmm, I don't have tha

Re: Does raising 404 makes use django's auth system?

2006-09-25 Thread Michael Radziej
Malcolm Tredinnick schrieb: > OK, this is the problem line: RequestContext tries to access "user". The > reason we are using RequestContext is because of ticket #688 (which is > quite a reasonable change). However, we have to conditionally avoid this > user requirement. Well, as a work around, i

Re: two models -> one form -> addmanipulator

2006-09-22 Thread Michael Radziej
limodou schrieb: > No, I think you cann't do this in django. You should use custom > manipulator for this. Hmm, I think you could use it like this: ... form1 = forms.FormWrapper(manipulator1, data1, errors1) form2 = forms.FormWrapper(manipulator2, data2, errors2) return render_to_response(templa

Re: Ubuntu Dapper Drake installation question

2006-09-22 Thread Michael Radziej
Daniel schrieb: > Hi, > > just a quick question: did anyone succeed in installing Django 0.95 on > Ubuntu Dapper Drake? I install python and python-dev, as well as the > python-setuptools and python-mysqldb packages (all Python 2.4) and > downloaded Django and tried running > > # sudo python set

Re: Passing context information through a HttpResponseRedirect

2006-09-20 Thread Michael Radziej
[EMAIL PROTECTED] wrote: > ... > The problem is: how can I pass context info through this? Suppose I'd > want to maintain the login information the user has entered in the > form, and reprint it in the form, together with an error message? Is > there a way to HttpResponseRedirect and pass context

Re: Database query question

2006-09-18 Thread Michael Radziej
Tom Smith wrote: > Thanks... I'm not sure but I don't think this is working > > I have... > > p = Product.objects > if len(notsitelist)>=1: > print "exluding sites: ", notsitelist > p.exclude(fk_site__in=notsitelist) > > if len(cats)>=1: >

Re: Core dump- how to diagnose?

2006-09-12 Thread Michael Radziej
Hi, richard wrote: > Hello, > I'm trying to move a functioning development django project developed > on an Os x box (django svn up to date, python 2.4.3) to an 'exposed' > AIX 5.3 server and am falling at an early unanticipated hurdle with > core dumps from django! > On the AIX box I have Active

Re: Concurrency and data modification

2006-09-12 Thread Michael Radziej
Hawkeye wrote: > I think that this would be great (for my purposes)... > > It doesn't look like this exists in Django right now. Are there plans > to implement this? Maybe a ticket that already exists? > > I'd still be concerned about the cache getting in the way, but as a > first step the 'for_

Re: Concurrency and data modification

2006-09-11 Thread Michael Radziej
Hawkeye wrote: > How does raw SQL interact with the 'save' function? > > Say I need to: > increment 'count' > set another variable on the same object > > Do I need to write custom SQL to update the second variable? > Can I just use .save() and have it work as I want it to (or will count > be cha

model validation and foreign keys

2006-06-28 Thread Michael Radziej
Hey russellm, thanks a lot for the extended model validation--it rocks! You probably saved me endless hours of debugging twisted things! 8-) Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" g

Re: Maintaining foreign key reference when foreign object gets deleted

2006-06-27 Thread Michael Radziej
mohan wrote: > Hi, > > I have the following 3 models with one model having a foreign key > reference to another model. > > class DeliveryBatch(models.Model): > delivered_to = models.ForeignKey(Centre) > ... > > class Centre(models.Model): > is_deleted = models.BooleanField(default=

Re: Deployment suggestions?

2006-06-22 Thread Michael Radziej
Jay Parlar wrote: > I was just wondering what kind of deployment strategies people have > been using with their Django sites? > > Currently, for developing, I'm working right out of an SVN checkout. > For deployment, I'd ideally like to login to my production server, > grab the current copy from

Re: Which IDE to debug django app? (Was "Using Pyscripter with Django")

2006-06-20 Thread Michael Radziej
Hi, I really found I don't need a debugger for Django. If I have a problem, I set some random variable to the data I am interested in and raise a non-existing exception, like: bla = user.__dict__ raise Bla Then I deal with my browser, and the (great!) error page of Django will tell me all I

Re: Existing database into django models?

2006-06-19 Thread Michael Radziej
Malcolm Tredinnick wrote: > On Mon, 2006-06-19 at 13:04 +, Mike Crowe wrote: > There is some support for this. See here: > http://www.djangoproject.com/documentation/django_admin/#inspectdb Hey, and let me add that you might want to check ticket 1561. Malcolm told me that in the meantime for

Re: Accessing logged-in user object in models

2006-06-13 Thread Michael Radziej
Don Arbow wrote: > Then in the view that calls the template, you determine if the user > is authorized to edit the field. You don't have a view function with an Admin page ... that doesn't work. But you could just redirect the Admin page to a view function (using the URL config) and from the

Re: Accessing logged-in user object in models

2006-06-13 Thread Michael Radziej
[EMAIL PROTECTED] wrote: > Hi, > I need the access to the logged-in user object in a model, to verify > permissions. > How I do that? You can't. The model is decoupled from the http stuff and has no way to access it. Such kind of validations must be done in the Manipulator or view. There are

Re: Composite or compound primary key support

2006-06-13 Thread Michael Radziej
Hi Sanjay, reasons are probably simplicity of code and that it's easy to circumvent when you start with your own fresh database. Django is more targeted to this case, not for legacy systems. Having said this, I use Django for a really ugly old existing database, and it works. There are not so

Re: Composite or compound primary key support

2006-06-13 Thread Michael Radziej
Sanjay wrote: > Hi All, > > Being new to Django, I am curious to know whether Django supports > composite primary keys. For example, can I have a schema like this: No, it doesn't. Seems this question should go into the FAQ ;-) Michael --~--~-~--~~~---~--~~ You

Re: User editing/adding broken in Admin interface

2006-06-12 Thread Michael Radziej
tomass wrote: > It seems to be related to this in my models: > > from django.contrib.auth.models import User > > class Email(models.Model): > owner = models.ForeignKey(User) > ... > ... > > If I comment out this line, I'm good. What's am I doing wrong here? I have seen the same message u

Re: urls.conf problem

2006-06-09 Thread Michael Radziej
[EMAIL PROTECTED] wrote: > I uses django.views.static to serve my static files. I wrote some > static html files and want them to be accessed from site's root, for > example, http://127.0.0.1/file1.html http://127.0.0.1/file2.html, so I > edit urls.py to: > (r'^.*$', 'django.views.static.serv

Re: Mod_python and Django - PROBLEM

2006-06-09 Thread Michael Radziej
PythonistL wrote: Fast guess: > My httpd.conf looks like this > > > ... > > > ServerName www.eim.com > SetHandler python-program > PythonPath "['/home/django_projects/'] + sys.path" ^^ add '/home/django_src' to this. Does it help? Michael --~--~-~--~

Re: Still stuck trying to set up testing

2006-06-09 Thread Michael Radziej
Todd O'Bryan wrote: > I'm having a chicken-and-egg problem. > > So, I want to drop the test database, recreate it, sync it to the > models, and then populate it with test data, ideally automatically > because automatic tests are far more likely to get run. > > If I want the drop and create c

Simon on Europython

2006-06-08 Thread Michael Radziej
Hi, just noted: Simon will talk at the Europython: http://indico.cern.ch/contributionDisplay.py?contribId=26&sessionId=9&confId=44 there'll also be a "framework shootout": http://indico.cern.ch/contributionDisplay.py?contribId=117&sessionId=9&confId=44 See you :-) Michael --~--~-~

Re: Django on Dreamhost. Getting 503 http error when I try to login to admin

2006-06-07 Thread Michael Radziej
Tomas Jacobsen wrote: > I use: http://www.django.tomasjacobsen.com/admin/ and > http://django.tomasjacobsen.com/admin/ . The same result on both. That's it. There's "go.to" in "django.tomasjacobsen". You should complain at Dreamhost. They filter in the wrong way. For a work-around, change your

Re: Django on Dreamhost. Getting 503 http error when I try to login to admin

2006-06-07 Thread Michael Radziej
Tomas Jacobsen wrote: > In the error log i get this error: > > mod_security: Access denied with code 503. Pattern match > "(go\\.to|get\\.to|drop\\.to|hey\\.to|switch\\.to|dive\\.to|move\\.to|again\\.at)" > at HEADER. [hostname "django.mydomain.com"] [uri "/admin/"] How exactly did you access yo

Re: Site testing How-To

2006-06-07 Thread Michael Radziej
Hi, Just a little teaser: I've found a nice approach to test your views. The problem is, the http response is hard to test, since you have to either scrape the interesting content from it, or use regexps. Both is not really nice. My approach does not check the actual http response, but the co

Re: Django Quick Start with Schema Evolution Support

2006-06-06 Thread Michael Radziej
Ilias Lazaridis wrote: > http://lazaridis.com/core/eval/index.html Your phone contact is not working. I get the impression you're only a scam. Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: update_object and preserving fields

2006-06-02 Thread Michael Radziej
Marcin Kaszynski wrote: > Michael Radziej <[EMAIL PROTECTED]> writes: >> Or the if the generic view and manipulators provided a way for a >> clean prepopulate. > > This is exactly what I have in mind. > > I also thought about adding another parameter to generic

Re: update_object and preserving fields

2006-06-02 Thread Michael Radziej
Hi Marcin, Marcin Kaszynski wrote: > The update_object view does, this: > > new_data = request.POST.copy() > errors = manipulator.get_validation_errors(new_data) > manipulator.do_html2python(new_data) > if not errors: > object = manipulator.save(new_data) > > The way I see it, new

Re: Small error with debug magi-removal with Komodo

2006-06-01 Thread Michael Radziej
mamcxyz wrote: > Pay attention to this hack: > > dispatcher.disconnect(create_superuser, sender=auth_app, > signal=signals.post_syncdb) Hey, what a cool idea. I resorted to redirect sys.stdin to skip superuser creation. Could it be that you call this for each unit test? Than it's bound

Re: update_object and preserving fields

2006-06-01 Thread Michael Radziej
Hi, I've followed your discussion only in parts. But I usually handle everything that is outside of the scope of the normal generic views inside the manipulator, and I have patched some generic views so that they accept a manipulator instance as additional parameter. (see ticket 1563 for patch).

Re: Django and WSGI

2006-05-19 Thread Michael Radziej
PythonistL wrote: > I received a reply from Dreamhost: > > " > > However, I > have been on the browser and your website is working now. So it doesn't > sound > like there is a configuration problem on the server, but I suspect that > there may be an intermittent high load issue. Normally t

Re: Using existing database shema

2006-05-17 Thread Michael Radziej
Hey Filipe, Filipe wrote: > Custom SQL + Manipulators does sound as the way to use my own model > classes. It doesn't seem as the most straightforward way to use Django > though, anyone out there actually working with Django this way? > > Michael, are you actually using Django (ORM included) wit

Re: Trouble resolving URLs

2006-05-17 Thread Michael Radziej
Hi Simon! Simon Johnston wrote: > I have followed the tutorials in setting up a basic index and detail > page for one of my model classes. I created the project level urls.py > as follows: > > from django.conf.urls.defaults import * > urlpatterns = patterns('', > (r'^accounts/$', include('Re

Re: Using existing database shema

2006-05-16 Thread Michael Radziej
Joseph Kocherhans wrote: > On 5/16/06, Filipe <[EMAIL PROTECTED]> wrote: >> Do you think I'll find difficulties in using model classes with my own >> data persistency logic? In such case, will I loose other features >> besides the ORMapping itself? (I've read something about loosing >> autogenerat

Re: Transactions and model.save()

2006-05-16 Thread Michael Radziej
Elver Loho wrote: > Hiya! > > Someone raised this question in the comments of the 4th tutorial and > it's been bugging me to no end. > > Let's take the poll sample. We've got the vote() view going on. > > choice.votes += 1 > choice.save() > > Suppose we've got thread1 and thread2 going on (hig

Re: Limiting selection in admin pages [NEWBIE]

2006-05-16 Thread Michael Radziej
[EMAIL PROTECTED] wrote: > I came across this in Django's documentation: > (http://www.djangoproject.com/documentation/model_api/#many-to-one-relationships) > > (...) > limit_choices_to: > A dictionary of lookup arguments and values (...)that limit > the available admin choices for this o

Re: Using existing database shema

2006-05-15 Thread Michael Radziej
Filipe wrote: > I'm starting a new project and am looking for the right framework for > it. Django is the best candidate so far :) > > If I understand right it's not mandatory to have a relational database > to use Django, as long as one does not inherit models from > "meta.Model". > > My questi

Re: OpenID

2006-05-11 Thread Michael Radziej
Alan Trick wrote: > A decentralized identity system. It allows you use the same login on > multiple web pages. Sounds cool ... thanks for the information! Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: OpenID

2006-05-11 Thread Michael Radziej
Alan Trick wrote: > Hi, > > I was wondering if anyone has thought about providing OpenID support in > django. I'm writting an app and I really want to use django, but OpenID > is somewhat important for technical reasons. What is OpenID? Michael --~--~-~--~~~---~--~-

Re: TypeError when accessing a many to many field

2006-05-10 Thread Michael Radziej
Christian Schneider wrote: > thanks for the hint. Running the tests gives me 17 errors. While most of > them are due to my German localisation, like got "1 Tag" expected "1 day", > there are also errors like the following: > > 'transactions' module: API test failed > =

Re: TypeError when accessing a many to many field

2006-05-10 Thread Michael Radziej
Christian Schneider wrote: > Michael, > > On 5/10/06, Michael Radziej <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> My problem was a stupid error on my own. You haven't, by chance, created >> a field named "id" and haven't set primary

Re: TypeError when accessing a many to many field

2006-05-10 Thread Michael Radziej
Hi, My problem was a stupid error on my own. You haven't, by chance, created a field named "id" and haven't set primary=True? Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post t

Re: TypeError when accessing a many to many field

2006-05-10 Thread Michael Radziej
Christian Schneider wrote: > I can do Codec.objects.all()[0].format_set.all() but when I do > Format.objects.all()[0].codec.all() I get the following traceback: > File "/usr/lib/python2.3/site-packages/django/db/models/query.py", line > 780, in lookup_inner > raise TypeError, "Cannot resolve

Re: No Subclassing in models yet? How would you guys do the following:

2006-05-09 Thread Michael Radziej
[EMAIL PROTECTED] wrote: > I will say the way I'd be doing the inheritance more simply than is > suggested on the wiki with one sparse table representing the whole > inheritance hierarchy. Well, in *that* case: simply make a model based on this table. Or is there a problem I don't see? Michael

Re: TTW templates?

2006-05-08 Thread Michael Radziej
Wade Leftwich wrote: > I work for a magazine publishing company that has 150 websites for 75 > different mags. Quite often we create an application and present the > same data structures via 50 different HTML layouts. > > We've had a lot of success using Zope thru-the-web (TTW) templates for > th

Re: Tutorial for MR

2006-05-03 Thread Michael Radziej
Honza Král wrote: > Yes, when I have all my model classes in file models.py, manage.py sql > works just fine > > when I split my models into two or more files and put them into models > subdirectory (with __init__.py containing the proper __all__ list), it > does not work: > BEGIN > COMMIT; > >

Re: Tutorial for MR

2006-05-03 Thread Michael Radziej
Honza Král wrote: > Thank you, I went to that page, but, for reasons unknown to me > (perhaps brain death), didn't check the status of the tutorials... :-/ > > as for my other inquiry, can anyone tell me if it is possible to have > models spread through multiple files? I am afraid I have also mis

Re: Tutorial 2 - Admin

2006-05-03 Thread Michael Radziej
Dave wrote: > Hi guys, > > I get the following error when trying to connect to the admin page > (start of Tutorial 2). Any help greatly appreciated as I'm new to this > Magic Removal stuff... Something in your setup is seriously wrong. Have you followed the instructions of the first part of the

Re: Validators in a model's validator_list (m-r)

2006-04-25 Thread Michael Radziej
Christian Schneider wrote: > On 4/25/06, Michael Radziej <[EMAIL PROTECTED]> wrote: >> >> Christian Schneider wrote: >>> Michael, >>> >>> I'm still using a generic view. I played with some custom functions >> before >>> and

Re: Validators in a model's validator_list (m-r)

2006-04-25 Thread Michael Radziej
Christian Schneider wrote: > Michael, > > I'm still using a generic view. I played with some custom functions before > and they were called so I'd hoped that it would work with the validator > objects as well. I looked in the source. Aha! First parameter to RequiredIfOtherField is the *name* of

Re: Validators in a model's validator_list (m-r)

2006-04-25 Thread Michael Radziej
Christian Schneider wrote: > However, no matter what value recording_type has, the validator is not > called. What I find funny is that the validator's __call__ method takes > three values (self, field_data, all_data) while custom validator functions > specified with validator_list take only field

Re: Forking a new process

2006-04-25 Thread Michael Radziej
tomass wrote: > Well, basically I have processes that could take minutes to execute, > and I'd like to background them, serve up a page showing the status, > and then allow users to view the output once they've completed. Hmm. I don't know what it takes to get a clean independent fork so that no

Re: Forking a new process

2006-04-25 Thread Michael Radziej
tomass wrote: > Hi Folks, > > I'm trying to fork a new process using os.fork(), and everything seems > to be working well, except that I need to then reference django models > from the forked process. This seems to mean I need to reimport all the > relevant modules into the function that's runnin

Re: Problems creating model.

2006-04-19 Thread Michael Radziej
Russell Keith-Magee schrieb: > On 4/19/06, Michael Radziej <[EMAIL PROTECTED]> wrote: >>No, not really. The only string is "self" ;-) > > > To clarify my point: > > 0.91 - "self" is the only string > magic-removal: "self" an

Re: Problems creating model.

2006-04-19 Thread Michael Radziej
Russell Keith-Magee schrieb: > Unfortunately, this isn't possible in 0.91/trunk. However, in the > magic-removal stream, you can forward reference a model using the string > version of the model name. No, not really. The only string is "self" ;-) I tried it a few weeks ago. But if you can correc

Re: Fate of 0.91 projects

2006-04-13 Thread Michael Radziej
David S. schrieb: > I am finishing up a project built on 0.91 and I am wondering about the various > patches that have been made to trunk in the meantime. Since magic-removal > will > be too backwards-incompatible to use in this project, should I be applying > important patches (like http://code

Re: Modify pulldown contents in admin interface

2006-04-10 Thread Michael Radziej
Graham King schrieb: > Dear django-users, > > Is there a way to control the values that appear in a pulldown (a > ForeignKey field) on the admin interface ? Yes, that's limit_choices_to. Search for this in the documentation to models. Michael --~--~-~--~~~

Re: update_object generic view should take manipulator?

2006-04-07 Thread Michael Radziej
shredwheat schrieb: > It would seem highly useful to me if the update_object and > create_opject generic views could also take an additional keyword > argument for the manipulator class to use. I share your opinion; perhaps I'll write a wiki entry about this style. See http://code.djangoproject.

Re: Loading Data Custom Manipulator

2006-04-04 Thread Michael Radziej
[EMAIL PROTECTED] schrieb: > I used the manipulator.py script on the wiki to generate it then made > the changes I needed. Ouch. I can't give much of advice about this. Perhaps your manipulator class should derive from yourModels.Model.ChangeManipulator and it starts to work. Worth a try. Pleas

Re: Loading Data Custom Manipulator

2006-04-04 Thread Michael Radziej
[EMAIL PROTECTED] schrieb: > It appears that I need to have a custom flatten_data() that will Have you derived it from the automatically (in the model) provided manipulator? Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

Re: 0.91 vs SVN vs m-r

2006-04-04 Thread Michael Radziej
Hi Michael, I found myself in the same position a month ago. My project will grow continually for a long time, and there's no near deadline, so I chose the magic-removal branch, and I haven't regretted it. Lots of good ideas went in there. Though, if you need to go productive within two months

Re: edit_inline on the other end of the OneToOneField

2006-03-31 Thread Michael Radziej
medhat schrieb: > Am I approaching this the correct way? or do I have to think about it > differently? I experienced the same problem during "playing around" with an idea, so I think you really hit a limitation. In the magic-removal branch, there will be subclassing a model class this way (sear

Re: logging

2006-03-30 Thread Michael Radziej
Jacob Kaplan-Moss schrieb: > Yeah, Python's logging module should do everything you need. If not, re-read the docs ;-) Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: customised generic view

2006-03-28 Thread Michael Radziej
yml schrieb: > Eureka! > [...] :-) > Based on this, I can tell you that I do not understand at all what the > following statement is doing. > manipulator.do_html2python(new_data) It converts the form data as received from the http POST request (strings) into the datatypes for the associat

Re: customised generic view

2006-03-27 Thread Michael Radziej
yml schrieb: > This look very interesting so what I will do is to install magic > removal branch this evening and try your recipe. But: be prepared that if you use this on existing code, you might have to change quite a lot. See http://code.djangoproject.com/wiki/RemovingTheMagic --and, it is

Re: Form field

2006-03-27 Thread Michael Radziej
At least in magic removal, take a look at the "follow" parameter for the automatically generated manipulators and the generic views. See my recent posting about "customised generic views" for details. I think this is what you really want. Michael --~--~-~--~~~---~-

Re: customised generic view

2006-03-27 Thread Michael Radziej
yml schrieb: > Hello, > > what I am trying to do since this morning is to allow my logged in user > to create Members. As you will see below Member is related to the User > class by a foreignkey. > so far I create User, Member using generic view. What I would like to > do is to remove the user fi

Re: models and forward declarations

2006-03-09 Thread Michael Radziej
Just found out that ForeignKeyField also accepts the model *name* instead of the model itself. Might solve the problem if this really works out :-) Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django u

Re: models and forward declarations

2006-03-09 Thread Michael Radziej
Rock schrieb: > Search for "forward reference" in this group. (Basically you cleverly > locate your import statement inside a function call.) I found your thread at: http://groups.google.com/group/django-users/browse_thread/thread/71fc72ab1f547d3/4d0dbfdfd9dc8a05?q=%22forward+references%22&rnum=

models and forward declarations

2006-03-09 Thread Michael Radziej
Hi, I try to throw django on an existing database. Unfortunately, there are cyclic foreign key dependencies between tables, and I'm looking for a way to express this in the model. (I use the magic-removal branch from cvs). Is there a way? Something like class Bah(Models.model): ... c

<    1   2