Re: Python 2.5 anyone

2006-09-20 Thread John Morton
On Wed, 20 Sep 2006 07:53, James Bennett wrote: > On 9/19/06, Ramdas S <[EMAIL PROTECTED]> wrote: > > Is anyone running Django dev version on Python 2.5? Will it work or are > > there any issues? > > Python 2.5 doesn't break or remove anything, it just adds some new > features. So it should work j

Re: How to pass object *and* subobjects to FormWrapper?

2006-09-20 Thread patrickk
not sure if this will solve the problem, but according to the documentation you should use 1. manipulator = Place.ChangeManipulator(place_id) 2. place = manipulator.original_object 3. new_data = manipulator.flatten_data() nr. 3 has been changed in the docs recently: see http://www.djangoproject

[Snip]Convert all strings in data structure to unicode for simplejson

2006-09-20 Thread limodou
I'm developing some ajax application now, and I need use simplejson to serialize my data, but I found if the string in my data structure is not unicode encoded, simplejson just simple unicode it, but not use the default-encode to convert the string to unicode, so I write a simple function to conve

Re: How to pass object *and* subobjects to FormWrapper?

2006-09-20 Thread Sean Schertell
Thank Patrick but I'm using a *custom* manipulator so my manipulator doesn't have those attributes. Sean On Sep 20, 2006, at 4:39 PM, patrickk wrote: > > not sure if this will solve the problem, but according to the > documentation you should use > 1. manipulator = Place.ChangeManipulator(pl

Re: How to pass object *and* subobjects to FormWrapper?

2006-09-20 Thread patrickk
well, I might be wrong here, but the custom manipulator doesn´t have any data - it´s there for handling the custom form. to prefill the form you have to *get* the data and therefore you have to use a ChangeManipulator. patrick Am 20.09.2006 um 09:54 schrieb Sean Schertell: > > Thank Patric

Re: ATTENTION! Problem with FormWrapper! (WAS Strange problems with django (python related?))

2006-09-20 Thread Andrew Degtiariov
Hello again! Some details about problem: Here is method on my Manipulator class based on forms.Manipulator: def getForm(self, data, errors): form = forms.FormWrapper(self, data, errors) # There some debug output debug("Data is: " +repr(data)) for field in for

admin page doesn't show tables when models.py is in the project dir

2006-09-20 Thread Benedict Verheyen
Hi,i started a project and since i don't have any 'apps' for that project i decided toadd the models.py to the main project directory so next to settings.py.I added the main project directory to the INSTALLED_APPS in settings.py and python manage.py syncdb ran ok.The tables are made and via python

Django app development / deployment best practices

2006-09-20 Thread Lachlan Cannon
Hi everyone, I'm creating my own web development business at the moment, using Django, and I'm wondering how web developers out there are getting the best re usability out of their Django apps to save time. My current thinking is to keep one master set of all apps developed in SVN. Say a new

Re: [SOLVED] admin page doesn't show tables when models.py is in the project dir

2006-09-20 Thread Benedict Verheyen
Found it, i forgot to add this to the models:    class Admin:    passSolved now,Thanks,Benedict --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-use

Re: Non-unicode strings.

2006-09-20 Thread gabor
Malcolm Tredinnick wrote: > > Although I have not used non-ISO-8859-1 storage much at all, I know that > there are some people around who have been using it for a while now > quite successfully, so almost all of the problems are easily solvable > with current Django code. One day I hope to find t

Re: Django app development / deployment best practices

2006-09-20 Thread limodou
On 9/20/06, Lachlan Cannon <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > I'm creating my own web development business at the moment, using Django, and > I'm wondering how web developers out there are getting the best re usability > out > of their Django apps to save time. > > My current thinkin

Re: Django app development / deployment best practices

2006-09-20 Thread Kenneth Gonsalves
On 20-Sep-06, at 2:22 PM, Lachlan Cannon wrote: > Is this how current web developers using Django are working? How > can I improve > this, and what other tactics can I adopt to help me cut down on > unnecessary > duplication of work? take a look at this: http://svn.zyons.python-hosting.com

how do you name the 'main' app?

2006-09-20 Thread gabor
hi, i'm constantly facing the following naming-problem. let's say you are going to create a web gallery, because you need one. so you start with: django-admin.py startproject gallery and now, you want to do "./manage.py startapp ". but what should the app-name be? from a practical point o

Re: admin page doesn't show tables when models.py is in the project dir

2006-09-20 Thread Malcolm Tredinnick
On Wed, 2006-09-20 at 10:19 +0200, Benedict Verheyen wrote: > Hi, > > i started a project and since i don't have any 'apps' for that project > i decided to > add the models.py to the main project directory so next to > settings.py. > I added the main project directory to the INSTALLED_APPS in > s

Re: how do you name the 'main' app?

2006-09-20 Thread Kenneth Gonsalves
On 20-Sep-06, at 3:21 PM, gabor wrote: > so, how do you name your 'main' app in a django-project? i give a name related to the website -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ You received this message

Re: how do you name the 'main' app?

2006-09-20 Thread Flavio Curella
I call the project as the website (the domain or my client name), and the app just like what it is. startproject mydomain.com startapp blog --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To p

Re: ATTENTION! Problem with FormWrapper! (WAS Strange problems with django (python related?))

2006-09-20 Thread Andrew Degtiariov
Problem solved by dirty hack in my (custom) Manipulator class def getForm(self, data, errors): form = forms.FormWrapper(self, data, errors) # HACK! Refresh fields in both form.fields and form.manipulator.fields fields = {} for field in self.fields:

Re: how do you name the 'main' app?

2006-09-20 Thread Ivan Sagalaev
gabor wrote: > so, how do you name your 'main' app in a django-project? For me it depends on project's type. If a project is autonomous and serves one purpose then, yes, I call the main app 'main' and it could even be the only app in the project. If a project is multi-purpose and just powers a

Passing context information through a HttpResponseRedirect

2006-09-20 Thread Laundro
Hi, I would like to have a part of my webpage reserved for login information (a login form, and if a user has logged in succesfully, some information & options). Now, the login form is in the base.html template. base.html checks whether user info is known (by looking at session variables), if th

Akismet strikes again

2006-09-20 Thread Holger Schurig
I tried to remove the link Django API (Beta): Automatic generated API using epydoc from the WikiStart page. However, some SPAM protection tool called "Akismet" prevented me from doing this. For the record: the indicated site doesn't work. --~--~-~--~~~---~--~---

Re: how do you name the 'main' app?

2006-09-20 Thread Frankie Robertson
I generally call applications that are primarly database backed by the most important table's name unless another name is immediately more obvious. So if the site is a webcomic then call the app comics. If it is a song lyric website call it lyrics. Otherwise there shouldn't be a particular problem

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

2006-09-20 Thread va:patrick.kranzlmueller
for the last couple of hours, I´ve read all entries about custom manipulators but I´m still not able to get my stuff working. I probably just don´t see what´s wrong anymore: this is part of my MODEL: class UserProfile(models.Model): music = models.ManyToManyField(Music, blank=True, null=T

Re: Python 2.5 anyone

2006-09-20 Thread John DeRosa
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 that pysqlite Windows binaries for Python 2.5 don't exist, and neither does setuptoo

Re: Python 2.5 anyone

2006-09-20 Thread Vladimir Cambur
Hi, setuptools 0.6x does not work with python 2.5 try developement version of setuptools from python svn sandbox http://svn.python.org/projects/sandbox/trunk/setuptools/ Vladimir John DeRosa wrote: > Oliver Andrich wrote: >> Hi, >> >> I am running Django 0.95 . And so far I can't see any probl

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

2006-09-20 Thread Ivan Sagalaev
va:patrick.kranzlmueller wrote: > self.fields = ( > forms.CheckboxSelectMultipleField(field_name="music", > choices=MUSIC_CHOICES), > ... > ) I guess I know what is it... CheckboxSelectMultipleField worksinexplicably different from SelectMultipleField i

variable multiple filter question

2006-09-20 Thread Luis P. Mendes
Hi, I want to let a user of one application to be able to filter results in a complex way. There are twelve variables, all boolean, that can be used to perform these filters. In PostgreSQL, all data for these variables are thus saved as either True of False. There is no difficulty to apply in

Re: Re: Python 2.5 anyone

2006-09-20 Thread Oliver Andrich
Hi, On 9/20/06, John DeRosa <[EMAIL PROTECTED]> wrote: > 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 that pysqlite Windows binaries for Python 2.5 don't > exist, and neither does setuptools. Trying to install Django 0.

Re: Re: Python 2.5 anyone

2006-09-20 Thread Oliver Andrich
On 9/20/06, Vladimir Cambur <[EMAIL PROTECTED]> wrote: > setuptools 0.6x does not work with python 2.5 > try developement version of setuptools from python svn sandbox > http://svn.python.org/projects/sandbox/trunk/setuptools/ I downloaded the 0.6c2 ZIP File and installed it. No hint, that it is

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: seeking clarification: custom manipulator foreign key / many-to-many

2006-09-20 Thread patrickk
thanks. the data is sent now, but - how do I save the data in my custom manipulator, referring to: temp.set_music(data['music']) - how do I display the data (already in the database) on my site, ref. to: new_data = user_profile_manipulator.flatten_data() additionally: I don´t understand why I

Re: Problem accessing users and groups in Admin

2006-09-20 Thread Jaanus
Malcolm Tredinnick wrote: > > Which type of error are you seeing? Can you maybe paste the traceback > and the exception line? Are you seeing the same traceback as Luis posted > earlier in the thread? Yes. I am seeing exactly the same tracebacks as Luis. There are two kinds. When going to edit a

Re: Problem with patch 2070

2006-09-20 Thread [EMAIL PROTECTED]
Does this just happen with m3u, but no other filetype? jacobm wrote: > I just checked out at 3581, applied > 3581-streaming_uploads_and_uploadprogress_middleware_x_progress_id.diff > and am still getting the same behaviour. > > Thanks, > Jacob --~--~-~--~~~---~--~--

Re: Problem with patch 2070

2006-09-20 Thread jacobm
[EMAIL PROTECTED] wrote: > Does this just happen with m3u, but no other filetype? Yes, it just happens with m3u files. So far I have been able to reproduce the problem with every m3u file I upload while every other filetype I've uploaded so far has uploaded successfully. Thanks, Jacob --~--~-

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

2006-09-20 Thread Ivan Sagalaev
patrickk wrote: > thanks. the data is sent now, but > - how do I save the data in my custom manipulator, referring to: > temp.set_music(data['music']) It looks like 0.91 syntax. If you're using contemporary Django it should look like this: temp.music = Music.objects.filter(id__id=data['mus

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

2006-09-20 Thread Rob Hudson
I've got a few models that are foreign key models to my main model which is called "Page". In the Page model I want those foreign models editable inline and I want the inline model ordered by a certain key. So I added an inner class Admin to my foreign key models with the property "ordering". Bu

Re: Problem accessing users and groups in Admin

2006-09-20 Thread Jaanus
one more strange thing... this is what the Django server tells me about these requests. Note the 500 error code, not 404... [20/Sep/2006 22:33:34] "GET /admin/auth/user/3/ HTTP/1.1" 404 1688 [20/Sep/2006 22:35:00] "GET /admin/auth/user/add/ HTTP/1.1" 500 90930 [20/Sep/2006 22:35:01] "GET /admin/a

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

2006-09-20 Thread patrickk
Am 20.09.2006 um 21:40 schrieb Ivan Sagalaev: > > patrickk wrote: >> thanks. the data is sent now, but >> - how do I save the data in my custom manipulator, referring to: >> temp.set_music(data['music']) > > It looks like 0.91 syntax. If you're using contemporary Django it > should > look like

Re: Python 2.5 anyone

2006-09-20 Thread John DeRosa
Oliver Andrich wrote: > Hi, > > On 9/20/06, John DeRosa <[EMAIL PROTECTED]> wrote: >> 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 that pysqlite Windows binaries for Python 2.5 don't >> exist, and neither does setup

Partial-coverage apache auth?

2006-09-20 Thread frank
At the 11th hour before the new site is to go online, we are suddenly unsure that using clear-text passwords is adequate. Currently the web site has a few pages that will be readable by anyone. If someone wants to see more, or download content, they have to establish an account. This is free, t

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

2006-09-20 Thread James Punteney
Hi Rob, Have you tried using order_with_respect to? http://www.djangoproject.com/documentation/model_api/#order-with-respect-to I don't know if this will do what you want, as I haven't used it, but from the documentation it sounds pretty close to what you are looking for at least. --James On 9

Re: variable multiple filter question

2006-09-20 Thread DavidA
Luis P. Mendes wrote: > But if he chooses to apply five filters, there will have to be five > filter methods appended, or five key=values pairs as arguments. You can do something like this: from django.db.models import Q def my_view(request): query = Q() for i in range(1, 13):

Re: Re: Python 2.5 anyone

2006-09-20 Thread Oliver Andrich
Hi John, > The code in db\backends\sqlite3\base.py does this: > > > try: > from pysqlite2 import dbapi2 as Database > except ImportError, e: > from django.core.exceptions import ImproperlyConfigured > raise ImproperlyConfigured, "Error loading pysqlite2 module: %s" % e > -

Re: Re: Re: Python 2.5 anyone

2006-09-20 Thread James Bennett
On 9/20/06, Oliver Andrich <[EMAIL PROTECTED]> wrote: > For your own development environment this is more then okay in my > eyes. And I would even deploy with this small change. But this is > personal taste. :) Probably the best thing for us to do in trunk is what we already do with threading: tr

Re: Re: Re: Python 2.5 anyone

2006-09-20 Thread Oliver Andrich
On 9/20/06, James Bennett <[EMAIL PROTECTED]> wrote: On 9/20/06, Oliver Andrich <[EMAIL PROTECTED]> wrote:> For your own development environment this is more then okay in my> eyes. And I would even deploy with this small change. But this is > personal taste. :)Probably the best thing for us to do i

DNS Change when moving site from PHP to Django

2006-09-20 Thread keukaman
I have a project where I am going to redesign a PHP/MySQL site into Django/Postgres. The site will be moved from a shared environment to a new, shared environment. One area that I am not sure about is how to set up the new site before changing the DNS settings to point to the new hosting facilit

Re: variable multiple filter question

2006-09-20 Thread Adam Endicott
You don't have to write all the filter statements at once, you can add them incrementally. I usually do this kind of thing like: var1 = request.GET.get('var1', None) var2 = request.GET.get('var2', None) var3 = request.GET.get('var3', None) object_list = MyModel.objects.all() if var1: object_l

Re: Python 2.5 anyone

2006-09-20 Thread Yasushi Masuda
Yesterday I posted a small patch to do this, please refer ticket #2772 :) James Bennett wrote: > On 9/20/06, Oliver Andrich <[EMAIL PROTECTED]> wrote: > >> For your own development environment this is more then okay in my >> eyes. And I would even deploy with this small change. But this is >>

Re: variable multiple filter question

2006-09-20 Thread Malcolm Tredinnick
You've already had a couple of approaches suggested here, but I have a question... On Wed, 2006-09-20 at 19:18 +0100, Luis P. Mendes wrote: > Hi, > > I want to let a user of one application to be able to filter results in > a complex way. > > There are twelve variables, all boolean, that can be

Re: Partial-coverage apache auth?

2006-09-20 Thread Malcolm Tredinnick
On Wed, 2006-09-20 at 13:05 -0700, frank wrote: > At the 11th hour before the new site is to go online, we are suddenly > unsure that using clear-text passwords is adequate. > > Currently the web site has a few pages that will be readable by anyone. > If someone wants to see more, or download co

Re: DNS Change when moving site from PHP to Django

2006-09-20 Thread Ian Holsman
put a entry in your /etc/hosts (or the windows equivalent ) On 21/09/2006, at 8:03 AM, keukaman wrote: > > I have a project where I am going to redesign a PHP/MySQL site into > Django/Postgres. > > The site will be moved from a shared environment to a new, shared > environment. > > One area that

Re: Problem accessing users and groups in Admin

2006-09-20 Thread Malcolm Tredinnick
On Wed, 2006-09-20 at 12:47 -0700, Jaanus wrote: > one more strange thing... this is what the Django server tells me about > these requests. Note the 500 error code, not 404... > > [20/Sep/2006 22:33:34] "GET /admin/auth/user/3/ HTTP/1.1" 404 1688 > [20/Sep/2006 22:35:00] "GET /admin/auth/user/ad

Re: DNS Change when moving site from PHP to Django

2006-09-20 Thread keukaman
Thanks Ian. I continue to be impressed with this group and how helpful everyone is. Ian Holsman wrote: > put a entry in your /etc/hosts (or the windows equivalent ) > > On 21/09/2006, at 8:03 AM, keukaman wrote: > > > > > I have a project where I am going to redesign a PHP/MySQL site into > > Dj

Generic view and registers vs. Public users

2006-09-20 Thread John M
I Love django! I am trying to build a site that allows people to register to use the features of my site, or to just look around at what others have allowed them to look at. So, im using the built in User login stuff, and it's working great! What I want is this: 1. If youre a registerd user (

Re: Generic view and registers vs. Public users

2006-09-20 Thread Malcolm Tredinnick
Hi John, On Wed, 2006-09-20 at 21:26 -0700, John M wrote: [...] > Here's my problem, on my main page, id like to show the public sutff if > the user isn't logged in, or show the users own stuff if they are > logged in. > > Is this possible with generic views? I would love to use them since > th

Re: Generic view and registers vs. Public users

2006-09-20 Thread John M
Malcom, Thanks for the quick reply, I've printed out your stuff and will give it a go and let you know if it works for me. thank you! John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Test-Mail

2006-09-20 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 p

ManytoMany uploading.

2006-09-20 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,

Re: Python 2.5 anyone

2006-09-20 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 setup

Re: ManytoMany uploading.

2006-09-20 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 users"