Re: [Django] #11228: FieldFile with check if file exists, and don't raise errors by default

2016-09-15 Thread Django
#11228: FieldFile with check if file exists, and don't raise errors by default
-+-
 Reporter:  hersonls |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:   | Triage Stage:  Design
 |  decision needed
Has patch:  1|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * status:  new => closed
 * resolution:   => wontfix
 * easy:  1 => 0


Comment:

 Hi, the correct procedure to reopen a ticket that's closed as wontfix is
 to start a discussion on the DevelopersMailingList.

 In this case, I'm not sure how related your ideas are to the original
 ticket. Please try to include a demonstration of the behavior that's
 problematic. We have what sounds like a similar situation for
 djangoproject.com. The
 
[https://github.com/django/djangoproject.com/blob/d670e0c533133e6926c5e69420ad10b6cbbadd08/fundraising/models.py#L52
 CorporateMember] model has an ImageField for the logo, however, I haven't
 seen any crashes in Django when those files don't exist.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.30a106170aca8f14133d343980e34090%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #11228: FieldFile with check if file exists, and don't raise errors by default (was: FieldFile with check if file exists.)

2016-09-14 Thread Django
#11228: FieldFile with check if file exists, and don't raise errors by default
-+-
 Reporter:  hersonls |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Design
 |  decision needed
Has patch:  1|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  1|UI/UX:  0
-+-

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.0056b5d3a4d3fa08a1a0cff0e474010f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #11228: FieldFile with check if file exists.

2016-09-14 Thread Django
#11228: FieldFile with check if file exists.
-+-
 Reporter:  hersonls |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Design
 |  decision needed
Has patch:  1|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  1|UI/UX:  0
-+-
Changes (by litchfield):

 * type:  New feature => Cleanup/optimization
 * easy:  0 => 1


--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.de27f026e1222dd3f255f29ddbc572fd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #11228: FieldFile with check if file exists.

2016-09-14 Thread Django
#11228: FieldFile with check if file exists.
-+-
 Reporter:  hersonls |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Design
 |  decision needed
Has patch:  1|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by litchfield):

 * status:  closed => new
 * resolution:  wontfix =>


--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.ff44d5b510570af8f64c8b81fb5de9c3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #11228: FieldFile with check if file exists.

2016-09-14 Thread Django
#11228: FieldFile with check if file exists.
-+-
 Reporter:  hersonls |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:   | Triage Stage:  Design
 |  decision needed
Has patch:  1|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by litchfield):

 * cc: litchfield (added)


Comment:

 Sorry to re-open, but the notion that an error is raised when attempting
 to access attributes on a missing file is a wildly impractical default.

 It assumes that "everyone at all times will have a full, up-to-date copy
 of the media folder, that is exactly in sync with the database they're
 running against".

 If you're coding in a little bubble, eg pre-launch, against some bollocks
 test data-- sure, lets raise errors and annoy ourselves. But in the "real
 world" this is often/usually not the case and means you have to move
 around massive media libraries and databases just to work on the site at
 all, without resorting to temporarily commenting stuff out or hacking up a
 custom field.

 The default should be to return None, overridable through the field/model
 definition (eg silent=False). And there should be an exists() method too,
 why not? @aaugustin your presumption above "that you have bigger problems"
 is totally irrelevant in many production scenarios.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.071897a2d0e406327951fe981af8cdf1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #11228: FieldFile with check if file exists.

2011-12-17 Thread Django
#11228: FieldFile with check if file exists.
-+-
 Reporter:  hersonls |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  SVN
  (models, ORM)  |   Resolution:  wontfix
 Severity:  Normal   | Triage Stage:  Design
 Keywords:   |  decision needed
Has patch:  1|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by aaugustin):

 * status:  new => closed
 * ui_ux:   => 0
 * resolution:   => wontfix
 * easy:   => 0


Comment:

 Like Chris, I doubt this would be generally useful. If you're losing
 files, you're got bigger problems than broken links in your templates!

 Furthermore, it's trivial to subclass !FileField to add this method if you
 need it.

-- 
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] #11228: FieldFile with check if file exists.

2009-06-17 Thread Django
#11228: FieldFile with check if file exists.
---+
  Reporter:  hersonls  | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Design decision needed| Has_patch:  1 
Needs_docs:  1 |   Needs_tests:  1 
Needs_better_patch:  1 |  
---+
Changes (by SmileyChris):

  * stage:  Unreviewed => Design decision needed

Comment:

 And "is_exists" seems ugly. Why not just "exists"?

 But yeah, I'm dubious as whether this functionality is important enough to
 include in the api.

-- 
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] #11228: FieldFile with check if file exists.

2009-06-03 Thread Django
#11228: FieldFile with check if file exists.
---+
  Reporter:  hersonls  | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  1 
Needs_docs:  1 |   Needs_tests:  1 
Needs_better_patch:  1 |  
---+
Changes (by dc):

  * needs_better_patch:  => 1
  * needs_tests:  => 1
  * needs_docs:  => 1

Comment:

 If path is stored in database and actual file not exists then data is
 corrupted and better not create workarounds but fix it immediately.

 Anyway os.path.exists will not work with non-local file systems better use
 self.storage.exists(self.name).

-- 
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] #11228: FieldFile with check if file exists.

2009-05-28 Thread Django
#11228: FieldFile with check if file exists.
--+-
 Reporter:  hersonls  |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  SVN   
 Keywords:|   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 Many people ask and also has the need to verify that the file is sent to
 the server is really in its place.

 This need arises because they are made unnecessary requests for lack of
 the file in media server and also for reasons of aesthetics, because the
 lack of image files or result in a different box with alt attribute, or
 result in a 404 not found.

 The class FieldFile not give the developer the possibility to check if
 file exists and that is the developers create a method in a class model
 which will check if file exists on the media server or not.

 I created a patch where it created a method for class FieldFile call
 is_exists which checks if the file exists. This method is valid for all
 inheritance of FieldFile class.

 For example,

 {{{
 {% if object.file.is_exists %}download this file{% endif %}
 {% if object.image.is_exists %}{% endif %}
 }}}

-- 
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
-~--~~~~--~~--~--~---