Re: ANN: Django 1.3 release candidate available

2011-03-03 Thread sebastien piquemal
Oh ... actually, I just deleted the django folder from `dist-packages` and ran again `setup.py`, and now it works. On Mar 4, 9:18 am, sebastien piquemal wrote: > Great ! > > > > However, I don't know if it is me, but I just installed it, tried to > start my development server, and I got : >

Re: ANN: Django 1.3 release candidate available

2011-03-03 Thread sebastien piquemal
Great ! However, I don't know if it is me, but I just installed it, tried to start my development server, and I got : File "manage.py", line 14, in execute_manager(settings) File "/usr/local/lib/python2.6/dist-packages/django/core/management/ __init__.py", line 438, in execute_mana

adding model_dict['admin'] = model_admin is good idea?

2011-03-03 Thread hdknr
Hello, I'm customizing admin UI to add extra menus but I found it is not easy. So thinking of adding "admin" to model_dict in index() and app_index() ( source:django/trunk/django/contrib/admin/sites.py ) to refere to ModeAdmin objects in templates. Is there any pitfall in the security point of vie

ANN: Django 1.3 release candidate available

2011-03-03 Thread James Bennett
Tonight we're proud to announce the first release candidate for Django 1.3; if all goes well, the final release will happen in about a week. Details for the release candidate are available on the official Django weblog: http://www.djangoproject.com/weblog/2011/mar/03/13-rc/ -- "Bureaucrat Conr

django 1.2 + Google app engine + templatetags

2011-03-03 Thread Niklasro
Hi I run django 1.2 with GAE and I'm trying to get templatetags working and I keep getting the following error: 'rss' is not a valid tag library: Could you tell what's up with this? The django snippet I tried yo add is http://djangosnippets.org/snippets/311/ and I added the feedparser dependency. A

Re: db_index=True doesn't create index

2011-03-03 Thread Dario Bertini
On Mar 2, 12:15 am, Łukasz Rekucki wrote: > Seehttp://code.djangoproject.com/ticket/14651 > > Also, from PostgreSQL's docs: > > One should, however, be aware that there's no need to manually create > indexes on unique columns; doing so would just duplicate the > automatically-created index. > > So

Re: Django Donations App

2011-03-03 Thread Venkatraman S
On Sat, Feb 26, 2011 at 5:20 AM, Francisco Ceruti < francisco.cer...@gmail.com> wrote: > A few months ago I successfully used this app > https://github.com/johnboxall/django-paypal > > I hope this can help you :) > > @Francisco : can you elaborate or probably write a HOWTO on this app? I tried in

Re: Form/view for ManyToMany relationship

2011-03-03 Thread kgardenia42
On Thu, Mar 3, 2011 at 11:50 AM, werefr0g wrote: > Hello, > > Sorry if I misunderstand, but what is wrong about using a ModelForm on your > Film bounded to the film instance? When I tried that I kept running into this error: "Cannot set values on a ManyToManyField which specifies an intermediar

Re: Unable to process my form

2011-03-03 Thread Silvio
You don't want to pass an absolute path to render_to_response. You want to pass a relative path. Right now you're passing '/home/prvr/ Desktop/djcode/mysite/books/search_form.html'. You want something along the lines of "books/search_form.html". Then in your settings.py file, be sure to add '/hom

Re: Need help with this basic query (annotate vs aggregate)

2011-03-03 Thread Steven Sacks
Also, I need to get back Playlist records (hence the select_releated()). -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-us

Unable to process my form

2011-03-03 Thread Vijay
Hi All, I am new to django.I am practicing Django using the book "The Definitive Guide to Django" by Jacob and Adrian.I have installed Django on Ubuntu.I tried to process HTML form as directed in that book,then i am getting the following error.Please suggest me a solution for this. Enviro

Re: Need help with this basic query (annotate vs aggregate)

2011-03-03 Thread Steven Sacks
If it helps, this is, I believe, somewhat equivalent SQL: SELECT playlist_id, tag, SUM(tag_count) score FROM playlist_tag WHERE tag like '%query%' GROUP BY playlist_id ORDER BY score DESC -- You received this message because you are subscribed to the Google Groups "Django users" group

Need help with this basic query (annotate vs aggregate)

2011-03-03 Thread Steven Sacks
Here is my model: class PlaylistTag(models.Model): playlist = models.ForeignKey(Playlist) tag = models.CharField(max_length=128) tag_count = models.PositiveIntegerField(default=1) The way this model works is simple. If you add a tag to a playlist, and the tag doesn't exist, the tag_c

Re: Server HTTP Client

2011-03-03 Thread Julian
Hmm, yeah I heard about that. I was hoping to get something in Python. So I'm can stay with one technology and language. On Mar 3, 2011, at 3:47 PM, Marwan Al-Sabbagh wrote: > mechanize is a very powerful library that can help you do this stuff. the > project page is at http://wwwsearch.sou

Re: Creating one model row from another model save method

2011-03-03 Thread werefr0g
Hello, You should substitute 'subgallery_set' to 'subGallery_set' (different in case) or specify a related_name [1] . Regards [1] http://docs.djangoproject.com/en/dev/topics/db/queries/#many-to-many-relationships -- You received this message because you are subscribed to the Google Groups

Re: Server HTTP Client

2011-03-03 Thread Ovnicraft
On Thu, Mar 3, 2011 at 1:59 PM, Julian wrote: > Hi, > > Is there anything on in Python or Django that can be used as a server > side HTTP Client. Something like HTTP Unit and jsdom from NodeJS. > > I recommend you use NodeJS. Regards, > I'm trying to log into some custom site and scrap the da

Re: Server HTTP Client

2011-03-03 Thread Marwan Al-Sabbagh
mechanize is a very powerful library that can help you do this stuff. the project page is at http://wwwsearch.sourceforge.net/mechanize . I've used it in my work place and it works quite well. cheers, Marwan On Thu, Mar 3, 2011 at 9:59 PM, Julian wrote: > Hi, > > Is there anything on in Python

Re: Form/view for ManyToMany relationship

2011-03-03 Thread werefr0g
Hello, Sorry if I misunderstand, but what is wrong about using a ModelForm on your Film bounded to the film instance? Regards -- 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.

Re: oAuth 2.0

2011-03-03 Thread Олег Корсак
actually I'm going to do both :) So first Client (consumer) needs to do this: consumer = oauth.Consumer(key=CONSUMER_KEY, secret=CONSUMER_SECRET) client = oauth.Client(consumer) data['resp'], data['content'] = client.request(REQUEST_TOKEN_URL, 'GET') - And then Server needs to

Server HTTP Client

2011-03-03 Thread Julian
Hi, Is there anything on in Python or Django that can be used as a server side HTTP Client. Something like HTTP Unit and jsdom from NodeJS. I'm trying to log into some custom site and scrap the data from them. It would be a plus if the client also support javascript. Thanks. Julian -- You r

Re: curious about model classes

2011-03-03 Thread bruno desthuilliers
On 3 mar, 19:05, Lorenzo Franceschini wrote: > On 03/03/2011 04:33 PM, bruno desthuilliers wrote: > I have a question about this point. > In one Django application I'm writing, I would like to programatically > add some attributes to a model instance when it's retrieved from the > database. > > I

How to group rows with same foreign key in change list table

2011-03-03 Thread hollando
I'm trying to group rows with same foreign key in admin site change list table maybe with same color or something like a sub table which ever is easier for implementation. Also I'm trying to do a button like "more info" and while hit the button, the table will be expand and show the foreign key ite

Re: JavaScript Parameter

2011-03-03 Thread Bill Freeman
Or if this is a static at page load array, render it in a tag in your template. On Thu, Mar 3, 2011 at 9:17 AM, urukay wrote: > Hi, > > what script do you mean, how does it look like? > > If you are using JQuery, just use JQuery's UI autocomplete to do the > same thing. > > Radovan > > On 3. Mar

Re: curious about model classes

2011-03-03 Thread Lorenzo Franceschini
On 03/03/2011 04:33 PM, bruno desthuilliers wrote: It has nothing to do with "looking cool" or anything like that. Using models.fields as class attributes in models class statement's body allow for the ORM to know what db fields and relations your table has - not what instance attributes a model

Re: oAuth 2.0

2011-03-03 Thread Mick
First are you trying to preform actions on the user's behalf on a thrid party site, or are you trying to authorize third parties to take an action on behalf of a user of your site? (are you a Client or a Server in this case?) if you are a Client you need to request a request_token for the servi

Re: What happened to django.db.models.query.CollectedObjects in 1.3?

2011-03-03 Thread Tom Evans
On Thu, Mar 3, 2011 at 5:15 PM, Bufke wrote: > I was playing around with 1.3 beta and svn and it looks like > django.db.models.query.CollectedObjects is just gone. I couldn't find > anything about it being removed does anyone know what happened to it? > I was using it as described http://djangosni

Override AdminAuthentication form for custom auth in Django Admin

2011-03-03 Thread Nick Serra
Hey everyone, thanks for looking. Running into a problem getting the Django Admin working with a custom auth system. Have everything working, but I cannot get the admin to use my custom auth app to login. I am not running a custom auth backend, but an entirely different auth app in my project. Bas

What happened to django.db.models.query.CollectedObjects in 1.3?

2011-03-03 Thread Bufke
I was playing around with 1.3 beta and svn and it looks like django.db.models.query.CollectedObjects is just gone. I couldn't find anything about it being removed does anyone know what happened to it? I was using it as described http://djangosnippets.org/snippets/1282/ -- You received this messag

Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-03 Thread Vladimir
Dear friends! Karen Tracey gave me great reference: http://www.google.com/url?sa=D&q=http://groups.google.com/group/django-users/msg/7fe07998db471693 There is reference to original work: http://victor-k-development.blogspot.com/2010/07/unicodedecodeerror-django.html Victor discovered a cause of thi

Re: problem with url

2011-03-03 Thread luca72
i have solved using: (r'^$', 'prova.test_sito.views.mostro_prima'), witout the ^ , for every address he show me the mostro_prima view Thanks Luca On 3 Mar, 17:24, Tom Evans wrote: > On Thu, Mar 3, 2011 at 4:00 PM, luca72 wrote: > > hello i have define this in the url: > > (r'^admin/', includ

GDAL_LIBRARY_PATH

2011-03-03 Thread Kevin
Hey All, I'm having a hell of a time getting GeoDjango working on Windows 7, and wondering if I could get a couple of pointers. With the newest FWTools, where should I be pointing GDAL_LIBRARY_PATH? My GDAL binaries would appear to be in C:\Program Files (x86)\FWTools2.4.7\bin. I have that dire

Re: problem with url

2011-03-03 Thread Tom Evans
On Thu, Mar 3, 2011 at 4:00 PM, luca72 wrote: > hello i have define this in the url: > (r'^admin/', include(admin.site.urls)), >    (r'^accounts/login/$', 'django.contrib.auth.views.login'), >    (r'^mostro_prima', 'prova.test_sito.views.mostro_prima'), >    (r'$', 'prova.test_sito.views.mostro_pr

Re: problem with url

2011-03-03 Thread Mike Ramirez
On Thursday, March 03, 2011 08:00:45 am luca72 wrote: > hello i have define this in the url: > (r'^admin/', include(admin.site.urls)), > (r'^accounts/login/$', 'django.contrib.auth.views.login'), > (r'^mostro_prima', 'prova.test_sito.views.mostro_prima'), > (r'$', 'prova.test_sito.views

problem with url

2011-03-03 Thread luca72
hello i have define this in the url: (r'^admin/', include(admin.site.urls)), (r'^accounts/login/$', 'django.contrib.auth.views.login'), (r'^mostro_prima', 'prova.test_sito.views.mostro_prima'), (r'$', 'prova.test_sito.views.mostro_prima'), (r'^inserisco/', 'prova.test_sito.views.ins

Re: curious about model classes

2011-03-03 Thread bruno desthuilliers
On 3 mar, 15:16, kost BebiX wrote: > Yes, that's more a Python problem, not specifically django. > > You would normally do: > > class User(models.Model): >     def __init__(self): >         name = ... > > but this looks not cool) That's why most of python libraries use > "declarative" syntax to d

Re: JavaScript Parameter

2011-03-03 Thread urukay
Hi, what script do you mean, how does it look like? If you are using JQuery, just use JQuery's UI autocomplete to do the same thing. Radovan On 3. Mar., 13:01 h., "Szabo, Patrick \(LNG-VIE\)" wrote: > Hi, > > I finally found a JavaScript that gives me autosuggest functionality for > a textfiel

logging in a user to more than one site

2011-03-03 Thread Benedict Verheyen
Hi, i have a problem with logging in a user to more than one site. SIte A and B are on the same subdomain. When a user visits site B, he is redirected to site A. Site A shows a login screen, checks the credentials with LDAP. After a succesful login, the user is redirected back to site B. However

Re: curious about model classes

2011-03-03 Thread kost BebiX
Yes, that's more a Python problem, not specifically django. You would normally do: class User(models.Model): def __init__(self): name = ... but this looks not cool) That's why most of python libraries use "declarative" syntax to describe models: class User(models.Model): name =

Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-03 Thread Karen Tracey
On Thu, Mar 3, 2011 at 8:57 AM, Perses Titan wrote: > In your case, most probably django crashs when it reads nonASCII > characters from DB. > > No. The posted traceback clearly shows where the error is occurring and it is nowhere in Django. As I posted earlier it looks like a bug in the Python l

Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-03 Thread Perses Titan
Hello! I got the same error when i tried to work with Cyrillic charset in Python. In my case it was pure Python problem. Here is good explanation why it happened: http://docs.python.org/howto/unicode.html and http://python.su/forum/viewtopic.php?pid=6476 (rus) In your case, most probably django

Re: What apps or snippets to use for Facebook and Twitter registration, login and posting?

2011-03-03 Thread Addy Yeow
For Twitter, https://github.com/joshthecoder/tweepy does the trick for me. On Thu, Mar 3, 2011 at 9:51 PM, guyf wrote: > > > On Mar 2, 4:28 pm, Rodrigo Cea wrote: >> I am developing a site that I want to link with Facebook and Twitter. >> >> So as to not reinvent the wheel, I'm looking for apps

Re: What apps or snippets to use for Facebook and Twitter registration, login and posting?

2011-03-03 Thread guyf
On Mar 2, 4:28 pm, Rodrigo Cea wrote: > I am developing a site that I want to link with Facebook and Twitter. > > So as to not reinvent the wheel, I'm looking for apps or snippets that can > help with this, specifically: > > 1) allow users to register and login with their Facebook and/or Twitter

Re: curious about model classes

2011-03-03 Thread Alex Hall
Thanks everyone. Looks like I have reading to do... On 3/3/11, bruno desthuilliers wrote: > > On 2 mar, 22:02, Alex Hall wrote: >> Hi all, >> Still working through that tutorial. I am just curious: why are none >> of the class variables called self.var, but rather just var? For >> example: >> im

Re: Override default django Registration email

2011-03-03 Thread pols
hai i need to send my activation_email.html template instead of activattion_email.txt.By default django sends only text emails as the activation mail.But i need to send this as html.so i need to override that email sending function.but i dont know how? -- You received this message because you a

Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-03 Thread Karen Tracey
On Thu, Mar 3, 2011 at 4:01 AM, Vladimir wrote: > 1. web browser does not give messages, in command line I see: > Traceback (most recent call last): > File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", > line 280, in run >self.result=application(self.environ, self.start_res

Re: Override default django Registration email

2011-03-03 Thread bruno desthuilliers
On 3 mar, 13:39, Kenneth Gonsalves wrote: > On Thu, 2011-03-03 at 00:36 -0800, pols wrote: > > Anyone knows how to override djangos default registration email.I > > need to alter it to sent as html email instead of text email.As i am a > > bigner of django help me with complete information > > cop

Re: Override default django Registration email

2011-03-03 Thread pols
On Mar 3, 1:36 pm, pols wrote: > hai >      Anyone knows how to override djangos default registration > email(activation email).I > need to alter it to sent as HTML email instead of TEXT email.ie i need to > send my activation_email.html template intead of default template > activation_emai.

Re: curious about model classes

2011-03-03 Thread bruno desthuilliers
On 2 mar, 22:02, Alex Hall wrote: > Hi all, > Still working through that tutorial. I am just curious: why are none > of the class variables called self.var, but rather just var? For > example: > import models > class Poll(models.Model): >  question=models.CharField(max_length=200) What you defi

Re: Override default django Registration email

2011-03-03 Thread Kenneth Gonsalves
On Thu, 2011-03-03 at 00:36 -0800, pols wrote: > Anyone knows how to override djangos default registration email.I > need to alter it to sent as html email instead of text email.As i am a > bigner of django help me with complete information > > copy the templates to a folder called registration

Re: Upgrade question

2011-03-03 Thread bruno desthuilliers
On 3 mar, 09:21, Niklasro wrote: > Hi dear group, could you comment on the following I'd very much > appreciate the knowledge: > > > > > Hi > > I got problems with escape displaying like junk when upgrading from > > django 0.96 to 1.2 with google app engine. > > The code is > > >     # let user ch

Override default django Registration email

2011-03-03 Thread pols
hai Anyone knows how to override djangos default registration email.I need to alter it to sent as html email instead of text email.As i am a bigner of django help me with complete information -- You received this message because you are subscribed to the Google Groups "Django users" group.

Upgrade question

2011-03-03 Thread Niklasro
Hi dear group, could you comment on the following I'd very much appreciate the knowledge: On Wed, Mar 2, 2011 at 11:50 PM, Niklasro wrote: > Hi > I got problems with escape displaying like junk when upgrading from > django 0.96 to 1.2 with google app engine. > The code is > > # let user choos

Form/view for ManyToMany relationship

2011-03-03 Thread kgardenia42
Hi list, Considering this schema (below) I'm trying to figure out how to create a ModelForm which links Actors to Films (all known actors in a multi- select widget). I can't seem to figure out how to do this in a way that ModelForm will do the heavy lifting. I would like to make a page (e.g. /fi

JavaScript Parameter

2011-03-03 Thread Szabo, Patrick (LNG-VIE)
Hi, I finally found a JavaScript that gives me autosuggest functionality for a textfield. Unfortunately this script uses a hard-coded array for the suggestions and of courese i want to use values from my database. Any idea how i could pass the javascript an array that contains all my values ?!

Re: UnicodeDecodeError: 'ASCII' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-03 Thread Vladimir
Thank You very much! It is set by default but there is no error message. Some days ago, when I had another problem, web browser showed messages. On 3 мар, 12:10, "Szabo, Patrick \(LNG-VIE\)" wrote: > If you want to see errors in the browser you might want to set "DEBUG = True" > in your setting

Re: curious about model classes

2011-03-03 Thread Stefano
self in not a keyword in python, is only a convention for the first parameter for bound method. It refers to the instance of the class so you cannot use in the class definition. You should read something about "bound" and "unbound" methods in python. Hope this help S. 2011/3/2 Alex Hall : > Hi

Re: UnicodeDecodeError: 'ASCII' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-03 Thread Vladimir
On 3 мар, 12:10, "Szabo, Patrick \(LNG-VIE\)" wrote: > If you want to see errors in the browser you might want to set "DEBUG = True" > in your settings.py > > Kind regards > > . . . . . . . . . . . . . . . . . . . . . . . . . . > Patrick Szabo >  XSLT Developer > LexisNexis > Marxergasse 25, 10

Re: oAuth 2.0

2011-03-03 Thread Олег Корсак
Yes. But I'm stuck with first step... As I understood - first of all I need to ask for request_token from my server. Done this. But what kind of token and how server needs to return? - Исходное сообщение - > In the README for python-oauth2 > (https://github.com/simplegeo/python-oauth2) t

Re: curious about model classes

2011-03-03 Thread Sam Lai
On 3 March 2011 08:02, Alex Hall wrote: > Hi all, > Still working through that tutorial. I am just curious: why are none > of the class variables called self.var, but rather just var? For > example: > import models > class Poll(models.Model): >  question=models.CharField(max_length=200) > > Should

AW: UnicodeDecodeError: 'ASCII' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-03 Thread Szabo, Patrick (LNG-VIE)
If you want to see errors in the browser you might want to set "DEBUG = True" in your settings.py Kind regards . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis Marxergasse 25, 1030 Wien mailto:patrick.sz...@lexisnexis.at Tel.: +43 (1) 534 52 - 1573

Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-03 Thread Vladimir
1. web browser does not give messages, in command line I see: Traceback (most recent call last): File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 280, in run self.result=application(self.environ, self.start_response) File "C:\Python27\lib\site-packages\django\core\serv

Re: What apps or snippets to use for Facebook and Twitter registration, login and posting?

2011-03-03 Thread Tomasz Zieliński
On 2 Mar, 18:30, Jason Culverhouse wrote: > On Mar 2, 2011, at 8:28 AM, Rodrigo Cea wrote: > > > I am developing a site that I want to link with Facebook and Twitter. > > https://github.com/flashingpumpkin/django-socialregistration(note the forks) > Personally I like django-socialregistration,