Re: Customizing django admin

2010-08-08 Thread yangmin...@gmail.com
there are 2 ways you can do, both are very easy: 1st: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#custom-template-options 2nd: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-admin-templates On Aug 9, 10:18 am, vishy wrote: > Hi, > >

one inconsistent place between django document and source code.

2010-08-08 Thread yangmin...@gmail.com
Hi All, When I was reading django document, I also viewed the source code of the framework to help me understand, but I found one inconsistent place about urls attribute of Django's AdminSite object. # in djangoproject document, http://docs.djangoproject.com/en/dev/topics/http/urls/:

Re: Django on Mac OS X

2010-08-08 Thread Sam Lai
2010/8/9 Daniel França : > I tried to reinstall everything... installing python+postgres from ports > and I get the Symbol not found: _PQbackendPID error again from psycopg. > I guess the best solution is run Ubuntu on a virtual machine or my project > will be stuck

Re: Django on Mac OS X

2010-08-08 Thread Daniel França
I tried to reinstall everything... installing python+postgres from ports and I get the Symbol not found: _PQbackendPID error again from psycopg. I guess the best solution is run Ubuntu on a virtual machine or my project will be stuck forever. python+psycopg on mac just sux. 2010/8/8 Daniel

Re: manually add objects to a QuerySet

2010-08-08 Thread chefsmart
Since I already have the objects, I don't want to hit the database again. There are not just two but multiple objects, that's why I want to avoid unnecessary db calls. On Aug 8, 9:54 pm, akaariai wrote: > On 8 elo, 11:55, chefsmart wrote: > > > The

Re: Django on Mac OS X

2010-08-08 Thread Daniel França
tried, nothing :( I'm getting crazy with Mac OS, I think I'll go back to Linux :S On Sun, Aug 8, 2010 at 4:34 AM, Xavier Ordoquy wrote: > It won't work by commenting the timezone field since it has been created > with a non null constraint on your db. > Have you tried to

Customizing django admin

2010-08-08 Thread vishy
Hi, For a modeladmin,I need to show a custom template when user adds or edits.How can I go about implementing this functionality? thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

include(admin.site.urls)

2010-08-08 Thread Michael P. Soulier
Hi, I saw the deprecation warning on using admin.site.root in my urlconf for the admin site, so I moved to include(admin.site.urls) instead. Unfortunately after I logged-in, every click in the admin site took me nowhere (reloaded the same page). Any idea of what could cause that? I've moved back

Re: moving to django 1.2.1

2010-08-08 Thread Michael P. Soulier
On 08/08/10 Michael P. Soulier said: > I've picked-up Django 1.2 locally in a virtualenv for testing, and I'm > finding suddenly that I can't login to the admin site due to a CSRF error. Ah, found it. Somehow some firefox add-on disabled my accepting of cookies. The error I saw didn't mention

Re: moving to django 1.2.1

2010-08-08 Thread Michael P. Soulier
On 31/07/10 Russell Keith-Magee said: > * If you have an existing project, the introduction of CSRF > protection in Django 1.2 shouldn't pose any obstacle to upgrading. > CSRF protection is turned on by default in new projects, but you need > to manually turn it on for existing projects (i.e.,

Re: unexpected error with inline model

2010-08-08 Thread raj
> type object 'MeetingTalkInline' has no attribute 'date_hierarchy' date_hierarchy is an attribute expected to be with every 'normal' admin classes. Why do django tries to search it in your inline admin? Just because you have registered it as you do with normal admins. Usually, inlines are not to

Re: SQL generated for ManyToManyField is incorrect with Django 1.2.1

2010-08-08 Thread Russell Keith-Magee
On Mon, Aug 9, 2010 at 7:28 AM, Ersin Er wrote: > Hi, > > I was just trying the sample code from the Django Book 2nd Edition but > the generated SQL script for the Books models are not correct. > > The Model code: > > http://dpaste.com/226416/ > > The generated SQL script for

SQL generated for ManyToManyField is incorrect with Django 1.2.1

2010-08-08 Thread Ersin Er
Hi, I was just trying the sample code from the Django Book 2nd Edition but the generated SQL script for the Books models are not correct. The Model code: http://dpaste.com/226416/ The generated SQL script for sqlite: http://dpaste.com/226417/ What's missing in the generated script is

unexpected error with inline model

2010-08-08 Thread Michael P. Soulier
Hi, I'm trying to use inline models, and I've configured my admin.py like so. from django.contrib import admin from opag.main.models import Notice, Meeting, MeetingTalk class NoticeAdmin(admin.ModelAdmin): list_display = ('title', 'visible') list_display_links = ('title',) class

Re: Querying in a loop - cached results?

2010-08-08 Thread Nick Arnett
On Sun, Aug 8, 2010 at 3:09 PM, Karen Tracey wrote: > > Probably you are seeing the effects of the default transaction isolation >> level on MySQL/InnoDB, which is "repeatable read". See >> http://groups.google.com/group/django-users/browse_thread/thread/e25cec400598c06dfor

Re: Querying in a loop - cached results?

2010-08-08 Thread Nick Arnett
On Sun, Aug 8, 2010 at 11:52 AM, Daniel Roseman wrote: > > > Where is this query running - in a view, or an external script? And > how is the data being added to the db? In both cases -- adding data and analyzing -- it is an external script, using the Django ORM. Nick

Re: Querying in a loop - cached results?

2010-08-08 Thread Karen Tracey
On Sun, Aug 8, 2010 at 1:03 PM, Nick Arnett wrote: > I'm having a problem that I can't figure out from reading the docs. I have > a loop that runs the same query every five minutes, to see if there is new > data to process. However, it doesn't return the new data the

Re: How do I recover my password on the django website?

2010-08-08 Thread Karen Tracey
On Sun, Aug 8, 2010 at 1:29 PM, Roy Smith wrote: > I'm trying to submit a ticket to http://code.djangoproject.com/ and > need to login. I must have created an account long ago because it > says my email address is already in use, but I have long since > forgotten my username and

Django podcasting software?

2010-08-08 Thread Jorge Vargas
Hello, A couple of friends want to start a podcast and have come to me for the technical side. And I will like it to be python, because I don't want to go with podpress for that site. I will like to know if anyone has any good/bad experiences with http://github.com/jefftriplett/django-podcast ?

Re: Django interactive shell shows invalid datetime

2010-08-08 Thread Steve Holden
On 8/8/2010 3:19 PM, jai_python wrote: > Dear friends, > I am just wondering how comes django interactive shell shows > wrong datetime. I.e my system correct time (python shell) shows print > datetime.datetime.now() --> ``2010-08-09 00:44:33.439732`` and django > interactive shell shows

Django interactive shell shows invalid datetime

2010-08-08 Thread jai_python
Dear friends, I am just wondering how comes django interactive shell shows wrong datetime. I.e my system correct time (python shell) shows print datetime.datetime.now() --> ``2010-08-09 00:44:33.439732`` and django interactive shell shows wrong time print datetime.datetime.now()-->

Re: Replace Admin Site Foreign Key Field/Dropdown with Textbox?

2010-08-08 Thread vikalp sahni
You can also hide that field which inturn will not load it on page by using "fields" attribute in admin class for that particular model and specify all the fields required to be shown on change list page. Just omit the Foreign Key field in the "fields" list in case u don't need it in admin.

Re: Querying in a loop - cached results?

2010-08-08 Thread Daniel Roseman
On Aug 8, 6:03 pm, Nick Arnett wrote: > I'm having a problem that I can't figure out from reading the docs.  I have > a loop that runs the same query every five minutes, to see if there is new > data to process.  However, it doesn't return the new data the second and >

Re: Filtering and the letter å

2010-08-08 Thread Daniel Roseman
On Aug 8, 1:45 pm, finn wrote: > I am developing a web application for maintaining spellcheck > dictionaries. I have noticed that when I filter database records like > this: > >     words = Word.objects.filter(lemma='male') > > I'll also get 'måle' among the hits.

Re: Search Field on All Pages

2010-08-08 Thread kostia
Yes, somebody can use template tag, somebody content processor and the most intuitive solution is to use template inheritance, as was suggested. Thank you, Tim. Wish you good luck. I loved your musician web site. -- You received this message because you are subscribed to the Google Groups

How do I recover my password on the django website?

2010-08-08 Thread Roy Smith
I'm trying to submit a ticket to http://code.djangoproject.com/ and need to login. I must have created an account long ago because it says my email address is already in use, but I have long since forgotten my username and password. I don't see any mechanism to recover them. My apologies if

Issue with using subprocess.Popen inside a view

2010-08-08 Thread sdzk
Hi All, I am facing a problem with using subprocess.Popen inside my views. The program that I am trying to run using Popen, tries to talk to a device on the network providing input to various prompts coughed up by the device. Unfortunately, a response is being gobbled up somewhere causing the

Re: Search Field on All Pages

2010-08-08 Thread André Santos
What about creating a template_tag for the form? Is that a good way to add it to several templates? 2010/8/8 Roald de Vries > On Aug 8, 2010, at 2:04 PM, Tim Sawyer wrote: > >> What I do is to setup a search that works at /search/q=search_term, and >> then create a form on

Querying in a loop - cached results?

2010-08-08 Thread Nick Arnett
I'm having a problem that I can't figure out from reading the docs. I have a loop that runs the same query every five minutes, to see if there is new data to process. However, it doesn't return the new data the second and subsequent times it loops. It's something like this: while 1: data

Party Time at DjangoCon

2010-08-08 Thread Steve Holden
Thanks to our sponsors for this: http://djangocon.us/blog/2010/08/08/party-time-djangonauts/ regards Steve -- I'm no expert. "ex" == "has-been"; "spurt" == "drip under pressure" "expert" == "has-been drip under pressure". -- You received this message because you are subscribed to the

Re: manually add objects to a QuerySet

2010-08-08 Thread akaariai
On 8 elo, 11:55, chefsmart wrote: > The objects are coming from mutually exclusive querysets. I need to > pass a queryset of these objects to a function. "Or" the querysets together? In [2]: f1 = Foo1() In [3]: f1.save() In [4]: f2 = Foo1() In [5]: f2.save() In [6]:

Re: Search Field on All Pages

2010-08-08 Thread Tim Sawyer
On 08/08/10 14:48, kostia wrote: To continue, Tim, do you use haystack? I passed its beginning tutorial and configured with xapian through haystack-xapian module. Now I'm discovering the other haystack docs and api. Not everything is clear. For example I have a user with name Bob. When I type in

Re: Come on, share your django powered sites with others.//Fwd: A tornado powered site to show any project powered sites(open source)

2010-08-08 Thread shacker
On Aug 7, 9:50 pm, Stone Puzzle wrote: > Django powered sites list  http://django.poweredsites.org A much more complete database is at http://www.djangosites.org/ ./s -- You received this message because you are subscribed to the Google Groups "Django users" group. To

RE: Filtering and the letter å

2010-08-08 Thread Henrik Genssen
this depends on the charset of your database/table >reply to message: >date: 08.08.2010 07:45:06 >from: "finn" >to: "Django users" >subject: Filtering and the letter å > >I am developing a web application for maintaining spellcheck

Filtering and the letter å

2010-08-08 Thread finn
I am developing a web application for maintaining spellcheck dictionaries. I have noticed that when I filter database records like this: words = Word.objects.filter(lemma='male') I'll also get 'måle' among the hits. This is also the case for its uppercase counterpart, Å. However, I don't get

Re: Replace Admin Site Foreign Key Field/Dropdown with Textbox?

2010-08-08 Thread Martin Melin
On Sun, Aug 8, 2010 at 4:00 PM, sixpackistan wrote: > For foreign key fields in the Django Admin, the default display > element is a drop down list box containing all of the foreign key > items from the related model.  I have an asset tracking instance where > this drop down

Re: Search Field on All Pages

2010-08-08 Thread Roald de Vries
On Aug 8, 2010, at 2:04 PM, Tim Sawyer wrote: What I do is to setup a search that works at /search/q=search_term, and then create a form on each page that submits to /search. This form is in my top level site template. The /search/ url is part of a search application. There's an

Replace Admin Site Foreign Key Field/Dropdown with Textbox?

2010-08-08 Thread sixpackistan
For foreign key fields in the Django Admin, the default display element is a drop down list box containing all of the foreign key items from the related model. I have an asset tracking instance where this drop down box can contain hundreds of thousands of items and I am looking to not have the

Re: Search Field on All Pages

2010-08-08 Thread kostia
Also I will be happy if someone can explain the drill-down (faceting) or “More Like This” features. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this

Re: Search Field on All Pages

2010-08-08 Thread kostia
It seems the question is answered. To continue, Tim, do you use haystack? I passed its beginning tutorial and configured with xapian through haystack-xapian module. Now I'm discovering the other haystack docs and api. Not everything is clear. For example I have a user with name Bob. When I type

Re: Search Field on All Pages

2010-08-08 Thread Steve Holden
On 8/8/2010 5:41 AM, wchildsuk wrote: > Hi, > > I want a search field on all my pages and was wondering the best way > to do this. I could create a function and import it to every view but > this doesn't seem to follow the django DRY principles. > > I was wondering if anyone had any advice on

Re: Search Field on All Pages

2010-08-08 Thread Tim Sawyer
What I do is to setup a search that works at /search/q=search_term, and then create a form on each page that submits to /search. This form is in my top level site template. The /search/ url is part of a search application. There's an example of this working at

Search Field on All Pages

2010-08-08 Thread wchildsuk
Hi, I want a search field on all my pages and was wondering the best way to do this. I could create a function and import it to every view but this doesn't seem to follow the django DRY principles. I was wondering if anyone had any advice on how to best do this with django? Thank in advance

Re: manually add objects to a QuerySet

2010-08-08 Thread chefsmart
The objects are coming from mutually exclusive querysets. I need to pass a queryset of these objects to a function. On Aug 8, 1:25 pm, Masklinn wrote: > On 8 août 2010, at 06:15, chefsmart wrote: > > > I had asked this on stackoverflow, but I

Re: manually add objects to a QuerySet

2010-08-08 Thread Lakshman Prasad
You can't really add an object to queryset like that. If you don't want to generate a list in the view, you can chain the querysets chained_qs = chain(qs1,qs2) On Sun, Aug 8, 2010 at 9:45 AM, chefsmart wrote: > I had asked this on stackoverflow, but I guess I couldn't

Re: manually add objects to a QuerySet

2010-08-08 Thread Masklinn
On 8 août 2010, at 06:15, chefsmart wrote: > I had asked this on stackoverflow, but I guess I couldn't explain > myself clearly enough. I'll try to ask again here: > > Say I have two objects obj1 and obj2 of the same model (MyModel), now > I would like to add these

Re: Value Error in Pyfacebook

2010-08-08 Thread Fabian Ezequiel Gallina
2010/8/8 Pankaj Singh : > problem got solved > > 1292 if params.get('expires'): > 1293 self.session_key_expires = int(params['expires']) > > I've just changed it to: > > 1292 if params.get('expires'): > > 1293 try: > 1294

Re: Django on Mac OS X

2010-08-08 Thread Xavier Ordoquy
It won't work by commenting the timezone field since it has been created with a non null constraint on your db. Have you tried to get_or_create the account with timezone and language set to some value ? Regards, Xavier. Le 8 août 2010 à 04:09, Daniel França a écrit : > More information. >

unexpected programming error

2010-08-08 Thread Kenneth Gonsalves
hi, I have this code in a view: x = [(chld.id, chld.name) for chld in City.objects.all()] print x it works perfectly in the view and in the shell also But when I put it under __init__ in a form I get a programming error. The code is here: class Edituserform(forms.Form): """