Re: [Django] #9398: Show first_name and last_name elements in admin interface

2008-10-18 Thread Django
#9398: Show first_name and last_name elements in admin interface
+---
  Reporter:  cornbread  | Owner:  nobody
Status:  closed | Milestone:
 Component:  Documentation  |   Version:  1.0   
Resolution:  invalid|  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by julien):

 Another remark: maybe you should first ask on the user mailing list if
 you're stuck with something.
 http://groups.google.com/group/django-users/topics

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #9398: Show first_name and last_name elements in admin interface

2008-10-18 Thread Django
#9398: Show first_name and last_name elements in admin interface
+---
  Reporter:  cornbread  | Owner:  nobody
Status:  closed | Milestone:
 Component:  Documentation  |   Version:  1.0   
Resolution:  invalid|  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by julien):

  * status:  new => closed
  * needs_better_patch:  => 0
  * resolution:  => invalid
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 Could you be more specific in your request? The admin system already
 allows lots of customization and I'm pretty sure we don't need to modify
 anything in Django for that. Plus, the first and last names are already
 displayed by default, so I really don't see what you're after.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



[Django] #9398: Show first_name and last_name elements in admin interface

2008-10-18 Thread Django
#9398: Show first_name and last_name elements in admin interface
---+
 Reporter:  cornbread  |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Documentation  | Version:  1.0   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 I have been looking for a way to do this for the last couple hours...

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #9397: weird HttpResponseRedirect reaction to url

2008-10-18 Thread Django
#9397: weird HttpResponseRedirect reaction to url
+---
  Reporter:  billychasen| Owner:  nobody
Status:  new| Milestone:
 Component:  Uncategorized  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by billychasen):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 I mistyped on the regex -- please ignore the $ (dollar sign) on the end

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



[Django] #9397: weird HttpResponseRedirect reaction to url

2008-10-18 Thread Django
#9397: weird HttpResponseRedirect reaction to url
---+
 Reporter:  billychasen|   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  1.0   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 If I have a url defined, such as:

 (r'^hello$', 'mysite.index.views.hello')

 and let's say I have a page on http://mysite.net that redirects via
 HttpResponseRedirect(reverse('mysite.index.views.hello'))

 If I am at http://www.mysite.net -- it correctly goes to
 http://www.mysites.net/hello
 If I am at http://mysite.net (no www) -- it redirects to
 http://mysite.net/.net/hello

 It's easily fixed by changing the url definition to

 (r'^hello/$', 'mysite.index.views.hello')  (adding a trailing forward
 slash)

 Seems to me though, that this shouldn't be required (seems a little buggy
 and took awhile to track down)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #9396: FILE_UPLOAD_TEMP_DIR ignored on Windows?

2008-10-18 Thread Django
#9396: FILE_UPLOAD_TEMP_DIR ignored on Windows?
---+
  Reporter:  spkane| Owner:  nobody 
  
Status:  closed| Milestone:  post-1.0   
  
 Component:  Database layer (models, ORM)  |   Version:  1.0
  
Resolution:  invalid   |  Keywords:  
FILE_UPLOAD_TEMP_DIR, SuspiciousActivity, Windows
 Stage:  Unreviewed| Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Changes (by kmtracey):

  * status:  new => closed
  * needs_better_patch:  => 0
  * resolution:  => invalid
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 There's not enough information here to diagnose what is going wrong.  I'm
 reasonably certain that FILE_UPLOAD_TEMP_DIR is not ignored on Windows (I
 believe I've used it in the past, and it has worked properly), so I
 suspect user error.  Please post to django-users and include:

 1 - The actual title of the book you are using.  There is more than one
 Django book published by Apress, and the one that is available for reading
 online has no mention of uploading files in chapter 6, so you must be
 using a different one.

 2 - Some description of what you are doing and at least bits of the code
 involved.  Not everyone who might be able to help has a copy of every
 Django book out there, so unless you describe what's being covered in
 chapter 6 you'll be limiting help to those people who have that book.

 3 - The full error message you are getting, including traceback if there
 is one.  Saying its "related to !SuspiciousActivitty" is not enough
 information for people to go on.

 If after discussion on django-users it becomes clear that there is
 actually an error in the Django code, then open a ticket.

 One thing I will mention is that the problem may be related to how you
 have specified your FILE_UPLOAD_TEMP_DIR.  In Python backslashes in string
 literals are escape characters, so setting FILE_UPLOAD_TEMP_DIR =
 'c:\djcode\mysite\temp' won't work as expected.  You need to either use
 forward slashes, specify the setting as a raw string (i.e.
 r'c:\djcode\mysite\temp'), or double the backslahses.

 Also for future reference when attaching patch files please create the
 patch from the root of the django tree, so that the full path name of the
 file is clear.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



[Django] #9396: FILE_UPLOAD_TEMP_DIR ignored on Windows?

2008-10-18 Thread Django
#9396: FILE_UPLOAD_TEMP_DIR ignored on Windows?
---+
 Reporter:  spkane |   Owner:  
nobody
   Status:  new|   Milestone:  
post-1.0  
Component:  Database layer (models, ORM)   | Version:  
1.0   
 Keywords:  FILE_UPLOAD_TEMP_DIR, SuspiciousActivity, Windows  |   Stage:  
Unreviewed
Has_patch:  1  |  
---+
 When running Django 1.0 on Windows XP, I am getting an error when uploaded
 a headshot (image), while adding an author from the Chapter 6 tutorial in
 the Django Apress book. The error is related to "SuspiciousActivity",
 however my FILE_UPLOAD_TEMP_DIR directory is set to
 'c:\djcode\mysite\temp' which should be safe. The issue, based on the
 error message, however seems to be that it is actually trying to save the
 image into /tmp, which of course causes a problem on Windows. I was able
 to get this working for myself by patching
 django\db\models\fields\files.py.

 I am a pretty new Python programmer and I realize that this patch is a
 hack, since I am forcing something to happen here and possibly over
 ridding a legitimate value. I tried to change the initial init from
 upload_to='' to upload_to=settings.FILE_UPLOAD_TEMP_DIR. However that
 didn't work, so it seems that the class is getting initialized with a
 value, but it is the wrong value, and I could not trace the code back any
 further. This patch works for me, but it would be nice to have a proper
 solution in the future.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #9394: Querying a many-to-many intermediate model from a manager on a multi-table inherited model produces extraneous queries

2008-10-18 Thread Django
#9394: Querying a many-to-many intermediate model from a manager on a 
multi-table
inherited model produces extraneous queries
---+
  Reporter:  ikelly| Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Old description:

> With the following models:
> {{{
> class Place(models.Model):
> name = models.CharField(max_length=50)
>
> class Business(Place):
> owner = models.CharField(max_length=50)
>
> class Restaurant(Business):
> rating = models.IntegerField()
>
> class Chef(models.Model):
> name = models.CharField(max_length=50)
> restaurants = models.ManyToManyField(ChineseRestaurant,
> through='Employee')
>
> class Employee(models.Model):
> restaurant = models.ForeignKey(ChineseRestaurant)
> chef = models.ForeignKey(Chef)
> years_of_service = models.IntegerField()
> }}}
> we can do {{{some_restaurant.employee_set.all()}}}, which results in
> three queries.  The first two queries are just retrieving the attributes
> of the inherited Business and Place models, which is unnecessary since
> all that information already exists on the some_restaurant object.  Only
> one query should be needed.

New description:

 With the following models:
 {{{
 class Place(models.Model):
 name = models.CharField(max_length=50)

 class Business(Place):
 owner = models.CharField(max_length=50)

 class Restaurant(Business):
 rating = models.IntegerField()

 class Chef(models.Model):
 name = models.CharField(max_length=50)
 restaurants = models.ManyToManyField(Restaurant, through='Employee')

 class Employee(models.Model):
 restaurant = models.ForeignKey(Restaurant)
 chef = models.ForeignKey(Chef)
 years_of_service = models.IntegerField()
 }}}
 we can do {{{some_restaurant.employee_set.all()}}}, which results in three
 queries.  The first two queries are just retrieving the attributes of the
 inherited Business and Place models, which is unnecessary since all that
 information already exists on the some_restaurant object.  Only one query
 should be needed.

Comment (by ramiro):

 (edited code example in the description as per Ian's note above, replacing
 `ChineseRestaurant` with `Restaurant`.)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #6972: Cheese shop entry for django is broken

2008-10-18 Thread Django
#6972: Cheese shop entry for django is broken
+---
  Reporter:  Ionel Maries <[EMAIL PROTECTED]>  | Owner:  nobody
Status:  new| Milestone:
 Component:  Uncategorized  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by eibaan):

 As a workaround (at least on Linux/OSX) one can use
 {{{
 easy_install http://code.djangoproject.com/svn/django/tags/releases/1.0/
 }}}
 or
 {{{
 easy_install http://code.djangoproject.com/svn/django/trunk/
 }}}
 to download & install Django.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---