[Announce] Django security releases issued

2014-05-14 Thread Jacob Kaplan-Moss
Today we've issued releases to remedy three security issues reported to us. Affected versions are Django 1.4, Django 1.5, Django 1.6 and the Django 1.7 beta. Full details and download information are on the Django project weblog:

[ANNOUNCE] Django 1.6.2 and Django 1.7a2

2014-02-06 Thread Jacob Kaplan-Moss
Hey y'all -- We've just released Django 1.6.2, the latest bugfix release in the 1.6 series, and Django 1.7a2, the second alpha preview of the upcoming 1.7 release. As usual, more details are available on the blog:

[ANNOUNCE] Django 1.6.1 released

2013-12-12 Thread Jacob Kaplan-Moss
Hey folks -- We've just released Django 1.6.1, a bugfix release for last month's Django 1.6 release. More details are in our blog post: https://www.djangoproject.com/weblog/2013/dec/12/django-161/ and in the release notes: https://docs.djangoproject.com/en/1.6/releases/1.6.1/ Enjoy!

Security Advisory: ImageField abuse

2013-12-02 Thread Jacob Kaplan-Moss
Hi folks - We've just published a short security advisory about ImageFields: https://www.djangoproject.com/weblog/2013/dec/02/image-field-advisory/ ImageField expects a valid image file, but depending on your app it may allow uploads on non-image content, such as HTML or JavaScript.

[Announce] Expected djangoproject.com downtime tomorrow, Oct 18, starting 20:00 UTC

2013-10-17 Thread Jacob Kaplan-Moss
Hi folks - We'll be doing some work on djangoproject.com (and associated sub-sites) tomorrow, starting around 20:00 UTC. Expect some downtime, possibly as long as an hour or so, starting around then. During the downtime, as usual, you can find a mirror of Django's documentation on Read the Docs:

Re: Does Model.save() write back all the field values?

2013-08-14 Thread Jacob Kaplan-Moss
It's not a bug; that is by design. However, it's not perfect, so in 1.5 we added update_fields: https://docs.djangoproject.com/en/1.5/ref/models/instances/#specifying-which-fields-to-save Jacob On Wed, Aug 14, 2013 at 7:01 AM, Dong Wang wrote: > Hi all, > > I'm using

[ANNOUNCE] Security releases issued (1.4.6, 1.5.2, 1.6b2)

2013-08-13 Thread Jacob Kaplan-Moss
Hi folks -- Today the Django team is issuing multiple releases -- Django 1.4.6, Django 1.5.2, and Django 1.6 beta 2 -- as part of our security process. These releases address two cross-site scripting (XSS) vulnerabilities: one in a widget used by Django's admin interface, and one in a utility

Security Advisory: BREACH and Django

2013-08-06 Thread Jacob Kaplan-Moss
Hi folks -- At last week's Black Hat conference, researchers announced the BREACH attack (http://breachattack.com/), a new attack on web apps that can recover data even when secured with SSL connections. Given what we know so far, we believe that BREACH may be used to compromise Django's CSRF

ANNOUNCE: Django 1.6 beta 1 released

2013-06-28 Thread Jacob Kaplan-Moss
Hi folks -- I'm pleased to announce that we've just released Django 1.6 beta 1, the second in our series of preview releases leading up to Django 1.6 (due in August). More information can be found on our blog: https://www.djangoproject.com/weblog/2013/jun/28/django-16-beta-1-released/ And in

ANNOUNCE: Django 1.6 alpha 1 released

2013-05-26 Thread Jacob Kaplan-Moss
Hi folks -- I'm pleased to announce that we've just released Django 1.6 alpha 1, the first in our series of preview releases leading up to Django 1.6 (due in August). More information can be found on our blog: https://www.djangoproject.com/weblog/2013/may/26/django-16-alpha-1/ And in the

Re: djangoproject.com is down

2013-05-14 Thread Jacob Kaplan-Moss
any future outages like this. Thanks for your patience! Jacob On Tue, May 14, 2013 at 5:53 PM, Jacob Kaplan-Moss <ja...@jacobian.org> wrote: > FYI - djangoproject.com is currently down, I'm investigating and I'll > try to have it back up ASAP. > > In the meantime, if you need

djangoproject.com is down

2013-05-14 Thread Jacob Kaplan-Moss
FYI - djangoproject.com is currently down, I'm investigating and I'll try to have it back up ASAP. In the meantime, if you need to get to the docs, you can hit up the ReadTheDocs mirror: http://django.rtfd.org/ Thanks for your patience, Jacob -- You received this message because you are

[ANN] Django 1.5.1 released

2013-03-28 Thread Jacob Kaplan-Moss
Hi folks -- We've just released Django 1.5.1, a bug fix release that cleans up a couple issues with last month's 1.5 release. The biggest fix is for a memory leak introduced in Django 1.5. Under certain circumstances, repeated iteration over querysets could leak memory - sometimes quite a bit of

Goodbye, Malcolm

2013-03-19 Thread Jacob Kaplan-Moss
Hello fellow Djangonauts, We have difficult news: Malcolm Tredinnick has passed away. Malcolm was a long-time contributor to Django, a model community member, a brilliant mind, and a friend. His contributions to Django — and to many other open source projects — are nearly impossible to

ANNOUNCE: Django 1.4.5, 1.3.7 released, fixing packaging problems

2013-02-20 Thread Jacob Kaplan-Moss
/. Sorry about the mixup! Jacob Kaplan-Moss -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this g

Re: django user model json

2013-02-08 Thread Jacob Kaplan-Moss
Hi Anderson -- First, I need to point out something: On Fri, Feb 8, 2013 at 2:07 PM, Anderson wrote: > 'password': > u'pbkdf2_sha256$1$ObXZ2yN3HATp$3ADUPZrzdvQCkPdJPCakfzILAIF8lPbKgAZLiXm54UI=', You just posted a password -- yours or one of your users -- on a

FYI: Scheduled downtime on djangoproject.com Thursday night

2013-01-29 Thread Jacob Kaplan-Moss
Hey folks -- MediaTemple, our hosting provider for djangoproject.com, is going to be taking our server offline Thursday night while they give us more RAM. The window for downtime is some time between 9PM and 4AM, though the actual downtime itself should be less than an hour. Since most people

Re: Website Documentation Search broken?

2011-12-17 Thread Jacob Kaplan-Moss
On Sat, Dec 17, 2011 at 12:30 AM, kenneth gonsalves wrote: > thanks for the info - the search *has* improved, for example a search > for get_FOO_display used to fail, it now succeeds. But I still need > ddg's site search for multiword searches. Can you be a bit more

Re: Website Documentation Search broken?

2011-12-15 Thread Jacob Kaplan-Moss
On Wed, Dec 14, 2011 at 8:36 PM, kenneth gonsalves wrote: > it is using the default sphinx search which is limited to one word > searches. That's true of the documentation you build locally, but the search on docs.djangoproject.com uses Haystack with the Xapian search

Re: Website Documentation Search broken?

2011-12-14 Thread Jacob Kaplan-Moss
On Wed, Dec 14, 2011 at 10:21 AM, Torsten Bronger wrote: > creecode writes: > >> I can't say for sure but for some time it seems to me that >> searching has become more difficult.  I can't put my finger on any >> specifics.  I have found that some phrases that are

Re: Newbie question - if I add "on delete cascade" to a foreign key on my MySQL db

2011-12-13 Thread Jacob Kaplan-Moss
On Tue, Dec 13, 2011 at 7:22 PM, Mike wrote: > will I still be able to use Django's ORM? Yes, please see https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ForeignKey.on_delete and in particular DO_NOTHING. Jacob -- You received this message because

Re: Alternative to the .using() method

2011-10-11 Thread Jacob Kaplan-Moss
On Tue, Oct 11, 2011 at 3:47 PM, Sells, Fred wrote: > I'm using a MySQL database and one table resides in a separate database > than all the others.  It's a generic logging table. > > I understand the use of the .using() method, but I wonder if there is a > way to

Re: Why can't "directly" change array elements of model objects in Django shell?

2011-10-07 Thread Jacob Kaplan-Moss
On Fri, Oct 7, 2011 at 10:30 AM, Chris Seberino wrote: > > I've noticed that this doesn't often work in Django shell... > > x = MyModel.objects.all() > x[3].some_field = "new value" > x[3].save() > > Rather, I must often do this... > > temp = x[3] > temp.some_field = "new

Re: queryset.delete() ON DELETE ...

2011-09-27 Thread Jacob Kaplan-Moss
On Tue, Sep 27, 2011 at 8:30 AM, Thomas Guettler wrote: > it seems, that the django ORM can only do deletes which result in a lot > of SQL-Queries to do "on delete cascade" in python code. > > https://docs.djangoproject.com/en/1.3/ref/models/querysets/#delete > > Is there a way

Re: How to solve MultiValueDictKeyError

2011-09-21 Thread Jacob Kaplan-Moss
On Wed, Sep 21, 2011 at 5:43 AM, Tom Evans wrote: > On Wed, Sep 21, 2011 at 11:33 AM, Kayode Odeyemi wrote: >> Hello friends, >> >> I don't know why Django is so unstable. > > I don't know why you cross posted this to django-developers. Tom, the

Re: refreshing a page loaded via POST

2011-09-14 Thread Jacob Kaplan-Moss
On Wed, Sep 14, 2011 at 2:12 AM, mohammed safeer.mtp wrote: > if a user hits “Refresh” on a page that was loaded via POST, that request is > be repeated. > is there any remedy for this problem?? No, you can't prevent a web browser from re-POSTing forms. What you can do is

Re: Alter the list of fields returned by a queryset without turning them into strings?

2011-09-12 Thread Jacob Kaplan-Moss
On Mon, Sep 12, 2011 at 8:41 PM, Joshua Russo wrote: > Do I just need to do a little more pre-processing in the view or can I > accomplish what I'm trying to do? The method you're looking for is ``only()`` (or perhaps its cousin, ``defer``):

Re: Testing reusable apps

2011-09-02 Thread Jacob Kaplan-Moss
On Fri, Sep 2, 2011 at 9:16 AM, Tomek Paczkowski wrote: > Hi, I cannot find any good source on how test reusable apps. I poked around > and found out that people (django-registration, south) tests on blank > project. > This seems kind of wrong having to make some outside directory

Re: HttpResponseRedirect adds hostname?

2011-08-23 Thread Jacob Kaplan-Moss
On Tue, Aug 23, 2011 at 4:01 PM, Jacob Kaplan-Moss <ja...@jacobian.org> wrote: > However, I believe it's not actually Django doing the rewriting. Scratch that: I'm wrong. Actually, Django *is* doing the re-writing: see https://code.djangoproject.com/browser/django/trunk/django/http/uti

Re: HttpResponseRedirect adds hostname?

2011-08-23 Thread Jacob Kaplan-Moss
On Tue, Aug 23, 2011 at 3:50 PM, Roy Smith wrote: > Why does it do this?  It seems like it should just take the string I passed > it and stick that into the header, no? No - that might seem intuitive, but it's incorrect. The HTTP standard specifies that the Location header

Re: Cascading Deletes on ManyToManyField

2011-08-17 Thread Jacob Kaplan-Moss
On Wed, Aug 17, 2011 at 6:12 AM, Jeremy Keeshin wrote: > I have an Item model that has many Tags. If I delete a Tag, I want to make > sure the related Items are not deleted. I tested this out on my local > database, and it seems that there are no cascading deletes with many to

Re: Django 1.3 admin added methods login requirement

2011-08-12 Thread Jacob Kaplan-Moss
On Fri, Aug 12, 2011 at 10:32 AM, Chris Fraschetti wrote: > I believe that in earlier versions of django if you added a view > method to an admin, and extended the get_urls method that because it > was under the admin it would automatically require at least a log in >

Re: Calculation for each object in a QuerySet

2011-08-05 Thread Jacob Kaplan-Moss
On Fri, Aug 5, 2011 at 1:49 PM, nixlists wrote: > I need a view where for every row returned from Claim I make a > calculation based on quantity from the Claim, rebate_pct and wac. Is > it possible to write a model method that would access these fields > from the other

Re: Calculation for each object in a QuerySet

2011-08-04 Thread Jacob Kaplan-Moss
On Thu, Aug 4, 2011 at 2:14 PM, nixlists wrote: > How one would approach this? Do I iterate over the whole QuerySet, > adding a calculated value to each object? What about pagination as > done in the generic methods? Well, without more details about your model(s) and what

Re: Satchmo, the bloated manatee

2011-07-29 Thread Jacob Kaplan-Moss
Hi Bobby -- I'm quite sorry if you took my words as a threat. Such wasn't my intent -- at all. I'm simply trying to make clear certain community expectations. You're completely right that banning would be wildly inappropriate, and I certainly wasn't suggesting that. The Django community has

Re: Satchmo, the bloated manatee

2011-07-29 Thread Jacob Kaplan-Moss
On Thu, Jul 28, 2011 at 11:16 AM, Cal Leeming [Simplicity Media Ltd] wrote: > Hold on, we are in danger of restricting the freedom of speech on this > mailing list. There is no right to free speech on a mailing list. We already restrict what's allowed on

Re: How do I change my user password on Django's bug tracker?

2011-07-28 Thread Jacob Kaplan-Moss
On Tue, Jul 26, 2011 at 7:07 AM, cool-RR wrote: > How do I change my user password on Django's bug tracker? https://www.djangoproject.com/accounts/password/change/ If you've forgotten your password, see https://www.djangoproject.com/accounts/password/reset/. Jacob --

Re: Satchmo, the bloated manatee

2011-07-28 Thread Jacob Kaplan-Moss
On Thu, Jul 28, 2011 at 7:15 AM, Bobby Roberts wrote: > satchmo has become a bloated manatee of a codebase. Hey, this isn't OK. I can tell you're frustrated, but insulting other people's work isn't acceptable around here. You should realize there are real people, just like

Re: Changes from 1.2.5 to 1.4 pre-alpha?

2011-07-22 Thread Jacob Kaplan-Moss
On Fri, Jul 22, 2011 at 4:36 AM, Rodney Topor wrote: > I've been away from Django for over 6 months.  Previously I was using > 1.2.5.  Now I'll be using 1.4 pre-alpha. > > Can someone please point me to a good summary of the main changes made > between these two versions? See

Re: Recommendations for load testing/profiling a django site server?

2011-07-22 Thread Jacob Kaplan-Moss
On Thu, Jul 21, 2011 at 5:03 PM, br wrote: > I am running on a Linode 768 VPS and may have some stuff going live > before too long.  I'm wondering what the best way to guage whether I > have enough bandwidth/CPU/memory to handle a significant amount of > traffic is and/or to

Re: Django Knowledge Strorehouse

2011-07-10 Thread Jacob Kaplan-Moss
On Sat, Jul 9, 2011 at 8:01 AM, Cal Leeming [Simplicity Media Ltd] wrote: > Hmm, some concerns: Luckily, it's open source: https://github.com/django/djangoproject.com -- patches welcome! [If you want to add search to the community aggregator that'd make me

Re: throttling login attempts to avoid brute force attacks

2011-07-08 Thread Jacob Kaplan-Moss
Hi folks -- Also see http://simonwillison.net/2009/Jan/7/ratelimitcache/ for a discussion of a similar technique built on top of memcached. Jacob -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: 'module' object has no attribute 'Manipulator'

2011-06-24 Thread Jacob Kaplan-Moss
On Fri, Jun 24, 2011 at 3:00 PM, CareerDhaba tech wrote: > I am very new to Django just started working around with forms. I have been > facing difficulty in getting a user registered. Anyways i was following > steps given in James Bennet blog. > >

Re: Best practices to secure admin site

2011-06-23 Thread Jacob Kaplan-Moss
On Thu, Jun 23, 2011 at 3:33 PM, Phui-Hock wrote: > This question has been asked a few times, but is there a general set > of best practices one should follow to secure Django admin site? A > quick check on some of the Django powered websites leave /admin/ open > to public

Re: Django 1.3 docs PDF

2011-06-01 Thread Jacob Kaplan-Moss
On Wed, Jun 1, 2011 at 4:47 PM, Oscar Carballal wrote: > I've just created a PDF (5.6MB, 1042 pages) with all the django 1.3 > docs [|], just in case someone need it (sometimes it's useful to have > the docs offline). Also see http://readthedocs.org/projects/django/, which has

Re: Specifying a database for a specific app

2011-05-30 Thread Jacob Kaplan-Moss
On Mon, May 30, 2011 at 10:00 AM, Philip Zeyliger wrote: > I have several installed applications within my Hue environment.  I'd like > to use the multiple database support to route all database requests > associated with apptwo.models into a database called "apptwo", while

Re: Is there an HTML editor that's Django-aware

2011-05-30 Thread Jacob Kaplan-Moss
On Monday, May 30, 2011, BobX wrote: > If anyone from the Django Project itself is listening then can I (very > humbly) suggest that some editor recommendations would make a real > fine addition to the info on the site (useful to n00b's like me > anyway). That's a good

Re: Weird Error when following django book?

2011-05-25 Thread Jacob Kaplan-Moss
On Wed, May 25, 2011 at 1:04 PM, Boštjan Mejak wrote: > HTML source code can't be passed as a string. You morons. This isn't OK. Stop it at once. You've been warned about your tone once before. Please aim for a professional, polite tone here or find another group to

Re: forum and blog for developers

2011-05-22 Thread Jacob Kaplan-Moss
I think you're looking for http://www.djangoproject.com/community/. Jacob -- 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 this group, send email to

Re: Static files

2011-05-18 Thread Jacob Kaplan-Moss
Hi John -- Next time, can you please try to be a bit more polite? If you adopted this sort of tone in person I'd write you off as a crazy person and get away as quickly as possible. What makes you think it's acceptable here? Most people -- and I'm one -- have a severe allergy to answering

Re: Pre fork or worker MPM

2011-05-17 Thread Jacob Kaplan-Moss
On Tue, May 17, 2011 at 6:00 PM, ydjango wrote: > I remembered reading this long back - "Django requires Apache 2.x and > mod_python 3.x, and you should use Apache’s prefork MPM, as opposed to > the worker MPM." That statement dates back to when Django wasn't threadsafe

Re: Pre fork or worker MPM

2011-05-17 Thread Jacob Kaplan-Moss
On Tue, May 17, 2011 at 4:15 PM, ydjango wrote: > I am using Python 2.5, django 1.1 with mod_wsgi 2.5 > > Does it matter if I use prefork or worker MPM for apache? In general, worker will use less RAM, thus allowing higher concurrency and usually higher perceived

Re: REMOTE_USER authentication to 'Admin'?

2011-05-17 Thread Jacob Kaplan-Moss
On Tue, May 17, 2011 at 2:00 PM, Jeff Blaine wrote: > That gets us somewhere, because authenticating to Apache/LDAP as jblaine > did NOT make a Django user jblaine. That's interesting - perhaps LDAP is reporting a different username? You could check in the auth_user table to

Re: REMOTE_USER authentication to 'Admin'?

2011-05-17 Thread Jacob Kaplan-Moss
On Tue, May 17, 2011 at 1:31 PM, Jeff Blaine wrote: > Hi folks, > I'm successfully using Apache with mod_authnz_ldap, WSGI, Django 1.3.  If I > hit > '/admin', I get asked to authenticate (BasicAuth done through LDAP).  I > succeed. > However, this just results in me then

Re: How to choose a license for an app or a project?

2011-05-15 Thread Jacob Kaplan-Moss
On Sun, May 15, 2011 at 9:58 PM, Kenneth Gonsalves wrote: > go read the GPL and stop irritating everyone here. Kenneth, that's uncalled-for -- please don't respond to rudeness with more rudeness. It's pretty clear to me that this discussion is incredibly off-topic and

Re: Cache entire page *except* one block?

2011-05-13 Thread Jacob Kaplan-Moss
On Fri, May 13, 2011 at 3:01 PM, Nan wrote: > I'm working on a site where about 95% of the pages are "static" and > change no more than once a week, and should therefore be cached; > however, there are a couple blocks in the base template (login forms, > blocks that load

Re: How to choose a license for an app or a project?

2011-05-13 Thread Jacob Kaplan-Moss
On Fri, May 13, 2011 at 12:35 PM, Boštjan Mejak wrote: > Where to put my license? In a file or in all the modules? I'll use MIT > license. Do I need to disclose the source code? I'm sorry, but I have a policy of not answering questions that are asked rudely, and you're

Re: How to choose a license for an app or a project?

2011-05-13 Thread Jacob Kaplan-Moss
On Fri, May 13, 2011 at 12:06 PM, Boštjan Mejak wrote: > This is getting way out of hand. I was hoping for a simple yes/no answer. > And what I got? A bunch of yada yada. This tone is uncalled for and borderline unacceptable here. You have no right to demand anything

Re: How to choose a license for an app or a project?

2011-05-13 Thread Jacob Kaplan-Moss
On Fri, May 13, 2011 at 11:30 AM, Thomas Weholt wrote: > Hmmm ... maybe, but because of the reusable app focus in django I > think some sort of guideline regarding choice of license could be > important. The problem is that license choice is one of those "holy wars" that

Re: Can django admin log be trusted?

2011-05-10 Thread Jacob Kaplan-Moss
On Tue, May 10, 2011 at 4:59 PM, Paweł Roman wrote: > But does that mean that the django admin log is broken and cant be > trusted? How come there isnt any trace of adding those items? Well, I'd say "broken" might be a bit strong. Some cars drive 200 MPH, but mine

Re: Loading initial data with a post_syncdb hook?

2011-05-08 Thread Jacob Kaplan-Moss
On Sun, May 8, 2011 at 4:25 PM, Adam Seering wrote: > I have some Python code that generates initial data for some of my tables; I > currently call that code from a post_syncdb hook. In Django 1.3, it looks like > Django now calls TRUNCATE (or an equivalent non-PostgreSQL-ism)

Re: curl pages behind login_required

2011-05-08 Thread Jacob Kaplan-Moss
On Sun, May 8, 2011 at 3:17 PM, CarlFK wrote: > I am trying to curl pages that require being logged in via django's > default auth.  I don't care if the actual login is done with curl, > python, firefox or whatever is easiest. Are you wedded to curl for the download? If it

Re: how to use jquery for point of Sale

2011-05-06 Thread Jacob Kaplan-Moss
On Fri, May 6, 2011 at 10:21 AM, Shawn Milochik wrote: > How to ask an actual question so maybe someone can answer it. Shawn, that's uncalled-for. I'm super-impressed with how much work you're putting into answer people's questions here, and I really do appreciate it. But

Re: how to use jquery for point of Sale

2011-05-06 Thread Jacob Kaplan-Moss
On Fri, May 6, 2011 at 10:21 AM, Shawn Milochik wrote: > How to ask an actual question so maybe someone can answer it. Shawn, that's uncalled-for. I'm super-impressed with how much work you're putting into answer people's questions here, and I really do appreciate it. But

Re: How to draw line charts in Django?

2011-05-05 Thread Jacob Kaplan-Moss
On Thu, May 5, 2011 at 5:05 AM, Nge wrote: > I already created a view and can extract data from database.But I have > a problem. I don't know how to send to template and how to create js/ > ajax. Can you share me sample? I've recently done a project that uses Ajax,

Re: Django orm group_by difficulties

2011-05-04 Thread Jacob Kaplan-Moss
On Wed, May 4, 2011 at 9:23 AM, Satan Study Django wrote: > I can also use the direct sql query in the code. But on cellular it > level does not seem right -) Well, if it were me, I'd just use the raw SQL. I'd guess that about 5 to 10% of the time

Re: Stuck at integration step w/ WSGI

2011-05-03 Thread Jacob Kaplan-Moss
On Tue, May 3, 2011 at 5:07 PM, Jeff Blaine wrote: > Thanks Jacob -- does the site entry in the database have to be anything > specific?  We don't really use that.  Just put any old thing in there via > Admin in the development server? Well, if you want all the parts of the

Re: Stuck at integration step w/ WSGI

2011-05-03 Thread Jacob Kaplan-Moss
Hi Jeff -- To make the admin work w/r/t sites, you'll need three things: * An entry in the sites table. * A setting SITE_ID set to the ID of the Site entry you'd like to use (i.e. SITE_ID = 1). * `django.contrib.sites` in your INSTALLED_APPS. Check all three; I'll be you're missing one or two

Re: Django Admin template

2011-05-03 Thread Jacob Kaplan-Moss
On Tue, May 3, 2011 at 1:23 PM, Rich wrote: > I know it's possible to overwrite the Django admin templates by > copying the templates to your local project.  I want to modify the > "add user" template but cannot seem to figure out which template it > is.  I want to create

Re: .save() works with no (custom, not 'id') primary key specified?

2011-04-29 Thread Jacob Kaplan-Moss
On Fri, Apr 29, 2011 at 12:17 PM, Jeff Blaine wrote: > "primary_key=True implies null=False and unique=True. Only one primary key > is allowed on an object." > So that unique=True part is inaccurate?  Or is that, again, another thing > that will fail only at validation? Maybe

Re: .save() works with no (custom, not 'id') primary key specified?

2011-04-29 Thread Jacob Kaplan-Moss
On Fri, Apr 29, 2011 at 11:47 AM, Jeff Blaine wrote: > How is this possible based on the model below? > d = Device() > d.save() > # no errors > class Device(models.Model): >     propertyno      = models.CharField('Property Number', >                                       

Re: Django ORM question about lookups that span relationships

2011-04-22 Thread Jacob Kaplan-Moss
On Fri, Apr 22, 2011 at 5:36 AM, Michael Radziej wrote: > In SQL, it's something along > > SELECT ... FROM blog > JOIN entry e1 on e1.entry_id = blog.id >     AND e1.pub_date <= ... >     AND e1.headline LIKE "%Easter%" >     AND NOT exists >     ( SELECT id from entry e2 >      

Re: website path

2011-04-20 Thread Jacob Kaplan-Moss
2011/4/20 Ján Vorčák : >    PythonHandler django.core.handlers.modpython You really, really, really should upgrade to mod_wsgi. mod_python is a dead project, and support for it be removed from Django in the future. More importantly, you're not going to find a whole lot of

Re: Unidirectional relations

2011-04-19 Thread Jacob Kaplan-Moss
2011/4/19 Juan Pablo Romero Méndez : > Is it possible to create unidirectional relations within django's orm? > > What I mean is a situation where a parent has a children_set of > references to children, but the children don't have any reference to > the father. See the

Re: website path

2011-04-19 Thread Jacob Kaplan-Moss
2011/4/19 Ján Vorčák : > I've installed a django on my server (running on apache), but I've > configured it to run using url like > www.mydomain.com/django-application/ > > Now when I access some url from django using absolute url it > automatically redirects me to >

Re: db routing by request

2011-04-19 Thread Jacob Kaplan-Moss
On Tue, Apr 19, 2011 at 5:06 AM, Michael P. Soulier wrote: > I noticed that the request object is not passed to the database router, the > intention seems to mainly be to route by model. I have a case where I want to > route based on session data in the request. While I

Re: Cannot submit tickets - always marked as spam!

2011-04-19 Thread Jacob Kaplan-Moss
Hi Jeff -- It's not you; we get a *lot* of spam, and so our spam filters are overly aggressive. You can get around 'em if you create an account. Just visit http://www.djangoproject.com/accounts/register/, register, and then log into Trac once you have the account set up. Thanks, and sorry about

Re: get_object_or_404 Tutorial part 3

2011-04-13 Thread Jacob Kaplan-Moss
On Wed, Apr 13, 2011 at 6:41 AM, Yuka Poppe wrote: > I noticed this myself a while back; It was'nt django specific, and I dont > know about IE, I generally try to avoid using that; But in case of Chrome, > whenever it encounters a 404 error (or certain other conditions) it seems

Re: Please find it in your hearts to expose filter_or_exclude at a global level.

2011-04-11 Thread Jacob Kaplan-Moss
On Mon, Apr 11, 2011 at 11:23 AM, sh...@bogomip.com wrote: > IMHO (which is very H) _filter_or_exclude should be public.  I can't > find a compelling reason for it not to be other than it has never > been. Just go ahead and use it if you find it useful! The Python philosophy

Re: Best Practice for Raw SQL

2011-04-11 Thread Jacob Kaplan-Moss
On Mon, Apr 11, 2011 at 7:53 AM, Dan Gentry wrote: > Where I run into trouble is that the query returns data in columns, > but not objects. That means that I can’t reference an object attribute > using dot notation in my templates or views. Instead, I have to > include each

Re: Cascade delete not entirely correct in 1.3?

2011-04-06 Thread Jacob Kaplan-Moss
On Wed, Apr 6, 2011 at 2:41 PM, Aaron Madison wrote: > I'm not sure if attaching files straight through email will work or not... I meant on the ticket. django-users is so high traffic that it's likely that developers could miss stuff posted here, so giving all the

Re: Cascade delete not entirely correct in 1.3?

2011-04-06 Thread Jacob Kaplan-Moss
On Wed, Apr 6, 2011 at 11:14 AM, amadison wrote: > It you run the test case against django 1.3 it blows up... in django > 1.2.5 it passes. Just a quick process point: it helps a lot if you post the actual error you're seeing, traceback and all. Unless Django's

Re: model manager and request

2011-03-30 Thread Jacob Kaplan-Moss
On Wed, Mar 30, 2011 at 1:11 PM, Tony wrote: > Is there a way to use the "request.user" attributes in a custom model > manager?  So I could filter by certain attributes the current logged > in user has?  This is the preferable way I would like to filter the > objects the user

Re: Admin broken with large data table

2011-03-29 Thread Jacob Kaplan-Moss
On Tue, Mar 29, 2011 at 5:56 AM, Malcolm Box wrote: > On one of my models, the admin choice_list page is taking minutes to > load, which makes it somewhat broken. > > The table has about 2M rows and about 2.6GB in size, on InnoDB/MySQL. > As far as I can tell, what's

Re: Updating to Django 1.3 - how to preserve file field previous behaviour

2011-03-28 Thread Jacob Kaplan-Moss
On Sun, Mar 27, 2011 at 6:47 PM, Russell Keith-Magee wrote: > As was suggested when you raised this on django-dev, if you want the > old behavior, write a subclass of FileField that reintroduces the old > behavior. ... and for those who're not reading over there, here's

Re: Read-only fields and complex relationships in admin

2011-03-25 Thread Jacob Kaplan-Moss
On Fri, Mar 25, 2011 at 6:39 PM, Micah Carrick wrote: > I have an application which handles a typical "checkout" process for an > e-commerce website. Orders from online customers end up in several models [... snip complex problem ...] > Anybody have any tips, links to

Re: unique_for_date not working?

2011-03-25 Thread Jacob Kaplan-Moss
Hi Ryan -- On Fri, Mar 25, 2011 at 3:55 AM, Ryan Osborn wrote: > I am using django 1.3 and have the following in my models.py: > > class Entry(models.Model): >    title = models.CharField(max_length=255) >    slug = models.SlugField(unique_for_date='created') >    

Re: how to select tables in inspectdb?

2011-03-24 Thread Jacob Kaplan-Moss
On Thu, Mar 24, 2011 at 3:07 PM, Savio Sabino wrote: > How I select what tables (in a db with 900 tables) has the model > generated for inpectdb? Sorry, but you can't: you'll need to run inspectdb and then edit the generated code by hand to edit out the models you don't want.

Re: Override table name(s) in application deployment

2011-03-24 Thread Jacob Kaplan-Moss
On Thu, Mar 24, 2011 at 12:30 PM, Flo Ledermann wrote: > I was quite surprised that I couldn't find a way to override table > names for an application's models on a per-deployment basis (i.e. in > settings.py or some other project/site specific file instead of >

Re: Custom admin interface

2011-03-24 Thread Jacob Kaplan-Moss
Hi Tsolmon -- You can find documentation on Django's admin interface at http://docs.djangoproject.com/en/1.3/ref/contrib/admin/. It should tell you enough to get started. Jacob -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: How to install psycopg2 using Pip?

2011-03-24 Thread Jacob Kaplan-Moss
Hi Andre -- This indicates that you don't have the development packages for PostgreSQL. psycopg2 is written mostly in C, and needs to be compiled and linked against PostgreSQL. It does this by running a command called pg_config, which is part of the PostgreSQL dev package. You haven't indicated

Re: Django multiple databases router

2011-03-23 Thread Jacob Kaplan-Moss
Howdy -- On Tue, Mar 22, 2011 at 5:17 AM, dy wrote: > # model in app test2,store to test2 > class Test2(models.Model): >    name = models.CharField(max_length=30,verbose_name="test2") >    test1 = >

Re: ANN: Server upgrade on djangoproject.com

2011-01-31 Thread Jacob Kaplan-Moss
On Mon, Jan 31, 2011 at 2:40 AM, Shawn Milochik wrote: > I'm seeing the code samples being cut off in the docs as well. > http://docs.djangoproject.com/en/dev/topics/signals/ > See sample under: > Preventing duplicate signals It's working for me (Chrome/Safari OSX), so it's

Re: ANN: Server upgrade on djangoproject.com

2011-01-28 Thread Jacob Kaplan-Moss
On Fri, Jan 28, 2011 at 3:33 PM, Jacob Kaplan-Moss <ja...@jacobian.org> wrote: > I'm starting the switchover to the new djangoproject.com server right > now. Might be around 5 mins of downtime or so. Migration should be complete now. I'm still cleaning up a few last-minute things

ANN: Server upgrade on djangoproject.com

2011-01-28 Thread Jacob Kaplan-Moss
Hi folks -- I'm starting the switchover to the new djangoproject.com server right now. Might be around 5 mins of downtime or so. Jacob -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Call for proposals -- PyCon 2011

2010-09-23 Thread Jacob Kaplan-Moss
Call for proposals -- PyCon 2011 -- === Proposal Due date: November 1st, 2010 PyCon is back! With a rocking new website, a great location and more Python hackers and luminaries under one roof than you could

Re: Setting initial data for an M2M field

2010-02-16 Thread Jacob Kaplan-Moss
On Tue, Feb 16, 2010 at 10:01 AM, Tom wrote: > I can set other initial data, for example to the 'notes' CharField > fine.  I guess my question boils down to: how do you set initial data > for a many-to-many field? The initial data for a many to many field needs to be a list.

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

2009-10-09 Thread Jacob Kaplan-Moss
Just as an update for anyone following this thread: This was indeed a security exploit, and it has been fixed. See http://www.djangoproject.com/weblog/2009/oct/09/security/ for details. Jacob --~--~-~--~~~---~--~~ You received this message because you are

Re: ImageFile bug? (Re: ImageField questions)

2009-07-28 Thread Jacob Kaplan-Moss
On Sun, Jul 26, 2009 at 11:10 PM, Rusty Greer wrote: > i applied the patch you mentioned before (to my 1.0.2 release): Yeah, the fix is predicated on some file storage refactoring that's too intensive to reach the 1.0.X series. You'll need to upgrade to 1.1 to get the fix.

Re: ImageFile bug? (Re: ImageField questions)

2009-07-26 Thread Jacob Kaplan-Moss
2009/7/24 Rusty Greer : > that bug actually doesn't fix my case.  if i alter the patch to just > do a file.close() in all cases, it works.  is there another patch to > close the file opened outside of this class? I'm not sure I follow; let me make sure I understand you: *

  1   2   3   4   5   >