Re: django docs __unicode__ return u'%s %s

2012-01-24 Thread James Bennett
On Tue, Jan 24, 2012 at 5:04 PM, Krondaj wrote: > what does the u'%s %s' % mean... I cannot find any exaplanation of > this in the docs? It's not covered in Django's documentation because it's a standard feature of the Python programming language -- this is basic Python

Django 1.4 alpha 1 released

2011-12-22 Thread James Bennett
Tonight as part of the 1.4 development process, we've released the first alpha for Django 1.4. You can read all about it on the blog: https://www.djangoproject.com/weblog/2011/dec/22/14-alpha-1/ And in the release notes: https://docs.djangoproject.com/en/dev/releases/1.4-alpha-1/ --

Re: List of Django release dates?

2011-12-10 Thread James Bennett
On Sun, Dec 11, 2011 at 12:26 AM, Peter Herndon wrote: > The info is available in the Django project blog > (https://www.djangoproject.com/weblog/), though you will need to do > some spelunking to find the release dates. You can also find the > release dates in the mailing

Re: Template loader cannot find admin_doc templates

2011-09-15 Thread James Bennett
On Thu, Sep 15, 2011 at 8:29 PM, Piper wrote: > Solved by adding 'django.contrib.admindocs' to the INSTALLED_APPS. Worth noting that this is the first thing you're instructed to do in the documentation for the admin docs system:

[ANNOUNCE] Django 1.2.7 -- corrects issue with 1.2.6 release package

2011-09-10 Thread James Bennett
Due to an issue with yesterday's 1.2.6 release package, today we are issuing Django 1.2.7. All users of 1.2.X Django should upgrade to 1.2.7, rather than to 1.2.6. Details here: https://www.djangoproject.com/weblog/2011/sep/10/127/ -- "Bureaucrat Conrad, you are technically correct -- the

[ANNOUNCE] Security releases issued

2011-09-09 Thread James Bennett
Today we've released Django 1.3.1 and Django 1.2.6 to deal with several security issues reported to us. Details of these issues and the releases, along with several important advisory notes, are available in the blog post on djangoproject.com:

Re: Instructions for code changing to Django 1.3

2011-03-30 Thread James Bennett
2011/3/30 Thiago Carvalho D' Ávila : > I have a project running in Django 1.2.5 and I want to update it (the code) > to Django 1.3. I've seen the release notes, but there is no direct > instructions to what I have to change in the code. Every item in the release notes that

Re: Django Web Application Cost So Many memory

2011-03-30 Thread James Bennett
On Wed, Mar 30, 2011 at 8:41 AM, 付毅 wrote: > i don't think 100 instance means to 100 CPUs. I just want to use http_load > to test pressure to my web server. if i make the 100 cocurrent request per > second with 100 cocurrent connection. I will make 100 python process >

ANN: Django 1.3 released

2011-03-23 Thread James Bennett
It's here! Django 1.3 has been officially released. Blog post here: http://www.djangoproject.com/weblog/2011/mar/23/13/ Release notes here: http://docs.djangoproject.com/en/dev/releases/1.3/ Download here: http://www.djangoproject.com/download/ -- "Bureaucrat Conrad, you are technically

Re: Why is the first Manager defined in a model the default?

2011-03-14 Thread James Bennett
On Mon, Mar 14, 2011 at 6:14 PM, gamingdroid wrote: > So if the default manager isn't named objects, then how does the code > know where the default lives? There's internal API for asking a model class what its default manager is, and Django makes use of it. Most things

ANN: Django 1.3 release candidate available

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

ANN: Security releases issued

2011-02-08 Thread James Bennett
Tonight the Django team has released updated versions of Django 1.2 and Django 1.1 to correct multiple security issues reported to us. * Details in the blog post here: http://www.djangoproject.com/weblog/2011/feb/08/security/ * Download updated versions of Django here:

Re: Best DRY practices for a view function that will be used by all other views.

2011-02-05 Thread James Bennett
On Sat, Feb 5, 2011 at 6:01 AM, Ken Chida wrote: > Hey - Thanks for replying.  So I'm thinking that the method that I > originally described would amount to only a few lines of code.  A decorator > would look nicer, but i'd have to remember to add it for future views, which >

Re: Best DRY practices for a view function that will be used by all other views.

2011-02-05 Thread James Bennett
On Sat, Feb 5, 2011 at 2:21 AM, Ken Chida wrote: > Is there a better way to do this?  Maybe I can use a custom template tag? The only thing you need is some HTML that spits out the form elements and does a POST to whatever your login URL is. So, you know, do that. Whether

Re: Django's documention is horrible

2011-01-10 Thread James Bennett
On Tue, Jan 11, 2011 at 12:44 AM, Sam Lai wrote: > This isn't about patches to the existing docs (which are great for > their purpose). It is about Django missing an API reference manual, > something like .NET Class Library Reference >

Re: Django's documention is horrible

2011-01-10 Thread James Bennett
On Mon, Jan 10, 2011 at 3:25 PM, Simon W wrote: > For such a good web framework it's a shame that the documention is not > structured well .. at all. It consists of massive text put on a page with > some random examples. But examples is all there is. In other languages and >

Re: Extracting days,months,years from datefield.

2010-12-31 Thread James Bennett
On Fri, Dec 31, 2010 at 5:53 AM, Malte Beckmann wrote: > I got a models.DateField and would like to extract months and years from > that field so I can do calculations like a 'day in month' in a 'for month in > months' loop in a 'for year in years' loop. How can I

Re: ASK-Staticfiles

2010-12-25 Thread James Bennett
On Sat, Dec 25, 2010 at 11:08 AM, Emmerling wrote: > I'm trying to manage the static files for my site content. I tried the > tutorial at http://docs.djangoproject.com/en/dev/howto/static-files/ > but it's not working. The error message I got was Error: No module > named

[ANN] Security releases and Django 1.3 beta 1

2010-12-22 Thread James Bennett
Tonight we've released Django 1.3 beta 1, as well as Django 1.2.4 and Django 1.1.3 to correct a pair of security issues. * Beta announcement: http://www.djangoproject.com/weblog/2010/dec/22/13-beta-1/ * Security announcement: http://www.djangoproject.com/weblog/2010/dec/22/security/ All

Re: Authenticate every def in views.py

2010-12-18 Thread James Bennett
On Fri, Dec 17, 2010 at 8:43 PM, suckerfish wrote: > I've added a decorator to *each* def in views.py to require > authentication. Is there a simpler way that allows me to apply > authentication automatically to every def in the file? 1. Write a middleware which will force

[ANN] Django 1.3 alpha 1 released

2010-11-10 Thread James Bennett
The first alpha preview package for Django 1.3 is now available. * Release notes: http://docs.djangoproject.com/en/dev/releases/1.3-alpha-1/ * Download instructions: http://www.djangoproject.com/download/ -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --

Re: django-registration question: activation_key_expired.boolean = True

2010-10-31 Thread James Bennett
On Sun, Oct 31, 2010 at 8:48 AM, adj7388 wrote: > What does that last line do? I have looked high and low in Django and > Python documentation, but I can't find an example or explanation of > this pattern. It appears to be clobbering the method > 'activation_key_expired()' with

Re: rake routes

2010-10-19 Thread James Bennett
On Tue, Oct 19, 2010 at 8:20 PM, Phlip wrote: > A web platform which I will refer to as "Rails" lets you print out all > the equivalents of the matchers and modules in the tree of urls.py > files using "rake routes". One easy way: 1. Install docutils. 2. Add

Re: Please add tag for Django 1.2.3 release

2010-09-23 Thread James Bennett
On Thu, Sep 23, 2010 at 5:42 AM, Tom Evans wrote: > svn is the 'official' vcs, and is used to manage the development (and > one would hope) the release engineering, but I doubt very much that it > is the 'official distribution mechanism'; I would have thought that >

Re: question about the "default" Manager

2010-09-15 Thread James Bennett
On Wed, Sep 15, 2010 at 8:28 AM, Rev. Johnny Healey wrote: > I may be missing something here, but this jumps out at me as being > impossible.  The ModelBase metaclass receive the attributes as a dict, > so isn't the original order lost? All instances of Manager have an

[ANN] Django 1.2.3 released

2010-09-11 Thread James Bennett
To correct several issues in the 1.2.2 package earlier this week, tonight the Django team has issued Django 1.2.3. Details are available on the Django weblog: http://www.djangoproject.com/weblog/2010/sep/10/123/ All users are encouraged to upgrade as soon as possible. -- "Bureaucrat Conrad,

[ANN] Security release to correct public vulnerability

2010-09-08 Thread James Bennett
The Django team has just issued Django 1.2.2 to deal with a reported security issue. Full details are available in the blog post: http://www.djangoproject.com/weblog/2010/sep/08/security-release/ All users of Django 1.2 are urged to upgrade immediately. -- "Bureaucrat Conrad, you are

Re: potential issue re in memory django file uploading.

2010-09-03 Thread James Bennett
On Fri, Sep 3, 2010 at 2:04 PM, dave b wrote: > Ok no movement :) Nor is there likely to be. Insofar as you've identified a problem at all, it's a problem in a piece of software that isn't Django, and you've ignored multiple people who've pointed that fact out to you

Re: Django, Rails but a cost to pay ?

2010-08-03 Thread James Bennett
On Tue, Aug 3, 2010 at 9:19 AM, didier rano wrote: > What do you think about this post > ? http://blog.skeedy.com/django-rails-but-a-cost-to-pay I think... * A community, but it is not so easy to find developers compared to Java or .NET True, but finding *good*

Re: Get request path without having a request object

2010-07-31 Thread James Bennett
On Sat, Jul 31, 2010 at 12:37 PM, cootetom wrote: > Thanks Carlos but I'm trying to achieve getting the path without > having to pass the request object. In a word: don't. Instead, design your system to pass the information you need where and when you need it. This doesn't

Re: Tutorial Help

2010-07-06 Thread James Bennett
On Tue, Jul 6, 2010 at 10:56 AM, Bradley Hintze wrote: > Error: No module named pollsdjango.contrib.admin Look at your INSTALLED_APPS setting. You're missing a comma between the polls app and the admin app. -- "Bureaucrat Conrad, you are technically correct -- the

Re: Having to rstrip the " [] " from the end of your Key when posted?

2010-05-28 Thread James Bennett
On Fri, May 28, 2010 at 7:41 PM, pyfreak wrote: >  However, I also need to use "key".  But when I'm sending over stuff > from javascript like above, > the key has a "[]" tacked on the end of it, like "stringkey[]" You are most likely running into this, or an issue

ANN: Django 1.2.1 released

2010-05-24 Thread James Bennett
Following up on last week's Django 1.2 release, today we'd like to announce Django 1.2.1, the first bugfix release in the 1.2 series: * Announcement blog post: http://www.djangoproject.com/weblog/2010/may/24/121/ * Download: http://www.djangoproject.com/download/ * Checksums:

ANN: Django 1.1.2 and Django 1.2 released

2010-05-17 Thread James Bennett
We're pleased today to announce the release of both Django 1.1.2 -- the second bugfix release in the 1.1 series -- and the long-awaited Django 1.2. More information is available over at djangoproject.com: * Django 1.1.2 release announcement: http://www.djangoproject.com/weblog/2010/may/17/112/ *

Re: Spammer named 'Ashley J. Sands' who harvested everyone's email from djangopeople.net

2010-05-16 Thread James Bennett
Once again: This discussion is inappropriate for this list; take it to personal email. There will not be a third warning. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." -- You received this message because you are subscribed to the Google Groups "Django

Re: Spammer named 'Ashley J. Sands' who harvested everyone's email from djangopeople.net

2010-05-15 Thread James Bennett
This entire discussion is inappropriate for this list. If either of you wish to continue it, do so elsewhere. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: choices based on existing entries

2010-05-11 Thread James Bennett
On Tue, May 11, 2010 at 4:11 PM, Preston Holmes wrote: > Now I can think of several ways to do this in a form field init, but > it seems like there should be a more reusable way to do it with a > custom field type or mixin by overriding get_choices on the field > object. There

Django 1.2 release candidate available

2010-05-05 Thread James Bennett
Tonight we're proud to announce, finally, the first Django 1.2 release candidate. If all goes well, it will also be the *only* release candidate, and Django 1.2 final will release one week from today. For more information, consult: * The Django project weblog:

Re: Error with django-registration

2010-04-28 Thread James Bennett
On Wed, Apr 28, 2010 at 2:46 AM, andy saksena wrote: > (111, 'Connection refused') As a Google search would have told you, this is the error Python's smtplib module will raise when you tell it to connect to a mail server and it can't. Which means you need to go

Re: "view on site" erroring without sites framework

2010-04-26 Thread James Bennett
On Mon, Apr 26, 2010 at 12:59 AM, Francis Gulotta wrote: > The latest patch in that ticket's comments seems to work for me. Being new > to the project may I ask, is this ticket not closed due to lack of tests or > have a stumbled upon a design disagreement? The latest

Re: set up database engine

2010-04-08 Thread James Bennett
On Wed, Apr 7, 2010 at 11:25 PM, yangyang wrote: > I mean the tutorial only tells you "edit settings" but doesn't tell > you how. Excuse me if this is obvious to most of people. Part 1 of the tutorial, under "Database setup", says: > Now, edit settings.py. It's a normal Python

Re: search and filtering in app engine

2010-04-02 Thread James Bennett
On Fri, Apr 2, 2010 at 4:26 AM, knight wrote: > 1.) I get error: "'Query' object has no attribute 'all'" on line 59 in > views. > As I understand it's something to do with the fact that GAE queryset > is different from django queryset. > How can I fix that? By reading the

Re: what's wrong with this if statement structure

2010-03-25 Thread James Bennett
On Thu, Mar 25, 2010 at 11:28 AM, Bobby Roberts wrote: > it is in the template an the traceback thrown is: > > 'if' statement improperly formatted The documentation states: > New in Django Development version. > if tags may also use the operators ==, !=, <, >, <=, >= and in

Re: Django ORM

2010-03-23 Thread James Bennett
On Tue, Mar 23, 2010 at 3:57 PM, jrs wrote: > It is precisely due to this that I'm surprised the ORM has > cascading deletes on by default.  Seems to me that cascades should > only happen when the app developer specifies, not the other way > around... it's dangerous and I'm

Re: Negate querysets

2010-03-23 Thread James Bennett
On Tue, Mar 23, 2010 at 10:21 AM, Vinicius Mendes | meiocodigo.com wrote: > integrated to the framework. I think the queryset should keep track of > it self. It knows what is the filter, so why can't it negate this > filter? Given an already-existing QuerySet which has

Re: REMOTE_ADDR

2010-03-15 Thread James Bennett
On Mon, Mar 15, 2010 at 8:45 AM, Ken Lacey wrote: > Using request.META['REMOTE_ADDR'] I get an error > > Exception Type: TemplateSyntaxError > Exception Value: Could not parse the remainder: '['REMOTE_ADDR']' from > 'request.METTA['REMOTE_ADDR']' > > > How do I get over this?

Re: 1.1.2

2010-03-10 Thread James Bennett
On Wed, Mar 10, 2010 at 9:16 PM, brad wrote: > When can we expect a release of 1.1.2? Specifically I'm hoping to get > a test bug fixed - http://code.djangoproject.com/ticket/12720 Barring unforeseen circumstances, a 1.1.2 release will probably accompany the release of

Re: How to get current session user in models.py?

2010-03-09 Thread James Bennett
On Tue, Mar 9, 2010 at 8:47 AM, Shawn Milochik wrote: > I wonder if this is something that might end up in Django as a built-in > feature at some point. It comes up regularly on this list. Were I to sit here all morning doing nothing but typing, I wouldn't be able to say "no"

Re: Adding a new convenience filter 'contains_any'

2010-03-08 Thread James Bennett
On Mon, Mar 8, 2010 at 11:11 AM, Phlip wrote: > And if the PEP8 told you to ... just jump off a cliff... would you? Sounds like you might benefit from actually reading it: http://www.python.org/dev/peps/pep-0008/ -- "Bureaucrat Conrad, you are technically correct -- the

Re: shortest way to recover from a QuerySet "object not found"

2010-03-04 Thread James Bennett
On Thu, Mar 4, 2010 at 1:43 PM, Phlip wrote: > And again the condescension. As a programmer, I should be able to > easily chose between statements that throw and ones that efficiently > deal with branching conditions. A record-not-found is not a crisis, it > is just a

Re: shortest way to recover from a QuerySet "object not found"

2010-03-04 Thread James Bennett
On Thu, Mar 4, 2010 at 12:59 PM, Phlip wrote: > Doesn't anyone in Django-land have experience with the platforms that > make this problem incredibly easy? Most likely, yes. And those people, believe it or not, designed Django's APIs based on their experiences. This is why

Re: How do I get "date.strftime" in the language set by "/i18n/setlang/"

2010-03-02 Thread James Bennett
On Tue, Mar 2, 2010 at 11:19 AM, jul wrote: > I have a multilingual site and I'd like to get some date in the > current language. With date.strftime, I get the date in english > only... > The language is set by "/i18n/setlang/". > How can I do that? For simple formatting, you

Re: How does the default option for a field work in the model?

2010-02-28 Thread James Bennett
On Sun, Feb 28, 2010 at 5:13 PM, Andrej wrote: > I want to use the Admin module to pre-set default values when creating > the form. For example, in the gender case, I want to have default > "Unknown" option. Is this this not possible? It is possible; all you have to do is

Re: How does the default option for a field work in the model?

2010-02-28 Thread James Bennett
On Sun, Feb 28, 2010 at 4:42 PM, Andrej wrote: > Shouldn't this work? It's a tuple. > > gender = models.CharField(_('Gender'), max_length=1, > choices=GENDER_CHOICES, default=GENDER_CHOICES[2]) > > It doesn't. > I smell black magic! The value that goes in 'default' is the

Re: update query set with a limit

2010-02-27 Thread James Bennett
On Sat, Feb 27, 2010 at 10:07 PM, Harley Bussell wrote: > Hi, id like to know if any one has found a work around to use limits > when updating a query set. This is unlikely to be supported by Django; "UPDATE ... LIMIT" is non-standard, non-portable and MySQL is the only DB

Re: Banned from the #django irc channel

2010-02-26 Thread James Bennett
2010/2/26 Matías Iturburu : > Hi guys, Sorry to bring such an off topic, but I've notice that I'm banned > on the django irc channel (at least I'm receaving #django :Cannot send to > channel any time I want to talk there, my nick name is *tutuca*). > I don't think I've ever

Re: Best way to access 'request' in pre_save

2010-02-18 Thread James Bennett
On Thu, Feb 18, 2010 at 10:55 AM, Paul Stone wrote: > I'm trying to find the best way to update a model using data from the > request object (e.g request.user) before it is saved. One use case for > this is updating an 'updated_by' field on a model. Presumably you have a

Re: Django 1.2 and Python 3.X ?

2010-02-14 Thread James Bennett
On Sun, Feb 14, 2010 at 7:06 PM, italiasky wrote: > Can we expect Django 1.2 to be used with Python 3.x ? Django's documentation contains answers to many common questions, including this one: http://docs.djangoproject.com/en/dev/faq/install/#can-i-use-django-with-python-3

Re: Installation without root access

2010-02-11 Thread James Bennett
On Thu, Feb 11, 2010 at 4:32 AM, orbital_fox wrote: > Is there a way and guides on how to install django without having root > access on a system? What are the requirements? The single most useful thing you're going to be able to do for yourself is go work through the

ANNOUNCE: Django 1.2 beta released

2010-02-05 Thread James Bennett
Tonight we've released Django 1.2 beta 1: * Blog entry: http://www.djangoproject.com/weblog/2010/feb/06/12-beta-1/ * Release notes: http://docs.djangoproject.com/en/dev/releases/1.2-beta-1/ * Checksums: http://media.djangoproject.com/pgp/Django-1.2-beta-1.checksum.txt Note that this constitutes

Re: You're seeing this error because you have DEBUG = True in your Django settings file.

2010-02-03 Thread James Bennett
On Wed, Feb 3, 2010 at 9:54 PM, punwaicheung wrote: > You're seeing this error because you have DEBUG = True in your Django > settings file. Change that to False, and Django will display a > standard 404 page. You're receiving this reply because you didn't ask a question.

Re: Scammer / Job fraud rehash - Do NOT perform any business with Eike Post

2010-02-02 Thread James Bennett
Anybody who wants to continue this thread: take it off-list immediately or face the wrath of the list moderators. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." -- You received this message because you are subscribed to the Google Groups "Django users"

Re: filtering query on a function

2010-02-01 Thread James Bennett
On Mon, Feb 1, 2010 at 3:59 AM, Kenneth Gonsalves wrote: > Anyway, player.getcoursehandicap() works - but not within 'filter' Why would you expect it to? Python method definitions are not legal SQL, so you can't pass a Python method into a SQL query and expect it to work. If

Re: doubt about permalink and name in urlpatterns

2010-01-30 Thread James Bennett
On Sat, Jan 30, 2010 at 10:55 AM, harryos wrote: > 'coltrane_entry_archive_day' ,'coltrane_entry_archive_month' etc are > never used in any method in class Entry.Even if I remove it from the > urlpattern the entries will be listed properly and get_absolute_url in >

Re: Why can a Django project name not start with a numeric

2010-01-28 Thread James Bennett
On Fri, Jan 29, 2010 at 12:39 AM, Delacroy Systems wrote: > Why can a Django project name not start with a numeric? I would like > my project name to be 1time. Reading a good Python tutorial may be a good idea, since Python (the programming language) doesn't support

Re: read only django admin

2010-01-28 Thread James Bennett
On Thu, Jan 28, 2010 at 8:55 PM, zweb wrote: > Is it possible to have a read only django admin, ie user cannot add, > delete or update. User can only view data. > > or may be one user can be view only and other user has add/delete / > update as well in Django admin. The

Re: Looking for Lead Django Developer in LA please call 310 571 JOBS

2010-01-22 Thread James Bennett
On Fri, Jan 22, 2010 at 6:48 PM, CerenGuven wrote: > 3-5+ years Django/Python development experience If you manage to find someone with 5+ years' Django experience, do let me know. (meanwhile, job postings should go to djangogigs.com) -- "Bureaucrat Conrad, you are

Re: about django 1.2 alpha release

2010-01-21 Thread James Bennett
On Thu, Jan 21, 2010 at 12:09 PM, rodel bosque wrote: > is django 1.2 alpha release support python version 3? As the main Django documentation page suggests, it's a good idea to consult the FAQ:

Re: Querysets returns wrong result when using threading.

2010-01-14 Thread James Bennett
On Thu, Jan 14, 2010 at 10:26 PM, Kieran Brownlees wrote: > Basic example of format: > Main Thread: print objects.all() > Spawned Thread: print objects.all() -- same as main thread > Main Thread: objects.create(newObj) > Main Thread: print.objects.all() -- correct queryset,

Re: Namespace Security

2010-01-12 Thread James Bennett
On Mon, Jan 11, 2010 at 10:46 AM, Tim wrote: > The issue is getting Django admin to recognize this. Has anyone seen > or done anything like this? I have a few ideas where to begin, but > figured I would ask first so I don't end up re-inventing the wheel if > something has

Re: Error in importing user in the interactive console

2010-01-07 Thread James Bennett
On Thu, Jan 7, 2010 at 11:50 PM, sridharpandu wrote: > Couldn't understand your post. Pls eloborate You say you typed: >>> from django.ontrib.auth.models import user This is incorrect. There is no such thing as "django.ontrib.auth.models". There *is* such a thing as

ANNOUNCE: Django 1.2 alpha 1 released

2010-01-05 Thread James Bennett
The first alpha preview package for Django 1.2 is now available. * Release notes: http://docs.djangoproject.com/en/dev/releases/1.2-alpha-1/ * Download instructions: http://www.djangoproject.com/download/ -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." -- You

Re: Subject line in django-contact-form

2009-12-29 Thread James Bennett
On Tue, Dec 29, 2009 at 8:24 PM, shacker wrote: > Hmm, I find that odd.  It's standard practice to let the user enter > the subject for a contact form. I wouldn't want my inbox filled with > contacts from site users, all with the same subject line. In my experience, it's

Re: django-tagging is not multi-db safe

2009-12-25 Thread James Bennett
On Fri, Dec 25, 2009 at 1:06 PM, Hanne Moa wrote: > A site using django-tagging will break hard on 1.2 as of today. See > issue http://code.google.com/p/django-tagging/issues/detail?id=233 . > > How is one to use as_sql() now with multi-db in? One doesn't. And, generally,

Re: Django causing unnessary 301 permanent redirect

2009-12-24 Thread James Bennett
On Thu, Dec 24, 2009 at 7:08 PM, zweb wrote: > Any way to avoid this 301 MOVED PERMANENTLY ? As always, the documentation is your friend: http://docs.djangoproject.com/en/1.1/ref/middleware/#module-django.middleware.common -- "Bureaucrat Conrad, you are technically

Re: unicode httprequest fails?

2009-12-24 Thread James Bennett
On Thu, Dec 24, 2009 at 11:40 AM, twister wrote: > it seems to me that "(r'^admin/(.*)', admin.site.root)" in the urls.py > cannot match the unicode url string u'admin/'. No, that's not the actual problem. But without seeing the configuration you're using for the server, it's

Re: Hosting for django?

2009-12-22 Thread James Bennett
On Tue, Dec 22, 2009 at 12:59 PM, yummy_droid wrote: > Has anyone had good experiences with hosting companies that I can use > for production django apps, with backups, etc.? http://djangofriendly.com/hosts/ -- "Bureaucrat Conrad, you are technically correct -- the best kind

Re: authentication security

2009-12-18 Thread James Bennett
On Fri, Dec 18, 2009 at 6:58 PM, macdd wrote: > plain text then it isn't very secure. Okay so https comes in. What I > don't understand is when to use it and when not to. It seems like if > you authenticate over https just for user credentials and then go back > to http

Re: problems downloading django

2009-12-16 Thread James Bennett
On Wed, Dec 16, 2009 at 2:13 PM, Michael K wrote: > Should I take the silence to mean I should open a bug report? I clicked the "download" link for Django 1.1.1, and the package downloaded. On finishing the download, I was able to checksum it and get the same results as the

Re: autogenerated 'id' field from Django model doesn't autoincrement?

2009-11-19 Thread James Bennett
On Thu, Nov 19, 2009 at 1:57 PM, Ken MacDonald wrote: > So, a couple questions: > > 1) is it a bug that 'id' is generated as an 'integer' rather than 'serial' > type? I'd be curious as to how your DB got set up that way, since Django's table-creation routines map AutoField to

Re: no such column: blog_link.slug

2009-11-15 Thread James Bennett
On Sun, Nov 15, 2009 at 8:19 PM, neridaj wrote: > I'm getting this error even though I have added slug field for this > model - Link. I ran syncdb a few times and I still get the error. Any > suggestions? Quoting the documentation:

Re: tiny_mce TypeError

2009-11-10 Thread James Bennett
On Tue, Nov 10, 2009 at 9:47 PM, neridaj wrote: > I'm just following "Practical Django Projects" and was curious if > anyone else was able to fix a TypeError when trying to add tiny_mce to > the admin for flatpages, or is this something buried in the > tiny_mce.js file?

Re: Feedback on Django1.1.1

2009-11-10 Thread James Bennett
2009/11/10 Evgeny : > sometimes there is this error after upgrade to 1.1.1: > > http://groups.google.com/group/django-users/browse_thread/thread/c6a61a3788138745 >From the sound of it, this was a configuration problem on your system, and not an issue with Django (any

Re: Class definition in the tutorial

2009-11-08 Thread James Bennett
On Sun, Nov 8, 2009 at 10:00 AM, Zeynel wrote: > I am just learning Object Oriented terminology as I go along. Please > help me to understand what each word means in the class definition in > the tutorial http://docs.djangoproject.com/en/dev/intro/tutorial01/ . You may

Re: Accessing 'bytea' field using django.

2009-11-03 Thread James Bennett
On Tue, Nov 3, 2009 at 11:27 PM, ds99 wrote: > I am using django with postgres as backend. Some of the fields in the > table are of type "bytea"(bytearray). Which django fields should I use > while defining a model for such tables? You should write a field which does

Re: why deliver .csv when you want to be delivering .xls?

2009-11-03 Thread James Bennett
On Tue, Nov 3, 2009 at 3:22 AM, Chris Withers wrote: > That said, I'd be surprised if the templating is the problem here, it'll > be the interaction with the database that's taking the time... Depends. The {% for %} tag can be relatively expensive, performance-wise, due

Re: why deliver .csv when you want to be delivering .xls?

2009-11-03 Thread James Bennett
On Tue, Nov 3, 2009 at 3:22 AM, Chris Withers wrote: > ...or you could just use xlwt and deliver the real deal ;-) I generally prefer CSV because it's readable by more than just Excel -- any decent programming language can read it, most databases can import directly from

Re: render_to_response taking 50 seconds!

2009-11-03 Thread James Bennett
On Tue, Nov 3, 2009 at 1:17 AM, Low Kian Seong wrote: > There is a query page where the start_date and end_date is being sent. > Then the do_defender_advanced will process it and generate an Excel > using the template. One other thing is that the Django template system

Re: render_to_response taking 50 seconds!

2009-11-02 Thread James Bennett
On Tue, Nov 3, 2009 at 1:17 AM, Low Kian Seong wrote: > There is a query page where the start_date and end_date is being sent. > Then the do_defender_advanced will process it and generate an Excel > using the template. For each object you are displaying the values of four

Re: Legacy database - does every table need an id column?

2009-11-01 Thread James Bennett
On Sun, Nov 1, 2009 at 10:56 PM, Nick Arnett wrote: > As I ask the question, it now seems clear to me that the column is > needed. There must be a field on the model with "primary_key=True". If a model is defined without such a field, Django assumes an implicit

Re: Does anyone know what happened to djangopluggables.com?

2009-10-21 Thread James Bennett
If anyone knew what had happened to it, it's likely they'd have responded in one of the multiple other threads asking this question. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ You received this message

Re: About Django Notify

2009-10-19 Thread James Bennett
On Mon, Oct 19, 2009 at 12:12 AM, aju wrote: > I installed django-notify. But in that django-notify folder it does > not contain the file notify_user.py. I need this file. Plese send me > the file notify_user.py It is likely that you will get a better response by

ANN: Critical security updates to Django 1.0 and Django 1.1

2009-10-09 Thread James Bennett
Today the Django project is issuing a set of releases to remedy a security issue. This issue was disclosed publicly by a third party on a high-traffic mailing list, and attempts have been made to exploit it against live Django installations; as such, we are bypassing our normal policy for

Re: regex infinite loop with 100% cpu use in django.forms.fields.email_re - DOS hole?

2009-10-09 Thread James Bennett
Yes. We've confirmed the problem. We're working on a patch. In the meantime, everybody go meditate on the documentation for how to report security issues. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~

Re: Is Django thread safe?

2009-09-28 Thread James Bennett
On Mon, Sep 28, 2009 at 4:34 AM, Torsten Bronger wrote: > Can it be safely used with Apache's Worker MPM? The answer is, basically, "it depends on what *you*, the programmer, do". The current stable releases of Django -- 1.0.3 and 1.1 -- don't by themselves do

Re: TinyMCE in Admin (Practical Django Projects book)

2009-09-27 Thread James Bennett
On Sun, Sep 27, 2009 at 6:48 AM, Erik Kronberg wrote: > I'm on chapter 3 of James Bennett's Practical Django Projects. My > problem is that TinyMCE isn't showing up in the Admin -> New Flatpage > text area. Using Linux (Ubuntu 9.04) First thing I'd recommend is checking it

Re: How to establish foreign key contraints across models living in different applications

2009-09-27 Thread James Bennett
On Sat, Sep 26, 2009 at 3:21 PM, djfis...@gmail.com wrote: > It is possible to have a model in one application have a foreign key > to another application as of Django 1.0. It's always been possible to point relationships at models in other applications. The bit you're

Re: Management commands not detected in all packages under a namespace?

2009-09-18 Thread James Bennett
On Fri, Sep 18, 2009 at 10:36 PM, Kyle MacFarlane wrote: > Everything works fine except when detecting management commands. It > will only detect commands in the first package in sys.path underneath > "company.*". Once it has checked one package in the namespace it does

Re: djangorecipe questions

2009-09-17 Thread James Bennett
On Thu, Sep 17, 2009 at 6:01 AM, Chris Withers wrote: > All of your problems seem to center on zipped eggs. These are evil > things anyway, and can be avoided by simply putting zip_safe=False as a > parameter to setuptools (whether it actually comes from setuptools, or >

Re: djangorecipe questions

2009-09-17 Thread James Bennett
On Thu, Sep 17, 2009 at 5:23 AM, Chris Withers wrote: > Well, I'm certainly not setuptools-happy, but Django appears to be > wrapped up as a standard distribution on PyPI (sorry, should have said > distro, not egg), so it would make sense to use that... Putting on my

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