Re: Can all of unicode be slugified?

2009-09-13 Thread James Bennett
On Sun, Sep 13, 2009 at 8:25 PM, W.P. McNeill wrote: > Is this expected behavior?  I can see some discussion on the web that > references unicode support for slugification, but I can't tell if that > unicode support works for any arbitrary unicode characters, or Django > has

Re: Problem with content type creation order and data recovery scheme

2009-09-04 Thread James Bennett
On Fri, Sep 4, 2009 at 7:35 AM, Joshua Russo wrote: > The reason I was looking at the dump data instead of a MySQL backup is > because it was more obvious to automate. I'm going to take a closer look at > the MySQL backup though. I run on PostgreSQL rather than MySQL, but

Re: Django scalability with files

2009-08-28 Thread James Bennett
On Thu, Aug 27, 2009 at 2:22 PM, Rafael Ferreira wrote: > The queue idea is a good one, and you can use Gearman to do that really > easily. Another, even simpler, way to handle this is to use some kind of > shared NFS mount for the storage. All things being equal, scaling a filer

Re: Return custom view depending on user

2009-08-26 Thread James Bennett
On Wed, Aug 26, 2009 at 9:43 AM, Sandra Django wrote: > I have a group, where all users that belongs to this groups only can access > to a form, and I want that when anyone is logged, go directly to that form, > not to Django view by default. How I can do it? Depending on

Re: Internationalization in commands (cron usage)

2009-08-26 Thread James Bennett
On Wed, Aug 26, 2009 at 4:03 AM, Tomáš Drenčák wrote: > I'd like to send mass email from custom command which will be called > by cron. Problem is that each email could be in different language. > How can I change actual language so ugettext and template rendering > will return

Re: Django templates have lexical scope!?

2009-08-25 Thread James Bennett
On Tue, Aug 25, 2009 at 9:26 PM, stevedegrace wrote: > I suppose this is easy enough to fix by doing the binding in the view > when the context is first constructed which would probably have been > easier in the first place, but now I'm curious and want to know what's >

Re: request.FILES empty... only with IE!

2009-08-24 Thread James Bennett
On Mon, Aug 24, 2009 at 5:07 AM, OnCEL wrote: > This is a form created dynamically in JS and it contains only a file > input and a submit button (also created dynamically). > The entire form creating code is: I would wonder whether security restrictions in the browser are

ANN: Django 0.96.5 released

2009-08-19 Thread James Bennett
Due to an issue with a misapplied patch in the recent Django 0.96.4 security release, tonight the Django project has issued Django 0.96.5. Full information is available here: http://www.djangoproject.com/weblog/2009/aug/19/bugfix/ Please note that this will be the *final* release in the Django

Re: Possible to use Django & MySQL with Python 2.6?

2009-08-17 Thread James Bennett
On Mon, Aug 17, 2009 at 10:20 AM, Streamweaver wrote: > It works fine for me with Python 2.6 on Linux (with the errors > mentioned above) .  Windows is a bit of a problem as the mysql-python > library doesn't yet support 2.6. Since this has come up several times in

Re: django template language issue

2009-08-17 Thread James Bennett
On Mon, Aug 17, 2009 at 5:39 AM, Adonis wrote: > My problem is that even if the 'projects' queryset is empty, it still > includes the projects.html > Is there another way to do it? Consult the documentation:

Re: Class Meta discovery

2009-08-16 Thread James Bennett
On Sun, Aug 16, 2009 at 10:14 PM, aa56280 wrote: > Not sure how well known this is but I thought I'd share seeing as how > it cost me a lot of time and I can't find any discussion of it: This is a well-known aspect of Python which is usually covered by any good introductory

Re: AUTH_PROFILE_MODULE in "Definitive Guide" Second Edition?

2009-08-11 Thread James Bennett
On Tue, Aug 11, 2009 at 7:16 PM, Watts Martin wrote: > I've noticed with some mild consternation that there's absolutely no > documentation for using AUTH_PROFILE_MODULE in the new edition of > _Definitive Guide to Django,_ nor is there any indication of something > else I

Re: How to get rid of the 'u'? Seems to be everyhere :)

2009-08-08 Thread James Bennett
On Sat, Aug 8, 2009 at 9:03 PM, strotos wrote: > In my update the "query" variable is added to the list myList, but a u > is appended which seams to be the url of the app, is there a way to > remove this u, or is there a better way to share data like a dict or > list between

Re: python md5

2009-08-06 Thread James Bennett
On Thu, Aug 6, 2009 at 7:20 PM, Kenneth Gonsalves wrote: > is it not deprecated? The documentation covers that question, too. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ You

Re: python md5

2009-08-06 Thread James Bennett
On Thu, Aug 6, 2009 at 1:16 PM, Asinox wrote: > Thanks Alex Gaynor :) is working :) It's very important to note that the documentation for this module would have given you the same information. In general, you should be doing your best to read and familiarize yourself with

Re: Django file upload. 'None'

2009-08-04 Thread James Bennett
On Tue, Aug 4, 2009 at 7:08 AM, Martje wrote: > This seem ok, since I only used field 3 and 1. But when I look at > request.FILES, I get: > > > > It shouldn't be empty, should it? If you've forgotten to set the 'enctype' attribute of the HTML element properly, you

ANN: Django 1.1 released!

2009-07-29 Thread James Bennett
Tonight we're extremely proud to announce the release of Django 1.1, the latest major milestone in Django's development. To learn about the new release: * Blog post: http://www.djangoproject.com/weblog/2009/jul/29/1-point-1/ * Release notes: http://docs.djangoproject.com/en/dev/releases/1.1/ *

ANN: Security updates released

2009-07-28 Thread James Bennett
Tonight the Django team has issued two releases related to a security issue reported to us. These releases are Django 1.0.3 and Django 0.96.4. Full information is available on the Django project weblog: http://www.djangoproject.com/weblog/2009/jul/28/security/ These releases are strongly

Re: Database connection closed after each request?

2009-07-26 Thread James Bennett
On Sun, Jul 26, 2009 at 9:17 PM, Amitay Dobo wrote: > So to sum up: I vote up connection pooling. Where do I sign up? On some other project's mailing list? Connection pooling doesn't belong in Django. I've outlined one reason for that above. Google a bit for things like

Re: Database connection closed after each request?

2009-07-24 Thread James Bennett
On Fri, Jul 24, 2009 at 7:55 PM, Glenn Maynard wrote: > There are lots of requests for ways to build specific types of > queries, too.  You can't really commit a QuerySet method for one thing > and then... So, let's walk through this logically. Suppose we start with a patch

Re: Database connection closed after each request?

2009-07-24 Thread James Bennett
On Fri, Jul 24, 2009 at 7:03 PM, Glenn Maynard wrote: > What I need is sensible, simple and faster, but since someone else > might want to turn it into something complex and unnecessary, it > shouldn't be done? While the specific thing you personally are asking for might not be

Re: Database connection closed after each request?

2009-07-24 Thread James Bennett
On Fri, Jul 24, 2009 at 1:31 AM, Glenn Maynard wrote: > I see no need for a complex connection pooling service.  You're making > this sound much more complicated than it is, resulting in people > needing to use configurations much more complicated than necessary. Except this is

Re: Database connection closed after each request?

2009-07-23 Thread James Bennett
On Thu, Jul 23, 2009 at 9:50 PM, Glenn Maynard wrote: > In this case, that's a terrible-performance-by-default approach. > (It's also not a default, but the only behavior, but I'll probably > submit a patch to add a setting for this if I don't hit any major > problems.) Please do

Django 1.1 release candidate now available

2009-07-21 Thread James Bennett
Hi folks! Tonight we've pushed out the Django 1.1 release candidate, which is hopefully the last stepping-stone to the final 1.1 release. If you'd like to try it out, here's where you'll want to look: * Download instructions: http://www.djangoproject.com/download/ * Release notes:

Re: django-registration .missing templates?

2009-07-20 Thread James Bennett
On Mon, Jul 20, 2009 at 9:10 AM, zayatzz wrote: > If you are going to test django registration, then remember, that it > sends info by email with activation key. I had to turn that off, > because i could not find free SMTP server and my ISP is blocking ports > used by

Re: model name ending with an 's'

2009-07-18 Thread James Bennett
Also, just as a general bit of style advice: the usual convention is that a model name should be the singular form. For more information, consult: http://docs.djangoproject.com/en/dev/internals/contributing/#coding-style http://www.python.org/dev/peps/pep-0008/ -- "Bureaucrat Conrad, you are

Re: passing request.user.id to a template tag

2009-07-16 Thread James Bennett
On Thu, Jul 16, 2009 at 11:01 PM, Kenneth Gonsalves wrote: > how do I pass request.user.id to a templatetag. if I do: > > {% get_menu request.user.id %} > > the string 'request..user.id' gets passed. You handle this by using the standard variable-resolution mechanism

Re: Fresh project, tests fail?

2009-07-12 Thread James Bennett
On Sun, Jul 12, 2009 at 6:17 AM, Tim Chase wrote: > I didn't notice anything in the testing docs[2] that warns about > this, and the tutorial adds django.contrib.admin but elides the > detail that omitting the admin (described as optional[3]) causes > test failure.

Re: Model methods remember parameters?

2009-07-08 Thread James Bennett
On Wed, Jul 8, 2009 at 5:04 PM, derefed wrote: > How is it that the method's local variables are being remembered? My > problem is solved by clearing the list at the end of the method, but > I'd like to know why it acts like this is the first place. This is a common thing

Re: Any way to save the output of a template filter to another variable?

2009-07-08 Thread James Bennett
On Wed, Jul 8, 2009 at 7:01 AM, Adam Stein wrote: > In my specific example, I would like to save the output value from the > 'length' template filter so that I can send it to the 'expr' tag (expr > is a tag that allows you to effectively execute python statements and > save

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: psycopyg setup error: no build_ext

2009-06-23 Thread James Bennett
On Tue, Jun 23, 2009 at 2:33 PM, James Martin wrote: > I was never able to get psycopg2 to compile on osx I recommend > using sqlite for development or another database.  If you must use > psycopg2, you may want to try to get it through something like >

Re: Extending Django User model using add_to_class()

2009-06-22 Thread James Bennett
On Mon, Jun 22, 2009 at 5:30 PM, pr wrote: > Yes, I know what you mean, but It's small project with one programmer. > I want to know about speed and stability in production mode above > rules of 'programming-tao' :-) Well, there's also the fact that: 1. Using a profile means

Re: Extending Django User model using add_to_class()

2009-06-22 Thread James Bennett
On Mon, Jun 22, 2009 at 4:01 PM, pr wrote: > Is it a good way to extend Django User model using add_to_class()? > I have to add only two extra fields to the User model and I think that > using Profile Model to do this is unnecessary. No, it's a very bad method. Consider what

Re: Permissions

2009-06-19 Thread James Bennett
On Fri, Jun 19, 2009 at 6:35 PM, poop wrote: > Basically, I have a small CMS/publishing web app I have been working > on for a few weeks.  It is coming together nicely (though getting > LaTeX to play nice took longer than I expected).  Anyway, there is a > notion of a

Re: Why why why not write a search module for Django user?

2009-06-19 Thread James Bennett
On Fri, Jun 19, 2009 at 6:49 PM, poop wrote: > It is not, but it is not much of a web application framework if it > doesn't already have a rich set of tools to work with. It does. Of course, your issue seems to be not that Django lacks certain tools, but that it doesn't

Re: IBM Dataservers backend support in Django application Framework.

2009-06-19 Thread James Bennett
> Feedback/Suggestions/Issues > > You can provide us feedback/suggestions, or report a bug/defect, or > ask for help by using any of the following channels: > 1. Mailing us at open...@us.ibm.com > 2. Opening a new issue at

Re: Weird URL problem

2009-06-12 Thread James Bennett
On Fri, Jun 12, 2009 at 7:07 PM, Kenneth Gonsalves wrote: > I always set it for VirtualHost - AFAIK the docs say to do so. No. The docs say to set it to the prefix under which the site is being served. If the site is located at the root of the server -- e.g., "/" -- then

Re: Problem with startproject

2009-06-02 Thread James Bennett
On Tue, Jun 2, 2009 at 12:46 PM, Technicalbard wrote: > The problem comes when I try to start the tutorial: > > mor...@morgan-laptop:~/www$ django-admin startproject mysite > Error: [Errno 13] Permission denied: '/home/morgan/www/mysite' Quoting the tutorial: "you may see

Re: de-facto tagging (was: When do snippets get into Django?)

2009-05-25 Thread James Bennett
On Mon, May 25, 2009 at 12:43 PM, martin f krafft wrote: > Look what I found! Check out the fifth point, labeled #1, top-most > annoyance with Python, in And? While I like it as much as the next guy, django-tagging, to take your example, is currently sitting at version

Re: Expert

2009-05-24 Thread James Bennett
On Sat, May 23, 2009 at 11:21 PM, Juan Hernandez wrote: > where could I download third party django apps?? Anyone who's doing proper application packaging and distribution will have listed their application on the Python Package Index and applied the Django framework

Re: please provide a html download of the doc

2009-05-23 Thread James Bennett
Constructive suggestions for improving the documentation system should go into tickets in Trac. Personal correspondence between participants should stay off-list. Thread should be over now, please. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct."

Re: perfomance question

2009-05-21 Thread James Bennett
On Thu, May 21, 2009 at 5:10 AM, Chris Withers wrote: > What was your solution in the end? I'm always interested this kind of > batching of results, and I'm very new to Django... The Django tutorial mentions this -- a Django QuerySet is "lazy", which means that it

Re: crossdomain.xml

2009-05-19 Thread James Bennett
On Tue, May 19, 2009 at 2:47 AM, Matt Davies wrote: > I've been asked to server up a crossdomain.xml file at the root of our web > sites so that another team of developers can access our data via Flash. > How do I set that up in the urls.py file?  I use one urls.py file for

Re: login decorator losing POST data

2009-05-15 Thread James Bennett
On Fri, May 15, 2009 at 1:55 PM, Tim Chase wrote: > One more option that occurs to me is that you can stash all of > the POSTed variables into a session-store with a hash key, > redirect with some sort of "load POST variables from this > hash-key" GET page, and

Re: Row level permission -- status?

2009-05-15 Thread James Bennett
On Fri, May 15, 2009 at 11:20 AM, gustavora...@gmail.com wrote: > Is there any other solution available that would allow row level > permission? The Django admin's ModelAdmin class, which you must subclass to provide an admin interface for your models, has methods

Re: Multiple 404.html pages

2009-05-14 Thread James Bennett
On Thu, May 14, 2009 at 10:56 PM, Lee Hinde wrote: > Because I would be using different base.html files, I'm wondering if > there is a work around to having a single 404.html file. For instance, > can I determine at run time where to find my base.html file? Write a view

Re: Can you add custom logic to the Admin page?

2009-05-11 Thread James Bennett
On Mon, May 11, 2009 at 6:28 PM, Margie wrote: > The answer is definitely yes.  However, some perserverance is required > to figure it out.  I recently found Jannis Leidel's web page (I > believe he is one of the django developers, but not sure about that) > and it

Re: How do I execute a python module within the context of a Django project?

2009-05-09 Thread James Bennett
On Sat, May 9, 2009 at 9:52 PM, Roberto Cea wrote: > Here's a fairly basic question: how do I execute an arbitrary python > module within the context of a given Django project, with access to > its models, etc.? Currently, I load it from a "manage.py shell" > session, but

Re: How to disable deletion af a model instance

2009-05-09 Thread James Bennett
On Sat, May 9, 2009 at 7:49 PM, George Song wrote: > I think if you want to know definitively if your `delete()` method is > being called or not, your debug statement should go in that method. I > wouldn't be surprised if Django is sending pre and post delete signals > even

Re: Run context processor conditionally?

2009-05-07 Thread James Bennett
On Thu, May 7, 2009 at 2:44 AM, Jani Tiainen wrote: > How you do that? Everywhere I look, documentation states that view is a > "function" (well there is few places where is mentioned "callable"). You may want to consult some Python documentation; writing a class whose

Re: Email CC List

2009-05-06 Thread James Bennett
On Wed, May 6, 2009 at 8:37 PM, matt barto wrote: > I am a novice django user, and I am curious why there is no ability to > send emails with a CC list?  If there is, how is this done?  The > current documentation only talks about a Bcc list which is not what I > want.

Re: How to deal with problem about ForeignKey

2009-04-29 Thread James Bennett
On Wed, Apr 29, 2009 at 3:59 AM, Daniel Roseman wrote: > You could try defining the foreign key with null=True. >    a = models.ForeignKey(A, null=True) Not really, since there's no support whatsoever for ON DELETE triggers in the ORM. -- "Bureaucrat Conrad,

Re: auth.contrib silently catching TypeError. Bug?

2009-04-27 Thread James Bennett
On Mon, Apr 27, 2009 at 10:49 PM, Tamas Szabo wrote: > I'm new to Python so I might not understand how keyword arguments work, BUT > you do assume that authenticate will always be called with keyword > arguments which isn't true. If you look at how

Re: What Postgresql driver does Django use? Async API?

2009-04-25 Thread James Bennett
On Sat, Apr 25, 2009 at 7:37 AM, Continuation wrote: > What Postgresql driver does Django use? This question is answered by Django's documentation, which covers the database adapter modules used by each of the built-in database backends. > And does it support the async

Re: Django DB strange behavior

2009-04-25 Thread James Bennett
On Sat, Apr 25, 2009 at 5:07 AM, Aaron Lee wrote: > So is there some InnoDB specific thing in Django that does some "smart" > caching? Unless you explicitly enable Django's caching system, and explicitly make use of it, Django does no caching of any sort whatsoever.

Re: how to handle database down time gracefully?

2009-04-24 Thread James Bennett
On Fri, Apr 24, 2009 at 7:51 AM, realfun wrote: > I build a website(fayaa.com) on Bluehost using Django, but this month > database down 3 times, during that period, user can only see an > "Unexpected Exception" message, is there a way to redirect to a 404 > page instead? If

Re: auth.contrib silently catching TypeError. Bug?

2009-04-22 Thread James Bennett
On Mon, Apr 20, 2009 at 4:20 AM, Tamas Szabo wrote: > As you can see the code catches and silently ignores all TypeError exceptions: > The problems with this approach are: >    - Why not fail as early as possible if one of the authentication > backends configured in

Re: Webpy vs Django [and how to ask questions the smart way]

2009-04-22 Thread James Bennett
On Wed, Apr 22, 2009 at 3:04 PM, Phil Mocek wrote: > That depends on how you look at things.  I've been referencing Eric S. > Raymond's essay, "How to Ask Questions the Smart Way" [2], on this list > recently, because I'm not used to such poorly-worded or lazy

Re: Authenication for django.views.generic Views

2009-04-17 Thread James Bennett
On Thu, Apr 16, 2009 at 3:04 PM, Col Wilson wrote: > Thanks all. I have some reading to do, but I have also noticed in the > meantime that generic views docs (http://docs.djangoproject.com/en/dev/ > ref/generic-views/#ref-generic-views) have a hook into the auth

Re: Random Syntax Errors on Download

2009-04-14 Thread James Bennett
On Tue, Apr 14, 2009 at 11:59 AM, AliasXNeo wrote: > The problem is intriguing, and I attempted to download and install the > official release 3 more times and then proceeded to get the latest > develepor release from SVN only to get the same exact problem. I'm > running

Re: How do you retrieve a username that is not in the URL?

2009-04-14 Thread James Bennett
On Tue, Apr 14, 2009 at 5:12 PM, stkpoi wrote: >    if form.is_valid(): >      submission = Submission.objects.get_or_create( >      title=form['title'], >      link=form['link'], >      user=request.user.username >      ) And right there's your problem. The value to put

Re: Question about administration

2009-04-12 Thread James Bennett
On Sun, Apr 12, 2009 at 9:31 PM, Joshua Williams wrote: > That was the nugget I was looking for.  I think that my use case falls > into the latter, which is currently not available.  Good news is, as > long as i only support 1 "working area" i should be ok. It's true that

Re: every time that I load a form page, i have to reload the page to make errors go away

2009-04-11 Thread James Bennett
On Sat, Apr 11, 2009 at 5:13 PM, codecowboy wrote: > I've followed some examples from around the Django community and that > is why I use the reverse() method at all.  What is the point of using > the reverse() method? Well, there's a problem you'll run into fairly often.

Re: trying to use the aggregate functions

2009-04-10 Thread James Bennett
On Fri, Apr 10, 2009 at 4:05 AM, chris wrote: > So I want to find out how many characters do occur in which edition > and I get the result as expected.  However, instead of the edition > objects, what I get back are the pk values of the edition. This is expected behavior;

Re: registration and profile must save at a time

2009-04-09 Thread James Bennett
On Thu, Apr 9, 2009 at 12:27 AM, Praveen wrote: > Thank you so much Malcolm but to display extra fields on sign up we > will have to customize the django.contric.auth.forms then that form is > generated from the user models i am so much confused whether i will >

Re: .96 Tutorial maxlength/max_length confusion.

2009-04-07 Thread James Bennett
On Tue, Apr 7, 2009 at 9:33 AM, garyrob wrote: > I'm doing the .96 tutorial because my company is using version 96.1 > for now. Well, first things first, you should upgrade both yourself and your company to 0.96.3, because there have been security updates in the 0.96 series. >

Re: What is the best way to extend the User Model

2009-04-04 Thread James Bennett
On Fri, Apr 3, 2009 at 1:17 PM, Dave Fowler wrote: > Great, thanks guys!  Just wanted to make sure I wasn't missing > anything. If some new 'official' method appeared, the documentation would update to reflect that:

Re: cannot import name ugettext

2009-03-23 Thread James Bennett
On Mon, Mar 23, 2009 at 4:43 AM, dbbarua wrote: > It works with Django-1.0 and gives me the site ...but some fields are > not enabled in the website...is that related to django or the rapidsms > code? I'd very strongly suggest that you contact the developers of the

Re: Installing Django for rapidsms

2009-03-21 Thread James Bennett
On Sat, Mar 21, 2009 at 2:07 PM, dbbarua wrote: > Hi , >    I am trying to use Django for rapidsms , i get the following error > when i run > r...@portable:/usr/local/rapidsms-dev/rapidsms/rapidsms# python > manage.py syncdb ...snip... > TypeError: __init__() got an

Re: Value proposition of Rails

2009-03-19 Thread James Bennett
On Thu, Mar 19, 2009 at 2:53 AM, Torsten Bronger wrote: > Okay, C.  Well, most of the library and framework stuff is missing > but I assume that this could be done, given that the financial > benefit is there.  But actually I still don't get your analogy. You

Re: Value proposition of Rails

2009-03-19 Thread James Bennett
On Thu, Mar 19, 2009 at 2:35 AM, Torsten Bronger wrote: > I think is *is* a nightmare to maintain.  At least, Jva and PHP play > in the same league of maintainability, whereas assembly is *far* > away from that. OK, then, why not write everything in C? Hard to get

Re: Value proposition of Rails

2009-03-19 Thread James Bennett
On Thu, Mar 19, 2009 at 2:17 AM, Torsten Bronger wrote: > I've always wondered why anybody uses something non-Java for Web > applications.  Given that Java is faster than PHP, Python etc., this > also means that you need less computing power in your server farm. >

Re: Sort of OT on the django book

2009-03-19 Thread James Bennett
On Thu, Mar 19, 2009 at 1:55 AM, Gour wrote: > Don't ask this question. I asked him on #django (several times), and > found out that such sort of inquiry is not very welcome ;) Well, what's not welcome is being asked the same question over and over again when the publication

Re: sandbox install of Django?

2009-03-18 Thread James Bennett
On Wed, Mar 18, 2009 at 3:00 PM, bob wrote: > Is there an option to install Django into a sandbox area, and if so, > would it work? Python's distutils module is configurable in a variety of ways, including where it puts the packages it installs. You can use either one-off

Re: Django-Registration help

2009-03-13 Thread James Bennett
On Fri, Mar 13, 2009 at 5:02 AM, Bastien wrote: > I will answer my own question since I found the answer, may be it can > help someone: Unfortunately you found the wrong answer; if you're making changes to the code that came with django-registration, you're doin' it

Re: rank newbie - working thru 2.0 Book- basic template Tags give 'syntax error' on {%

2009-03-10 Thread James Bennett
On Tue, Mar 10, 2009 at 1:58 PM, Jonquille wrote: > What am I missing please, and thank you. You're missing the idea that templates are not Python code and are not typed at a Python prompt -- they're placed in template files and templates are loaded and rendered according

Re: Does Django 1.1 support mulitple primary_key ?

2009-03-09 Thread James Bennett
On Mon, Mar 9, 2009 at 4:47 AM, K*K wrote: > Because the > requirements wrote all of database code should implemented with ORM > code and can not use RAW SQL, and the interactive designer do not want > to make concession. The person responsible for this decision should be

Re: continuously gathering feeds

2009-03-08 Thread James Bennett
On Sun, Mar 8, 2009 at 9:08 PM, adelevie wrote: > I am building an app that uses the python-twitter module (a python > library for twitter's api). I want to gather data from the public > timeline which is updated about every minute. I have a function that > given a feed will

Re: Why do some shared hosting providers support Django and others don't?

2009-03-02 Thread James Bennett
On Mon, Mar 2, 2009 at 6:25 PM, Wiiboy wrote: > I'm with a shared hosting company called Lunarpages.  They tell me > Django, by itself, even with Fast CGI, because it is a framework, is > too resource intensive for them to allow.  But many other shared > hosting providers

Re: Problems specifying fields for admin inline

2009-02-25 Thread James Bennett
On Thu, Feb 26, 2009 at 2:30 AM, jeff wrote: > Wow, that's much simpler. They should list that option on the admin > documentation page. Many thanks! http://docs.djangoproject.com/en/dev/ref/contrib/admin/#inlinemodeladmin-options "The InlineModelAdmin class is a subclass

Django 1.1 alpha 1 released

2009-02-23 Thread James Bennett
As we run up to Django 1.1 (due in April), we've started the process of alpha and beta preview packages with Django 1.1 alpha 1, released tonight. As always, alpha and beta packages are *not* for production use, but if you'd like to try out the new features or go bug-hunting in a safe

Re: broken url error in admin

2009-02-21 Thread James Bennett
On Sat, Feb 21, 2009 at 11:52 PM, Jlcarroll wrote: > What is the best way to fix this? What if someone wants to enter a > broken url in an admin page? What if the url isn't broken, just > requires a login? Please read the documentation for URLField, which explains how to

Re: 1.0 branch?

2009-02-17 Thread James Bennett
On Tue, Feb 17, 2009 at 11:54 PM, Lloyd Budd wrote: > Super minor suggestion, it looks like trunk is where 1.1 work is > happening, for maintaining my own project using 1.0 it might be handy > if there was django/branches/1.0/ . That way I could just do a check > out there

Re: Exceptions and SET client_encoding to 'UNICODE'

2009-02-14 Thread James Bennett
Everything is happening in a Postgres transaction; at the first error the transaction aborts and you must issue a ROLLBACK to the DB before continuing. Consult Django's transaction dogs for information on how to do this. On 2/14/09, 83...@gmx.de <83...@gmx.de> wrote: > > Hi Folks, > > I'd like

Re: blank=True on Char/TextFields

2009-02-13 Thread James Bennett
On Fri, Feb 13, 2009 at 6:31 AM, Lee Braiden wrote: > What exactly is the reasoning behind this advice? It seems to me that > one would very rarely want to store an empty string. For example, if > a user doesn't enter a surname, that does not mean that their surname >

Re: How to set the right PostGIS path to PostgreSQL 'share' directory

2009-02-13 Thread James Bennett
On Fri, Feb 13, 2009 at 3:32 AM, Rhoel_in_Asia wrote: > > Also, when the ./confure does run, it stops with the error > > checking for iconv.h... yes > checking build system type... i686-pc-linux-gnu > checking host system type... i686-pc-linux-gnu > checking for

Re: Documentation for Download?

2009-02-11 Thread James Bennett
On Wed, Feb 11, 2009 at 9:01 PM, Tim Johnson wrote: > I installed from the tarball, and I see the docs directory beneath the > initially extracted directory and a makefile. So now my questions is: > What is Sphinx and where do I get it? The documentation covers this:

Re: Changing Image in admin deletes the rest - expected behaviour?

2009-02-09 Thread James Bennett
On Mon, Feb 9, 2009 at 6:39 AM, phoebebright wrote: > In admin, if I change the content of one pic it blanks the rest. Is > this expected behaviour? Generally, when you think you've found a bug, searching the Django bug tracker will turn up useful information, as in

Re: FreeBSD 6.2 trouble using postgresql_psycopg2

2009-02-09 Thread James Bennett
On Mon, Feb 9, 2009 at 7:38 AM, rihad wrote: > This is no surprise, as django always attempts to install databases/py- > psycopg, and not databases/py-psycopg2, since the former is hardcoded > in its port Makefile. Any ideas? Django's documentation lists all available values for

Re: Adding project revision number to templates.

2009-02-08 Thread James Bennett
On Sun, Feb 8, 2009 at 5:21 PM, Russell Keith-Magee wrote: > 1) Look at django.utils.version.get_svn_revision(). This method tells > you Django's SVN revision. Make a copy of this method and modify it to > point at your own code, telling you the version of your clients

Re: Overriding admin template: index.html

2009-02-04 Thread James Bennett
On Wed, Feb 4, 2009 at 2:35 AM, knight wrote: > Thanks for the fast reply. > I read this but I still cannot find the view that renders index.html. You do not need to do anything to the view function. The view you're looking for is designed so that you can place your own

Re: Best practices: database connection over SSL?

2009-02-03 Thread James Bennett
On Tue, Feb 3, 2009 at 9:22 PM, Jeff Hammerbacher wrote: > I could modify the call to Database.connect() in > django/db/backends/mysql/base.py, but that's not the most elegant > implementation. Does anyone have ideas on how to proceed in a > Django-approved fashion?

Re: Why Django doesn't force testing?

2009-01-05 Thread James Bennett
On Jan 5, 6:04 am, HB wrote: > Sure, I mean encourage not force :) Your email client apparently failed to generate tests for your message, resulting in a misunderstanding. --~--~-~--~~~---~--~~ You received this message because you are

Re: Do you recommend "Practical Django Projects"?

2009-01-05 Thread James Bennett
On Jan 5, 2:21 am, HB wrote: > Hey, > I'm reading "The Definitive Guide To Django" but it is too out dated. > Do you recommend "Practical Django Projects" instead? > It seems to me that "The Definitive Guide To Django" is more organized > and covers a lot of materials. >

Re: a error occurs while use comment framework

2008-12-29 Thread James Bennett
On Mon, Dec 29, 2008 at 3:38 AM, Shuge Lee wrote: > return render_to_response( 'a.html', {'obj': obj, 'category': > Category} ) > > a.html > ... > {% load comments %} > {% render_comment_form for category %} The problem may be that you are passing Category -- the model

Re: enumerate in templates

2008-12-29 Thread James Bennett
On Mon, Dec 29, 2008 at 3:02 AM, Vicky wrote: > command like below is not working... can u suggest a way?? It is very, very, very, very important to read the big warning at the top of the template documentation, which states that the Django template language *is not* just

Re: django i18n for google

2008-12-28 Thread James Bennett
On Sun, Dec 28, 2008 at 7:19 PM, Alessandro Ronchi wrote: > Django itselfs permits selecting the i18n language via POST. I think > it should be useful to add also a GET var to set the language, and a > localization middleware catches it. This has been debated to

Re: python 3.0

2008-12-26 Thread James Bennett
On Fri, Dec 26, 2008 at 3:15 PM, waltbrad wrote: > How much of django's code is broken with python 3.0? The installation instructions and the installation FAQ cover this issue: http://docs.djangoproject.com/en/dev/intro/install/#install-python

Re: Can anyone explain why reverse() never seems to work?

2008-12-20 Thread James Bennett
On Sat, Dec 20, 2008 at 3:02 PM, Bradley Wright wrote: > Given the following code, can anyone explain why Django can't reverse > this, because I'm of the opinion that reverse is the flakiest function > ever: The permalink decorator is a shortcut which will, on its own, apply

<    1   2   3   4   5   6   7   8   9   10   >