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 date's listed on the

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. > On the long run, this should *al

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 faster than C without doing ass

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 asked, basically, "since Java is fas

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 unexpected keyword argument

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 application you're using,

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 http://code.google.com/p/ibm-d

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 already provide every tool

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 "published" article, a "draft

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 happens if two people

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 relying on documente

Re: psycopyg setup error: no build_ext

2009-06-23 Thread James Martin
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 darwinports. On Tue, Jun 23, 2009 at 1:19 PM, Chris Haynes wrote: > > Using what I believe is the la

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 > darwinports. I've got

Re: Skipping an item in a loop

2009-06-24 Thread James Gregory
return new_list def my_view(request): original_list = [MyClass(),MyClass()]MyClass(),MyClass()] view_list = make_view_list(original_list) return render_to_response('index.html', {'list':view_list}) James --~--~-~--~~~---~--~~ You rec

Re: Skipping an item in a loop

2009-06-24 Thread James Gregory
On Jun 24, 11:41 am, James Gregory wrote: > On Jun 24, 11:15 am, "Daniele Procida" > wrote: > > > > > I have a template in which I would like to do the following: > > > {% for item in loop %} > >     {% if [previous item].condition %} > >

Re: Skipping an item in a loop

2009-06-24 Thread James Gregory
On Jun 24, 12:11 pm, Masklinn wrote: > On 24 Jun 2009, at 12:47 , James Gregory wrote: > > > > > On Jun 24, 11:41 am, James Gregory wrote: > >> On Jun 24, 11:15 am, "Daniele Procida" > >> wrote: > > >>> I have a template in which

Re: Mysql->postgres migration. Now id not auto incrementing/being added at all

2009-06-28 Thread James Bennett
On Sun, Jun 28, 2009 at 3:56 PM, Wayne Koorts wrote: > In your case you'll probably have to drop the id columns and recreate > them.  I'm not sure how Postgres will deal with adding a serial column > to an existing table, but see how it goes (make backups first of > course). It works fine. The on

Re: regex problem in django

2009-06-29 Thread James Gregory
I copied and pasted your code (with an added speech mark to close str) into a controller function, and it works for me: Django version 1.1 beta 1, using settings 'pilchard.settings' Development server is running at http://127.0.0.1:8000/ Quit the server with CTRL-BREAK. >wr: > one b

Re: regex problem in django

2009-06-29 Thread James Gregory
rules r'[wr:]$' then should add + in > beginning of line > > On Jun 29, 4:31 pm, James Gregory wrote: > > > On Jun 29, 10:05 am, Joru wrote: > > > > I still can't solve this > > > Anyone had answer on this? > > > > On Jun 26, 7:3

Re: Base view class ?

2009-06-29 Thread James Gregory
of the module? It would just mean you would have to add one extra layer of indentation to everything. If you want, think of the views.py module as being a class with no data members. James --~--~-~--~~~---~--~~ You received this message because you are subscribe

Re: regex problem in django

2009-06-29 Thread James Gregory
hat you want to do, and anyway I can't write your program for you. Essentially, you just need to spend some time reading a bit more about regular expressions: http://docs.python.org/library/re.html James --~--~-~--~~~---~--~~ You received this message bec

Re: regex problem in django

2009-06-29 Thread James Gregory
I may be wrong, but I suspect there is a difference between the input string/code you are using in the shell, and the input string/code you are using in the view. What happens if make a new empty Python script and cut and paste in your code (removing the wrap function from Django). Does it work then?

Re: regex problem in django

2009-06-29 Thread James Gregory
r expressions yourself. The last link I posted wasn't very useful for learning because it is just a reference, there is a proper tutorial on regular expressions with Python here: http://www.amk.ca/python/howto/regex/ James --~--~-~--~~~---~--~~ You received this m

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" attribute, but under the hoo

EveryBlock source code public

2009-07-01 Thread James Matthews
And we have another Django blog application! :) http://blog.everyblock.com/2009/jun/30/source/ -- http://www.goldwatches.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gro

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 the result to another t

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 encountered by new Pytho

Re: SyncDB failure

2009-07-09 Thread James PIC
ery, self).execute_sql(None) File "/usr/lib/python2.5/site-packages/django/db/models/sql/query.py", line 1734, in execute_sql cursor.execute(sql, params) File "/usr/lib/python2.5/site-packages/django/db/backends/util.py", line 20, in execute return self.cursor.execute(sql, para

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. I tend to view it a bit differe

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 inside your tag's Node subcla

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: 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 my own SMTP server. If sendin

Can the URL dispatcher know about escaped punctuation in the path?

2009-07-20 Thread James Pearce
URLs? (Life used to be so simple when most of the interesting bits of a URL were in the querystring ;-) ) Many thanks for any ideas. James PS. I use the wonderful Piston, by the way. Not relevant, just a shout out! --~--~-~--~~~---~--~~ You received this messag

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: http://docs.dja

Re: run django on multicore machine

2009-07-23 Thread James Matthews
Django depends more on the python interpreter. If it really matters recompile python to take advantage of your machine. I am sure you will see some nice improvements On Fri, Jul 24, 2009 at 12:08 AM, Some Guy wrote: > > Not sure about my answer but > I think it matters more that the webserve

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 a bit more resea

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 what it turns into

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 that much, we can'

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 which does the sort o

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 "django connection pool"

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 recomm

ANN: Django 1.1 released!

2009-07-28 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/ * D

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 won't get any files sent. The

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 documentation so that y

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 received this message becaus

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 views? It sounds like

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 should be using instead

Using Psycopg2 on Windows

2009-08-13 Thread James Walmsley
d, I also tried to build psycopg2 from source, build I still get a DLL load fail. James --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djang

Re: Using Psycopg2 on Windows

2009-08-14 Thread James Walmsley
Just in case anyone happens to be still wrestling with this problem. There was something wrong with the latest build of Psycopg2, which stopped it all working. Simply install an earlier version, (2.0.10 works great), even with PostgreSQL 8.4.x series. James James Walmsley wrote: >

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 Python tutorial. --

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: http://docs.djangoproject.com/en/dev/ref/templates/builtins/#for-empty -- "Bureaucrat

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 different threads recently...

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: 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 causing this; I know tha

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 > happening. If you want som

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 correct localized s

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 the group, > return that

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 or > SAN will be

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 for what it's worth my b

Re: formtools and formsets

2009-03-30 Thread James Smagala
hashing, and stage tracking are all handled inside the class for any number of forms and formsets that you need to include in one html form. Hope someone out there finds this useful. James Smagala --~--~-~--~~~---~--~~ You received this message because you are subscribed

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: http://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-informatio

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. > TypeError: __init

Re: registration and profile must save at a time

2009-04-08 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 > have to add extra field in user mo

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; when you use values() y

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. Suppose, for example,

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 there's no "push this b

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 into a ForeignKey is the

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 the latest version of Pyt

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 > system. Look for 'login_required

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 questions > being asked on a technic

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 settings.py has a wrong signat

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 you don't mind doing

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. Personally I would suspect t

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 API ( > http://www.postg

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 django.contrib.auth.authenticate is implemented

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, you are technically correct -- the

xlrd and UploadedFile error

2009-05-04 Thread James Smagala
Based on that error, it seems that I should be able to cast the value to some sort of encoded string. Any suggestions? Thanks, James --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Re: xlrd and UploadedFile error

2009-05-05 Thread James Smagala
ly to it from a Django UploadedFile object. It ignores the path argument if you do. James --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-

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. Django provides a couple o

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 instances are callable is

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 during bulk deletion.

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 I'm sure there's a more

Re: environment variable DJANGO_SETTINGS_MODULE is undefined

2009-05-11 Thread James Bennett
On Mon, May 11, 2009 at 9:45 AM, bconnors wrote: > there must be something I don't have. do i have to install something? You seem to be in need of a basic Python tutorial, one which will teach you about things like how to import modules before using them (because, for example, you seem to be hun

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 provides some really excellent

Re: What debugger do you use?

2009-05-12 Thread James Matthews
I use WingIde and love it! On Mon, May 11, 2009 at 3:53 PM, Joshua Russo wrote: > > I'm currently using Netbeans 6.5 with the Python plugin. I was just > wondering what everyone else is using because NB is a bit buggy with > the Python plugin at the moment. > > > -- http://www.jewelerslounge.

Re: how to catch the errors throwed by django when django project deployed under fastcgi

2009-05-12 Thread James Matthews
Can you please provide some more details? Where you are seeing the error. What is crashing,tracelogs etc.. Thanks James On Tue, May 12, 2009 at 3:38 PM, linvar wrote: > > hi everyone: >recently i deployed my django project under the nginx + django + > fastcgi mode, > > i

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 which chooses and uses th

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 (consult source) which determin

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 then when the login is done, redire

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 many > web sites so it

Re: can't get admin to work on google apps.

2009-05-20 Thread James Bennett
On Wed, May 20, 2009 at 2:53 AM, Aaron wrote: > I can get the djangos admin to work on the localhost server fine. > > I just can't get it to work on google apps servers. Google App Engine supports a subset of Django, not all of Django. Most notably, the Django object-relational mapper for datab

Re: Best Django host

2009-05-20 Thread James Matthews
I use Slicehost and they are great (but if you are looking for a shared webhost go with webfaction) On Wed, May 20, 2009 at 5:58 AM, Eugene Lazutkin wrote: > > From my experience with both hosts webfaction has a better uptime, > better setup, and less interferences from neighbors, which is import

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 doesn't do a query until it abs

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: Expert

2009-05-23 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 classifier. A list of packag

Re: Djangonic?

2009-05-24 Thread James Matthews
Yes, DRY. Don't Repeat Yourself. On Sun, May 24, 2009 at 5:28 PM, Joshua Partogi wrote: > > Is that important? :-D > > On May 25, 12:21 am, Roberto Cea wrote: > > If an idiomatic Python program is "pythonic", what do you call > > idiomatic use of Django, "djangonic"? > > > -- http://www.goldw

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 0.2.1, released in Januar

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 the message “permissio

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 it is not being served u

database backends timing out

2009-06-13 Thread James Martin
help would be great appreciated. Thanks, James --~--~-~--~~~---~--~~ 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 th

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