Re: PyDev users: how do you manage tabs?

2009-06-30 Thread Kenneth Gonsalves
On Wednesday 01 July 2009 11:12:05 Rex wrote: > I've been using PyDev to do my Django work and find it to be great. > However, my only gripe is that it's hard to keep track of tabs, since > they display only the (non-qualified) file name, which is a problem > given Django's very regular naming

PyDev users: how do you manage tabs?

2009-06-30 Thread Rex
Kind of a petty question: I've been using PyDev to do my Django work and find it to be great. However, my only gripe is that it's hard to keep track of tabs, since they display only the (non-qualified) file name, which is a problem given Django's very regular naming scheme. So for example I'll

Re: A suggestion for ManyToManyField Manager

2009-06-30 Thread khsing
The delete operation is operated in Admin interface. On Tue, Jun 30, 2009 at 4:18 PM, khsing wrote: > As we know, if we delete a Object that related with others, The others > will deleted together. If this relation is Foreign Key, it is okay, > but when this relation is

Re: email username and password displayed on trace back from smtp auth failure

2009-06-30 Thread Kenneth Gonsalves
On Wednesday 01 July 2009 10:39:38 Karen Tracey wrote: > I'm guessing, then, that you mean you could see the password in the > traceback local arguments? I don't think that's a bug, as I don't think > there's any attempt to hide/suppress "sensitive" information in the local > variable data. (In

Searching IntegerField

2009-06-30 Thread Harish
hi friends, I designed a model in django, which has a Integer field. When I include the integer field in the search_list, the searching is not working. I am using django 0.97 (when I gave 'django.VERSION' in python interpreter it gave me (0, 97, 'pre') ). the code is as follows class

Re: The select all checkbox for action in admin does not work with IE web browser.

2009-06-30 Thread khsing
yes, I have noticed, and I have close my ticket. thanks you. On Wed, Jul 1, 2009 at 10:56 AM, Karen Tracey wrote: > On Tue, Jun 30, 2009 at 3:45 AM, khsing wrote: >> >> I have test in IE 6/8, the select all checkbox does not work. But it >> can work

Re: email username and password displayed on trace back from smtp auth failure

2009-06-30 Thread Karen Tracey
On Wed, Jul 1, 2009 at 12:28 AM, Kenneth Gonsalves wrote: > > hi > > running django trunk. There was an smtp auth failure and since debug was on > there was a traceback. I notice in the traceback that the email username > and > password that are set in settings.py are

Re: postgres schemas and django admin

2009-06-30 Thread Unnamed_Hero
> > this only fails for admin? are the models being written to the database? Yes, it is. I have a database already filled with data. For fetching data I specify a class Meta with a db_name='"db_schema'.'db'" in my models. --~--~-~--~~~---~--~~ You received this

Re: Logout in Firefox but not in IE 6!

2009-06-30 Thread Kostas M
This is what I thought too, and for this I used in all of my templates the commands: but the problem persisted. Finally, the problem was fixed, after I found out that in my development site, I had not set the site name/domain correctly from the Admin Pages. This somehow was breaking the

email username and password displayed on trace back from smtp auth failure

2009-06-30 Thread Kenneth Gonsalves
hi running django trunk. There was an smtp auth failure and since debug was on there was a traceback. I notice in the traceback that the email username and password that are set in settings.py are disclosed. Is this a bug? -- regards kg http://lawgon.livejournal.com

Re: postgres schemas and django admin

2009-06-30 Thread Kenneth Gonsalves
On Wednesday 01 July 2009 09:42:47 Unnamed_Hero wrote: > How can I specify a postgres schema for admin site of my django > project? syncdb failed with "no schema specified for creating > objects" (error message translated form russion, I do not no exactly, > what this error look like in English).

postgres schemas and django admin

2009-06-30 Thread Unnamed_Hero
How can I specify a postgres schema for admin site of my django project? syncdb failed with "no schema specified for creating objects" (error message translated form russion, I do not no exactly, what this error look like in English). I'm using django 1.0.2, psycopg2, python 2.5.2, postgres

Re: marrying django to twitter

2009-06-30 Thread Kenneth Gonsalves
On Wednesday 01 July 2009 09:01:58 David Zhou wrote: > > has anyone succeeded in marrying django to twitter - that is broadcasting > > updates in the django db to twitter? I did see one post on the subject in > > the archives, but there was no information as to whether the operation > > was

Re: issue with django.views.generic.date_based.archive_index's date_list

2009-06-30 Thread Karen Tracey
On Tue, Jun 30, 2009 at 1:55 PM, Seth Buntin wrote: > > I'm having an issue with the date_based generic views archive_index. > I am expecting the context to return a date_list with datetime > instances of the years specified in my queryset. > > The problem is my queryset

Re: marrying django to twitter

2009-06-30 Thread David Zhou
On Tue, Jun 30, 2009 at 11:21 PM, Kenneth Gonsalves wrote: > > has anyone succeeded in marrying django to twitter - that is broadcasting > updates in the django db to twitter? I did see one post on the subject in the > archives, but there was no information as to whether

marrying django to twitter

2009-06-30 Thread Kenneth Gonsalves
hi, has anyone succeeded in marrying django to twitter - that is broadcasting updates in the django db to twitter? I did see one post on the subject in the archives, but there was no information as to whether the operation was successful. -- regards kg http://lawgon.livejournal.com

Re: The select all checkbox for action in admin does not work with IE web browser.

2009-06-30 Thread Karen Tracey
On Tue, Jun 30, 2009 at 3:45 AM, khsing wrote: > > I have test in IE 6/8, the select all checkbox does not work. But it > can work with Safari or Firefox. > > Django Version: 1.1-beta-1 > This was opened as a ticket and fixed a couple of months ago:

Re: sorting different in postgres than in sqlite

2009-06-30 Thread J
Thank you Tim, that worked perfectly in sqlite, and I imagine it will work well in postgres as well. My server is down right now, so I can't say for sure, but I will definitely try this out. Thanks again, J On Jun 30, 3:10 pm, Tim Chase wrote: > > Here's my

Re: Creating multiple objects at once

2009-06-30 Thread Gabriel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Christian escribió: > If there a way to create multiple objects at once without calling .save > () for each object. > > Editing 200 objects with .update() is much faster than doing the same > thing with .safe() and I'm searching for a similar way

Re: Trying to understand Django and Python from a C++ perspective

2009-06-30 Thread Lachlan Musicman
On Wed, Jul 1, 2009 at 06:02, zweb wrote: > > What book or resource would you recommend to learn advanced Python? > (other than python docs) "How to think like a computer scientist": http://www.greenteapress.com/thinkpython/ -- "I'm in IT and we generally know how to use

Re: startproject in Windows w/ Python 2.6.2

2009-06-30 Thread dartdog
You must use the command window (no gui clicking!!) cd/ to right directory and best to run cmd As admin if vista.. On Jun 30, 6:59 pm, Jasconius wrote: > I just got Python installed with Django... ran Django installer just > fine... > > Went to run  django-admin.py

Re: startproject in Windows w/ Python 2.6.2

2009-06-30 Thread dartdog
Don't know what the issue is but revision isn't one AFAIKT I've been able to get trunk running with Python 2.62 I'm still in start up mode myself but go back to tutorial and follow precisely... no shortcuts.. for what its worth! On Jun 30, 6:59 pm, Jasconius wrote: > I just

Creating multiple objects at once

2009-06-30 Thread Christian
If there a way to create multiple objects at once without calling .save () for each object. Editing 200 objects with .update() is much faster than doing the same thing with .safe() and I'm searching for a similar way to create new objects. --~--~-~--~~~---~--~~

startproject in Windows w/ Python 2.6.2

2009-06-30 Thread Jasconius
I just got Python installed with Django... ran Django installer just fine... Went to run django-admin.py startproject mysite Didn't work. Python claims a "syntax error" --- Django properly installed, I can do import django with no problem, but the script seems to be having an issue. I'm

Re: Creating users in fixtures

2009-06-30 Thread aa56280
Worked like a charm. Thanks, Alex. On Jun 30, 6:36 pm, Alex Gaynor wrote: > On Tue, Jun 30, 2009 at 6:32 PM, aa56280 wrote: > > > I'm trying to create a bunch of users in a initial_data.yaml fixture > > file. What should I be using for the Model? > >

Re: Creating users in fixtures

2009-06-30 Thread Alex Gaynor
On Tue, Jun 30, 2009 at 6:32 PM, aa56280 wrote: > > I'm trying to create a bunch of users in a initial_data.yaml fixture > file. What should I be using for the Model? > django.contrib.auth.user does not seem to be working. Django throws a > DeserializationError: Invalid model

Creating users in fixtures

2009-06-30 Thread aa56280
I'm trying to create a bunch of users in a initial_data.yaml fixture file. What should I be using for the Model? django.contrib.auth.user does not seem to be working. Django throws a DeserializationError: Invalid model identifier: 'django.contrib.auth.user' Any help would be greatly appreciated.

Re: Tutorial 2 - Template Dirs

2009-06-30 Thread Ben
Hey this might be a question I can answer - I'm a NKOTB too. The easiest way is to modify the "title" and "branding" blocks in the base_site.html file. This would change the name for the admin across the site, as far as I know. It should live in (in your case) /home/

Inline with Grouper

2009-06-30 Thread Ben
All - I've been struggling for a while trying to determine the Right Way to present a form with a tabular inline subform that's grouped using {% regroup %}. I've tried the following: 1) Write a custom view - this failed due to general lack of skill with Django. Because I wanted the admin

Apache Authentication for Embedded devices

2009-06-30 Thread system_matrix
Hello All, I am relatively new to the Django Apache world. We are working on a project, where we are making use of Django, Apache, Postgres and many more other technologies. The projects main working is as follows. 1. Different Embedded controllers collect some data and send it to the

Re: A problem about django apache mod_wsgi with oracle

2009-06-30 Thread Graham Dumpleton
On Jun 30, 6:55 pm, "arli...@gmail.com" wrote: > I can use the oracle with django admin runserver, > but when i use apche withmod_wsgi, apache error log : > ImproperlyConfigured: Error loading cx_Oracle module: DLL load failed: > What's wrong with it ? Please clarify

Re: Trying to understand Django and Python from a C++ perspective

2009-06-30 Thread zweb
What book or resource would you recommend to learn advanced Python? (other than python docs) On Jun 30, 7:49 am, James Bennett wrote: > On Mon, Jun 29, 2009 at 5:19 PM, Mark Jones wrote: > > What is the python Magic going on here to make this possible?

Re: A problem about django apache mod_wsgi with oracle

2009-06-30 Thread Ian Kelly
On Jun 30, 2:55 am, "arli...@gmail.com" wrote: > I can use the oracle with django admin runserver, > but when i use apche with mod_wsgi , apache error log : > ImproperlyConfigured: Error loading cx_Oracle module: DLL load failed: > What's wrong with it ? Make sure you're

Re: sorting different in postgres than in sqlite

2009-06-30 Thread Tim Chase
> Here's my query, (I'm using the stable release version of django, > otherwise I'd use "annotate" which I found is present in the > development version). > > contest = Participant.objects.extra(select={ >'contest_stats': """ > SELECT SUM(amt) > FROM

Re: sorting different in postgres than in sqlite

2009-06-30 Thread J
That's a good point. Thanks Jeff. The reason they are none, or have a null value, is because there are actually no related records in the related table. Two Tables: Participants (contains all potential participants) Data (contains actual participant activity) If there is a way to convert those

Re: Tutorial 2 - Template Dirs

2009-06-30 Thread Divesh Gidwani
Okay, I have experimented with this for sometime, but for some reason the site is still showing 'Django Administration' on top. I open it with Text/Edit and changed the name. What exact files from the Django directory should i copy to my project one. Thanks On Jun 30, 1:12 pm, Divesh Gidwani

issue with django.views.generic.date_based.archive_index's date_list

2009-06-30 Thread Seth Buntin
I'm having an issue with the date_based generic views archive_index. I am expecting the context to return a date_list with datetime instances of the years specified in my queryset. The problem is my queryset doesn't return what I am expecting. The queryset only has one instance and it has a

Re: What is the best way to add an API to a Django application?

2009-06-30 Thread geoffdege...@googlemail.com
HI Dave, I think django-piston does look good, but I don't think it helps in this scenario as I already have the xml web service setup, and the CMS app to integrate with? It's now a case of how to plug it in and not have the web app and web service using different business logic and validation.

Re: Tutorial 2 - Template Dirs

2009-06-30 Thread Ahmet Emre Aladağ
2009/6/30 Divesh Gidwani > > Now that I created the templates folder, should I take the base.html > and index.html files and paste them in this folder? Yes. You can put them there. > > That being done, how can I edit these files? Is there a particular > program to use?

Re: Tutorial 2 - Template Dirs

2009-06-30 Thread Divesh Gidwani
Now that I created the templates folder, should I take the base.html and index.html files and paste them in this folder? That being done, how can I edit these files? Is there a particular program to use? On Jun 30, 12:56 pm, Ahmet Emre Aladağ wrote: > On Tue, Jun 30, 2009

Re: Tutorial 2 - Template Dirs

2009-06-30 Thread Divesh Gidwani
Thanks for that. I'll try it now and see how that goes. On Jun 30, 12:56 pm, Ahmet Emre Aladağ wrote: > On Tue, Jun 30, 2009 at 7:36 PM, Divesh Gidwani wrote: > > > So I have had a pretty smooth transition so far, but am now stuck when > > at the end

Re: Tutorial 2 - Template Dirs

2009-06-30 Thread Ahmet Emre Aladağ
On Tue, Jun 30, 2009 at 7:36 PM, Divesh Gidwani wrote: > > So I have had a pretty smooth transition so far, but am now stuck when > at the end of tutorial 2, it asks to specify my directory of tempaltes > in the settings.py file under the template_dirs tuple. > > Where are

Re: What is the best way to add an API to a Django application?

2009-06-30 Thread Dave Walker
geoffdege...@googlemail.com wrote: > I am adding MetaWeblog API support to a Django CMS, and am not quite > sure how to layer the application. > > I am using django_xmlrpc, which allows me to map to parameterised > > Any other alternatives? > > What would be the best solution? > Hi Geoff, I

Re: Tutorial 2 - Template Dirs

2009-06-30 Thread Dhruv Adhia
Look for .html files, they are your templates and find out where they are then enter the whole path in template_dirs tuple. On Tue, Jun 30, 2009 at 9:36 AM, Divesh Gidwani wrote: > > So I have had a pretty smooth transition so far, but am now stuck when > at the end of

Re: Password-protecting PDF downloads?

2009-06-30 Thread djangou...@gmail.com
Pdf password protection can easily be defeated. Better to go with a permissions system. -- Sent from my Palm Pre bax...@gretschpages.com wrote: This is probably more of a python question, but here goes: Can anyone point me to a method of dynamically attaching a password to a PDF and protecting

Re: order by count of related object

2009-06-30 Thread graeme
This appears to be a new feature. Is there any way of doing this in 1.0? Other than dropping into SQL that is. Graeme On Jun 17, 8:04 pm, Alex Gaynor wrote: > On Wed, Jun 17, 2009 at 10:00 AM, R C wrote: > > > Thanks for your fast reply > > >

help with a small project

2009-06-30 Thread jordan
I have an idea for a project but I don't have enough time to do it myself. I'm hoping to find a django hacker looking for a small side project for some extra cash. - Ideally you are someone interested in startups who is shopping around for a

Tutorial 2 - Template Dirs

2009-06-30 Thread Divesh Gidwani
So I have had a pretty smooth transition so far, but am now stuck when at the end of tutorial 2, it asks to specify my directory of tempaltes in the settings.py file under the template_dirs tuple. Where are the templates i created stored? Sorry, Newbie at Django, but looking to help out in the

What is the best way to add an API to a Django application?

2009-06-30 Thread geoffdege...@googlemail.com
I am adding MetaWeblog API support to a Django CMS, and am not quite sure how to layer the application. I am using django_xmlrpc, which allows me to map to parameterised functions for each request. It is just a case of what level do I hook in calls to the django application from the service

Re: What do you think about here lambda function to configure TEMPLATE_DIRS with relatives values ?

2009-06-30 Thread Darryl Ross
Hi Stephane, I think it is a great idea. The lambda trick means I don't have to make any changes at all to switch between my development environment and production. A real life example from a current project: - from os.path import abspath, dirname, join APP_PATH = lambda *x:

Re: Trying to understand Django and Python from a C++ perspective

2009-06-30 Thread James Bennett
On Mon, Jun 29, 2009 at 5:19 PM, Mark Jones wrote: > What is the python Magic going on here to make this possible? So, you want to read up on how Python descriptors work. One application of a descriptor is the ability to create something which behaves like a "normal"

Re: Global objects

2009-06-30 Thread diogobaeder
Oh, man... got the bug, and it's even sillier than the previous... it was single-element tuple, but without the comma to mark it as a tuple, and not a string... :-( Sorry, sorry, sorry... a million sorries to you for taking your time, Alex... :-( Lesson learned: to program a lot more in Python,

Re: sorting different in postgres than in sqlite

2009-06-30 Thread Jeff FW
Any reason not to make the total 0 instead of None? Null in database (or None in Python) has a special meaning, and it doesn't always make sense to sort a list of (mostly) integers with some null values. -Jeff On Jun 30, 2:01 am, J wrote: > Hello, > > I developed an app

Re: What do you think about here lambda function to configure TEMPLATE_DIRS with relatives values ?

2009-06-30 Thread Michael
On Tue, Jun 30, 2009 at 7:54 AM, KLEIN Stéphane wrote: > > Sorry, I've some break line issue in my previous post. > This is my post cleaned. > > Hi, > > When I configuration my TEMPLATE_DIRS in settings.py file, I use ever > "here" or "here_cross" lambda function defined

Re: Trying to understand Django and Python from a C++ perspective

2009-06-30 Thread Jeff FW
You can actually do something like it fairly simply, by using the classmethod decorator, like so: class Thing: @classmethod def do_something(cls, some_arg): # do something with some_arg Then you could call it: Thing.do_something(3) Notice that you don't pass the "cls"

Re: Help using the django queries API to select columns from multiple tables

2009-06-30 Thread Daniel Roseman
On Jun 29, 11:25 am, Sam Walters wrote: > Hi Daniel > Thank you very much for your help. > The reasons why the foreign key is in the other table is because an event > can have multiple locations, its unusual however the Aviation industry has > an event which will fly from

Re: Template: Foreign Key

2009-06-30 Thread Kenneth Gonsalves
On Tuesday 30 June 2009 14:13:15 russelson wrote: > #models.py > > class House(models.Model): > name = models.CharField(blank=True, max_length=50) > > class People(models.Model): > name = models.CharField(blank=True, max_length=50) > house = models.ForegnKey(House) > > #views.py > def

Re: What do you think about here lambda function to configure TEMPLATE_DIRS with relatives values ?

2009-06-30 Thread KLEIN Stéphane
Sorry, I've some break line issue in my previous post. This is my post cleaned. Hi, When I configuration my TEMPLATE_DIRS in settings.py file, I use ever "here" or "here_cross" lambda function defined like this : :: import os here = lambda x:

django developer position in london

2009-06-30 Thread jaymzcd
Hi all, I'm a developer at u-dox.com, we run a number of sites such as spinemagazine.com & crookedtongues.com and have quite a few development jobs lined up and are now looking for a full time developer for interview. The job spec is below. If anyone is interested you can mail either myself

Template: Foreign Key

2009-06-30 Thread russelson
Hi, I'm new to django I have two models #models.py class House(models.Model): name = models.CharField(blank=True, max_length=50) class People(models.Model): name = models.CharField(blank=True, max_length=50) house = models.ForegnKey(House) #views.py def house_list(request):

What do you think about here lambda function to configure TEMPLATE_DIRS with relatives values ?

2009-06-30 Thread klein.steph...@gmail.com
Hi, When I configuration my TEMPLATE_DIRS in settings.py file, I use ever "here" or "here_cross" lambda function defined like this : :: import os here = lambda x: os.path.join(os.path.abspath(os.path.dirname (__file__)), x) here_cross = lambda x:

Using a dynamically created ImageField filename prior to save?

2009-06-30 Thread Andrew Turner
Hi, This is an issue which, I believe, is related to Ticket #10788 (http://code.djangoproject.com/ticket/10788). The following code snippet used to work with Django 1.0.2, but with the latest svn version the slug is not being set to the filename produced by get_path because, as I understand it,

Re: URL Patterns for URL Encoding Symbols

2009-06-30 Thread Ahmet Emre Aladağ
>     (r'^(?P[-0-9A-Za-z]+)/(?P[-_.0-9A-Za-zıİğĞüÜşŞöÖçÇ ] > +)/$', 'search_in_all_packages') > then >     (u'^(?P[-0-9A-Za-z]+)/(?P[-_.0-9A-Za-zıİğĞüÜşŞöÖçÇ ] > +)/$', 'search_in_all_packages').encode("utf-8") > > but none of them worked. [Typo: misplaced .encode("utf-8") in mail.] I managed

Re: Internationalization in django and search engine indexing

2009-06-30 Thread Olivier
I've integrated it and it seems to work fine. If people are interested in an example of localeurl, you can check www.spiderchallenge.com (just switch language at the bottom of the sidebar) We will see if google like it, it mights take some time but my sitemap.xml is ready ;) Thanks for the help,

Re: URL Patterns for URL Encoding Symbols

2009-06-30 Thread Ahmet Emre Aladağ
> > You need to replace the `\w` with something that will match the characters > > you > > want. If you want everything that `\w` matches plus spaces, you should use > > `[\w ]+` (note the space) instead of `\w+`. What about other unicode characters? Such as special characters in other

Re: Help using the django queries API to select columns from multiple tables

2009-06-30 Thread micval
Hi there, not sure if I understand your scenario correctly, but it seems to me, that Daniel might be right about the ForeignKey being in the Location as the wrong idea. If you need multiple locations for one Event, then there's ManyToManyField for that (or possibly two ForeignKey(Location)

calendar paging

2009-06-30 Thread nostradamnit
Hi all, I've implemented a simple calendar inclusion tag based on the django- calendar code at djangosnippets.com (http://www.djangosnippets.org/ snippets/129/). I've got it displaying in a sidebar, but I'm struggling with adding paging to it. I would like to add a link like "next month >>" at

A problem about django apache mod_wsgi with oracle

2009-06-30 Thread arli...@gmail.com
I can use the oracle with django admin runserver, but when i use apche with mod_wsgi , apache error log : ImproperlyConfigured: Error loading cx_Oracle module: DLL load failed: What's wrong with it ? --~--~-~--~~~---~--~~ You received this message because you are

Re: Django unicode model pickle problem

2009-06-30 Thread Tom Evans
On Mon, 2009-06-29 at 13:05 -0700, Danny Davidson wrote: > I wouldn't consider myself an expert with Unicdoe, but I do know that > pickle and cPickle use ASCII for serialization. If you have utf-8 > characters stored as attributes in the object you're pickling, that > could cause the codec

A suggestion for ManyToManyField Manager

2009-06-30 Thread khsing
As we know, if we delete a Object that related with others, The others will deleted together. If this relation is Foreign Key, it is okay, but when this relation is ManyToMany, the delete operation should only delete the relation not the related Objects. thanks. -- A man live in jail and want

The select all checkbox for action in admin does not work with IE web browser.

2009-06-30 Thread khsing
I have test in IE 6/8, the select all checkbox does not work. But it can work with Safari or Firefox. Django Version: 1.1-beta-1 -- A man live in jail and want to break. http://blog.khsing.net --~--~-~--~~~---~--~~ You received this message because you are

Re: Django 1.0.2 Thread safety

2009-06-30 Thread Thomas Guettler
Hi, I hit this bug some time ago, too. If you run SVN 1.0.X you get the bug fixes for free. Thomas Miles schrieb: > There should be a little warning in the 1.0.2 docs or on > http://code.djangoproject.com/wiki/DjangoSpecifications/Core/Threading > that it is *not* thread safe. > > I've hit

sorting different in postgres than in sqlite

2009-06-30 Thread J
Hello, I developed an app for an online contest. In this app, I requested a queryset with totals from a related table, and wanted to display the top ten participants. So, I sorted the queryset on the totals field, descending. Some participants didn't have any items, so the total for these was