Filtering foreign key by User (LazyUser)

2006-09-21 Thread Kr0n
Hey, I'm basically trying to filter a foreign key (using limit_choices_to) by an user (just like in this thread http://groups.google.com/group/django-users/browse_thread/thread/8006b7e493ef877d/79d5c10c3abab725?lnk=st=limit_choices_to+threads=2#79d5c10c3abab725) The model is quite simply, as

Re: settings.py help please

2006-09-21 Thread Kenneth Gonsalves
On 22-Sep-06, at 1:47 AM, zehi wrote: > Not sure what's wrong? sudo python setup.py build install -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: seeking clarification: custom manipulator foreign key / many-to-many

2006-09-21 Thread patrickk
I don´t want to stress your help, but do you know where to find an example on using a custom manipulator for *updating* data. question is, where does the custom manipulator gets the data (stored in the database) from. the way I did it so far: 1. using a changmanipulator to get and display

Re: settings.py help please

2006-09-21 Thread Jay Parlar
On 9/21/06, Don Arbow <[EMAIL PROTECTED]> wrote: > > On Sep 21, 2006, at 1:17 PM, zehi wrote: > > > > Still not successfull > > > > When trying to install MySQLdb I'm getting this error: > > > > zehi:~/Desktop/MySQL-python-1.2.1_p2 zehi$ python setup.py build > > sh: line 1: mysql_config:

Re: syncdb threw exception because libpq.so.4 could not be found

2006-09-21 Thread Malcolm Tredinnick
On Thu, 2006-09-21 at 15:54 -0700, [EMAIL PROTECTED] wrote: > I am a newbee with django. > > I tried to run "python manage.py syncdb" on RHEL 4.0 Linux box and got > the following. It looks like django did not have its lib path set > correctly. Please advise on how I can rectify this problem.

syncdb threw exception because libpq.so.4 could not be found

2006-09-21 Thread skuo
I am a newbee with django. I tried to run "python manage.py syncdb" on RHEL 4.0 Linux box and got the following. It looks like django did not have its lib path set correctly. Please advise on how I can rectify this problem. Thanks in advance. python manage.py syncdb Traceback (most recent

Re: seeking clarification: custom manipulator foreign key / many-to-many

2006-09-21 Thread Ivan Sagalaev
patrickk wrote: > well, now I´m totally confused. > I though that´s exactly what custom manipulators are here for: > "You can easily create your own custom manipulators for handling > custom forms." (django documentation). All manipulators handle forms: - prepare initial data - validate data -

Re: settings.py help please

2006-09-21 Thread Don Arbow
On Sep 21, 2006, at 1:17 PM, zehi wrote: > > Still not successfull > > When trying to install MySQLdb I'm getting this error: > > zehi:~/Desktop/MySQL-python-1.2.1_p2 zehi$ python setup.py build > sh: line 1: mysql_config: command not found > sh: line 1: mysql_config: command not found > sh:

Re: seeking clarification: custom manipulator foreign key / many-to-many

2006-09-21 Thread patrickk
well, now I´m totally confused. I though that´s exactly what custom manipulators are here for: "You can easily create your own custom manipulators for handling custom forms." (django documentation). more below ... Am 21.09.2006 um 22:47 schrieb Ivan Sagalaev: > > patrickk wrote: >>

Re: threadlocals with limit_choices_to in models

2006-09-21 Thread Kr0n
ibson wrote: > :| > Apologiz for saying it worked!!! It doesn't work after some times even > after restarting apache every 15 minutes!!! > So the question is always there. And it seems I am not the only to hav > this problem Yep. I've also a problem with this, but for me it's simply doesn't work

Re: seeking clarification: custom manipulator foreign key / many-to-many

2006-09-21 Thread Ivan Sagalaev
patrickk wrote: > flatten_data() doesn´t relate to the custom manipulator but to model > resp. the changemanipulator. I see now... And if I'm guessing correctly you're creating a FormWrapper from user_profile_manipulator that just doesn't have that checkbox field. Anyway making two

Re: seeking clarification: custom manipulator foreign key / many-to-many

2006-09-21 Thread patrickk
flatten_data() doesn´t relate to the custom manipulator but to model resp. the changemanipulator. btw, the table we´re talking about is extending the user model, it´s a one-to-one relation - but I guess that shouldn´t be the problem. i just reinstalled the whole project, generated all the

Re: settings.py help please

2006-09-21 Thread zehi
Still not successfull When trying to install MySQLdb I'm getting this error: zehi:~/Desktop/MySQL-python-1.2.1_p2 zehi$ python setup.py build sh: line 1: mysql_config: command not found sh: line 1: mysql_config: command not found sh: line 1: mysql_config: command not found sh: line 1:

Re: seeking clarification: custom manipulator foreign key / many-to-many

2006-09-21 Thread Ivan Sagalaev
patrickk wrote: > are there any workarounds? > I´m still not able to save and retrieve the m2m-data. and since I > have to meet a deadline I´m getting kind of nervous. In your view code you use flatten_data() but I can't see it defined in your custom manipulator. This must raise an exception

Sample code for progress bar using patch 2070?

2006-09-21 Thread jacobm
Would anyone be willing to share the important bits of code required to use the progress bar included in UploadProgress.js from the 2070 patch? I've never done anything with ajax before and am a little lost on how this is supposed to work. Thanks! Jacob

Re: ManytoMany uploading.

2006-09-21 Thread Gabriel Puliatti
On 9/21/06, Gabriel Puliatti <[EMAIL PROTECTED]> wrote: > Hm, I used that. I can print new_data.getlist('courses') and get the > list, but when I try to assign it to a variable for writing, I get > "'str' object has no attribute '_get_pk_val'" > > However, this only happens when I do

Best way to run dev and production site concurrently on same server? (take 2)

2006-09-21 Thread argus
Found this thread on the same topic http://groups.google.com/group/django-users/browse_frm/thread/7a2d69fa8748ba68 ..but it got closed. I want to do the same things as the OP in that thread: > I've recently completed a first milestone of a project and want to > publish it. I've got two URLs:

Re: Handling 404

2006-09-21 Thread Filipe
Let me refrase this. When having DEBUG = True in settings.py I'm getting django's nice 404 error pages. However, when I switched DEBUG to False I started getting the above traceback. I was expecting to start getting the contents of the 404.html template I wrote. What am I missing? regards,

Django Security

2006-09-21 Thread Tyson Tate
I'm preparing to make a case for switching many of my library's stupendously fugly JSP applications to Django. There are many selling points to Django (ease of use, speed, etc.) However, there's one point that I'd like more information on: Security. Although I know that Django has a great

Re: threadlocals with limit_choices_to in models

2006-09-21 Thread ibson
:| Apologiz for saying it worked!!! It doesn't work after some times even after restarting apache every 15 minutes!!! So the question is always there. And it seems I am not the only to hav this problem --~--~-~--~~~---~--~~ You received this message because you

Re: seeking clarification: custom manipulator foreign key / many-to-many

2006-09-21 Thread patrickk
thanks for your help (especially ivan). are there any workarounds? I´m still not able to save and retrieve the m2m-data. and since I have to meet a deadline I´m getting kind of nervous. thanks, patrick Am 21.09.2006 um 16:52 schrieb Ivan Sagalaev: > > Aidas Bendoraitis wrote: >> Has your

Re: variable multiple filter question

2006-09-21 Thread Luis P. Mendes
DavidA escreveu: > You build up a dynamic "and" query with a term for each checked box in > the UI. Then you use that compound query to filter your model objects. > > Now that I think about it, since this is an "and" you could also do: > > def my_view(request): > query = {} > for i

Re: Problem with patch 2070

2006-09-21 Thread [EMAIL PROTECTED]
Problem verified. It may be that the file is parsed as text and not a file somehow. So fieldstorage does not make a temporary file. Got no solution so far. :| --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: way to tell admin *not* to display a model?

2006-09-21 Thread Rob Hudson
That gives me an error in the admin: (1054, "Unknown column 'page_text._order' in 'order clause'") My case is almost identical to the example in the documentation: class Text(models.Model): page = models.ForeignKey(Page, db_index=True, edit_inline=models.STACKED) # ... class Meta:

Re: Python 2.5 anyone

2006-09-21 Thread Waylan Limberg
On 9/20/06, John DeRosa <[EMAIL PROTECTED]> wrote: [snip] > > It seems a little screwy for a file in a directory called "sqlite3" to > do an import from "pysqlite2". But that's what it does. > What you need to realize is that "sqlite" refers to the database, while "pysqlite" are the python

Re: settings.py help please

2006-09-21 Thread Beau Hartshorne
On 21-Sep-06, at 6:28 AM, zehi wrote: > Not sure how to install MySQLdb . for OS X 10.4 > > I am following "Installing Django on Mac OS > X" word by word, but still can't get things run. > > Somebody have some experience? Hi zehi, Bob Ippolito built an OS X package for MySQLdb. You can get it

Re: seeking clarification: custom manipulator foreign key / many-to-many

2006-09-21 Thread Ivan Sagalaev
Aidas Bendoraitis wrote: > Has your Music model a __str__ method? Maybe you get nothing using {{ > form.music }} because it is represented in no way. In fact {{ form.music }} has nothing to do with the model itself. It's a manipulator's field and should be represented as a group of

Re: settings.py help please

2006-09-21 Thread Jay Parlar
On 9/21/06, zehi <[EMAIL PROTECTED]> wrote: > > Thank you guys, > > Last login: Thu Sep 21 13:33:04 on ttyp1 > Welcome to Darwin! > zehi:~ zehi$ python > Python 2.4.3 (#1, Mar 30 2006, 11:02:15) > [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin > Type "help", "copyright", "credits" or

Re: seeking clarification: custom manipulator foreign key / many-to-many

2006-09-21 Thread Aidas Bendoraitis
Has your Music model a __str__ method? Maybe you get nothing using {{ form.music }} because it is represented in no way. Have you tried {{ form.music.title }} or similar? As far as I know, instance.music_id refers to the id of the related object whereas instance.music refers to the object itself.

Re: ManytoMany uploading.

2006-09-21 Thread Gabriel Puliatti
On 9/21/06, Aidas Bendoraitis <[EMAIL PROTECTED]> wrote: > courses = new_data.getlist('courses') Hm, I used that. I can print new_data.getlist('courses') and get the list, but when I try to assign it to a variable for writing, I get "'str' object has no attribute '_get_pk_val'" However, this

Re: settings.py help please

2006-09-21 Thread zehi
Thank you guys, Last login: Thu Sep 21 13:33:04 on ttyp1 Welcome to Darwin! zehi:~ zehi$ python Python 2.4.3 (#1, Mar 30 2006, 11:02:15) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import MySQLdb Traceback

Re: settings.py help please

2006-09-21 Thread Holger Schurig
> raise ImproperlyConfigured, "Error loading MySQLdb module: > %s" % e django.core.exceptions.ImproperlyConfigured: Error > loading MySQLdb module: No module named MySQLdb Your python installation lacks the python-module name 'MySQLdb' to access MySQL databases. If you were on Debian, you

Re: ManytoMany uploading.

2006-09-21 Thread Aidas Bendoraitis
Hello Gabriel, Instead of courses = new_data['courses'] use courses = new_data.getlist('courses') The "courses" is not a string, but a class similar to a list type (I don't remember the name of that class). The last item of that list is the representation of that class. Therefore, you see 2 if

Re: settings.py help please

2006-09-21 Thread Malcolm Tredinnick
On Thu, 2006-09-21 at 11:47 +, zehi wrote: > Hi, > > I am Django newbee as well as getting familiar with MySQL and Python > itself. I use OS X 10.4 and I amtrying to follow Django tutorial. I am > testing everything on Django testing server. > > I have a problem with settings.py. Django is

Re: ManytoMany uploading.

2006-09-21 Thread Malcolm Tredinnick
On Thu, 2006-09-21 at 06:42 -0500, Gabriel Puliatti wrote: > On Thu, 2006-09-21 at 06:30 +, pflouret wrote: > > try this: > > > > new_profile = UserProfile(user=new_user, permissions=permissions) > > new_profile.save() > > new_profile.courses = courses > > new_profile.save() > > Tried that.

Re: settings.py help please

2006-09-21 Thread zehi
And here is how looks settings before running syncdb.py zehi:~/mysite zehi$ vi settings.py # 'django.template.loaders.eggs.load_template_source', ) MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',

settings.py help please

2006-09-21 Thread zehi
Hi, I am Django newbee as well as getting familiar with MySQL and Python itself. I use OS X 10.4 and I amtrying to follow Django tutorial. I am testing everything on Django testing server. I have a problem with settings.py. Django is installed properly, I guess. When di import django I have no

Re: Problem accessing users and groups in Admin

2006-09-21 Thread Jaanus
> error" (status code 500) is the right error to be returning here. Don't > worry about that; it's doing the right thing. well yeah.. from my POV the "right" thing would be to not show these errors at all and rather work as expected :( --~--~-~--~~~---~--~~ You

Re: ManytoMany uploading.

2006-09-21 Thread Gabriel Puliatti
On Thu, 2006-09-21 at 06:30 +, pflouret wrote: > try this: > > new_profile = UserProfile(user=new_user, permissions=permissions) > new_profile.save() > new_profile.courses = courses > new_profile.save() Tried that. Failed with "'str' object has no attribute '_get_pk_val'". -- No violence,

Re: Python 2.5 anyone

2006-09-21 Thread John Morton
On Thursday 21 September 2006 05:44, John DeRosa wrote: > Oliver Andrich wrote: > > Hi, > > > > I am running Django 0.95 . And so far I can't see any problems. > > How'd you do it? > > I'm on Windows XP. I installed Python 2.5 from python.org without a > problem. > > But then I found

Re: DNS Change when moving site from PHP to Django

2006-09-21 Thread Cam McVey
Also, you could setup things like "www2." and "media2." subdomains and point their DNS A records to the new site (and configure the new hosting account to handle them). On 9/21/06, keukaman <[EMAIL PROTECTED]> wrote: Thanks Ian. I continue to be impressed with this group and how helpfuleveryone

Re: Shared Hosting suggestion

2006-09-21 Thread Michael
You may check http://www.djangodomain.com as well. --~--~-~--~~~---~--~~ 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

mod_python's request.META["SERVER_PORT"] small bug

2006-09-21 Thread skink
Seems I have found small bug in core/handlers/modpython.py. Namely request.META["SERVER_PORT"] under apache is always set to 0. This is because its set to self._req.server.port in modpython.py line 88. mod_python's docs say

Re: ManytoMany uploading.

2006-09-21 Thread pflouret
try this: new_profile = UserProfile(user=new_user, permissions=permissions) new_profile.save() new_profile.courses = courses new_profile.save() cheers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Python 2.5 anyone

2006-09-21 Thread Vladimir Cambur
I was trying to install django and setup.py said that it cannot fetch setuptools from cheeseshop. and indeed there was no setuptools in http://cheeseshop.python.org/packages/2.5/s/. (It's there right now :) ) After googling a little bit I saw some posts about something incompatible between

ManytoMany uploading.

2006-09-21 Thread Gabriel Puliatti
Hey, I'm trying to write a manytomany into the database. I have created the form correctly, using {{ form.courses }}, and I can upload everything. The problem comes when writing the data to the database. I take the field as following: courses = new_data['courses'] And then to write it,

Test-Mail

2006-09-21 Thread Timothy Kesten
Hi Folks, sorry for this mail but I 've been getting no any Mail on this list since end of august. That's why I try this. Sorry Timothy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To