Re: [Django] #10497: Added 'stat' method to class Storage and FileSystemStorage

2010-09-11 Thread Django
#10497: Added 'stat' method to class Storage and FileSystemStorage
---+
  Reporter:  HuCy  | Owner:  tobias 
Status:  assigned  | Milestone: 
 Component:  File uploads/storage  |   Version: 
Resolution:|  Keywords:  storage
 Stage:  Unreviewed| Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by tobias):

  * owner:  nobody => tobias
  * status:  new => assigned

-- 
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-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10497: Added 'stat' method to class Storage and FileSystemStorage

2010-09-10 Thread Django
#10497: Added 'stat' method to class Storage and FileSystemStorage
---+
  Reporter:  HuCy  | Owner:  nobody 
Status:  new   | Milestone: 
 Component:  File uploads/storage  |   Version: 
Resolution:|  Keywords:  storage
 Stage:  Unreviewed| Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by steph):

  * version:  1.0 =>
  * component:  Core framework => File uploads/storage
  * stage:  Design decision needed => Unreviewed

Comment:

 I think, added a full os.stat would be hard to implement on non-filesystem
 based storage backends. Because of this fact, i propose to just add three
 new methods to get the accessed time, created time and modified time.

 By splitting the times up in multiple methods, a storage backend can
 decide what times are supported.

 I'll attach a patch with tests and docs to this ticket.

-- 
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-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10497: Added 'stat' method to class Storage and FileSystemStorage

2009-05-21 Thread Django
#10497: Added 'stat' method to class Storage and FileSystemStorage
-+--
  Reporter:  HuCy| Owner:  nobody 
Status:  new | Milestone: 
 Component:  Core framework  |   Version:  1.0
Resolution:  |  Keywords:  storage
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by IanLewis):

 Unfortunately none of the things like protection bits, inode no and other
 disk related information. The data returned by os.stat also will be
 different for different platforms. See
 http://docs.python.org/library/os.html#os.stat

 For instance on POSIX systems you won't be able to get the document
 creation time since it's not included in the file system metadata. And you
 can already get the modified time from the "modified" method.

 I guess you could do something like add custom http headers to your files
 in amazon S3 or your backend to implement the stat command but I don't
 think it would really give you useful information.

-- 
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 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10497: Added 'stat' method to class Storage and FileSystemStorage

2009-03-15 Thread Django
#10497: Added 'stat' method to class Storage and FileSystemStorage
-+--
  Reporter:  HuCy| Owner:  nobody 
Status:  new | Milestone: 
 Component:  Core framework  |   Version:  1.0
Resolution:  |  Keywords:  storage
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by HuCy):

 Parsing the HTTP header is a good idea.
 I think for every storage engine, there's some way to provide the data.
 For example for the CouchDB storage engine, we implemented the stat method
 by adding fields to the CouchDB documents.

-- 
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 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10497: Added 'stat' method to class Storage and FileSystemStorage

2009-03-14 Thread Django
#10497: Added 'stat' method to class Storage and FileSystemStorage
-+--
  Reporter:  HuCy| Owner:  nobody 
Status:  new | Milestone: 
 Component:  Core framework  |   Version:  1.0
Resolution:  |  Keywords:  storage
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by anonymous):

 An HTTP HEAD request would give you some valuable information:

 {{{
 HEAD /testmeplease-us/10mb.bin HTTP/1.1
 Host: s3.amazonaws.com

 HTTP/1.1 200 OK
 Date: Sat, 14 Mar 2009 21:13:16 GMT
 Last-Modified: Fri, 30 Nov 2007 19:36:55 GMT
 ETag: "1a54772a48158d16a8ede6ef10b4ea25"
 Content-Type:
 Content-Length: 10485760
 Server: AmazonS3
 }}}

-- 
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 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10497: Added 'stat' method to class Storage and FileSystemStorage

2009-03-14 Thread Django
#10497: Added 'stat' method to class Storage and FileSystemStorage
-+--
  Reporter:  HuCy| Owner:  nobody 
Status:  new | Milestone: 
 Component:  Core framework  |   Version:  1.0
Resolution:  |  Keywords:  storage
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Changes (by jacob):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Design decision needed
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 I'm not sure this is appropriate for a generic backend interface: how
 would you implement `stat()` for S3, for example?

-- 
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 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



[Django] #10497: Added 'stat' method to class Storage and FileSystemStorage

2009-03-13 Thread Django
#10497: Added 'stat' method to class Storage and FileSystemStorage
+---
 Reporter:  HuCy|   Owner:  nobody
   Status:  new |   Milestone:
Component:  Core framework  | Version:  1.0   
 Keywords:  storage |   Stage:  Unreviewed
Has_patch:  1   |  
+---
 The included patch implements a stat method for Storage and
 FileSystemStorage in django.core.files.storage

 Background:
 We implemented a storage engine for CouchDB in which catalog of products
 are stored as pdf documents.
 The catalogs are re-generated depending on their age - which was easy when
 the default FileSystemStorage was
 used, but more complicated using a custom storage engine that does not use
 a filesystem backend.

 Adding a stat method to the Storage class makes it easier to gain the
 required information, especially for
 derived classes as described above.

-- 
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 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---