Re: [Django] #15765: Serving static files in development doesn't work with staticfiles activated

2011-07-04 Thread Django
#15765: Serving static files in development doesn't work with staticfiles 
activated
+-
   Reporter:  Semmel|  Owner:  nobody
   Type:  Bug   | Status:  closed
  Milestone:|  Component:  contrib.staticfiles
Version:  1.3   |   Severity:  Normal
 Resolution:  fixed |   Keywords:
   Triage Stage:  Accepted  |  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+-
Changes (by jezdez):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [16503]:
 {{{
 #!CommitTicketReference repository="" revision="16503"
 Fixed #15765 -- Stopped showing an odd error message when using the
 staticfiles enabled runserver management command and trying to serve files
 from STATIC_URL at the same time.
 }}}

-- 
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] #15765: Serving static files in development doesn't work with staticfiles activated

2011-07-04 Thread Django
#15765: Serving static files in development doesn't work with staticfiles 
activated
+-
   Reporter:  Semmel|  Owner:  nobody
   Type:  Bug   | Status:  reopened
  Milestone:|  Component:  contrib.staticfiles
Version:  1.3   |   Severity:  Normal
 Resolution:|   Keywords:
   Triage Stage:  Accepted  |  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+-
Changes (by jezdez):

 * status:  closed => reopened
 * type:  Uncategorized => Bug
 * resolution:  worksforme =>
 * stage:  Unreviewed => Accepted


Comment:

 Replying to [comment:4 Semmel]:
 > Okay - I finally found out what confused me so much. To fully understand
 my problem you need to know that I tried to update and old project to use
 staticfiles. This project has no app specific files so there was only one
 big static folder that got served under /.
 >
 > When i tried updating it I thought it would be the easiest way to just
 copy the whole old static directory to STATIC_ROOT. Since surfing to
 STATIC_URL (I always have `show_indexes=True`) didn't work I tried the
 static urlpattern.
 >
 > And that's when things got strange because sometimes I just couldn't
 surf the subfolders/files (even though they were shown in the directory
 listing using `show_indexes=True`). So long story short - I was just
 trying to surf to STATIC_URL which didn't work and I have no idea if this
 is a bug or a feature but I find it really inconvenient that I can't just
 hack my URLs in development mode (of course using `show_indexes=True`).

 I got it, you still have staticfiles in `INSTALLED_APPS`. That will make
 the runserver automatically serve the files under STATIC_URL, which also
 means that requests to just STATIC_URL will show an odd error message.

 >
 > Replying to [comment:3 jezdez]:
 > > Replying to [comment:2 Semmel]:
 > > > Is there any resource for a standard staticfiles layout? I tried to
 peek at djangoproject.com but was surprised to see that it doesn't even
 use staticfiles.
 > >
 > > Yes, as described in the docs, by default staticfiles will look at the
 static/ directories of each app and all the directories listed in
 STATICFILES_DIRS -- similarly to how templates are structured. If you have
 "common files" that don't fit any of your apps, put them in a separate
 directory and add that directory to the STATICFILES_DIRS setting.
 > Okay - got that. But since my original static folder got served under /
 to allow for serving common files like favicon.ico or robots.txt (and
 other files which need to be served under /) I have no idea where to put
 them in this setup. The docs don't say anything about this common case -
 so where do I put these?

 I think you were on the right track and it should be fixed to work like
 you did. Reopening..

-- 
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] #15765: Serving static files in development doesn't work with staticfiles activated

2011-07-04 Thread Django
#15765: Serving static files in development doesn't work with staticfiles 
activated
-+-
   Reporter:  Semmel |  Owner:  nobody
   Type: | Status:  closed
  Uncategorized  |  Component:  contrib.staticfiles
  Milestone: |   Severity:  Normal
Version:  1.3|   Keywords:
 Resolution: |  Has patch:  0
  worksforme |Needs tests:  0
   Triage Stage: |  Easy pickings:  0
  Unreviewed |
Needs documentation:  0  |
Patch needs improvement:  0  |
  UI/UX:  0  |
-+-
Changes (by Semmel):

 * ui_ux:   => 0
 * easy:   => 0


Comment:

 Okay - I finally found out what confused me so much. To fully understand
 my problem you need to know that I tried to update and old project to use
 staticfiles. This project has no app specific files so there was only one
 big static folder that got served under /.

 When i tried updating it I thought it would be the easiest way to just
 copy the whole old static directory to STATIC_ROOT. Since surfing to
 STATIC_URL (I always have `show_indexes=True`) didn't work I tried the
 static urlpattern.

 And that's when things got strange because sometimes I just couldn't surf
 the subfolders/files (even though they were shown in the directory listing
 using `show_indexes=True`). So long story short - I was just trying to
 surf to STATIC_URL which didn't work and I have no idea if this is a bug
 or a feature but I find it really inconvenient that I can't just hack my
 URLs in development mode (of course using `show_indexes=True`).

 Replying to [comment:3 jezdez]:
 > Replying to [comment:2 Semmel]:
 > > Is there any resource for a standard staticfiles layout? I tried to
 peek at djangoproject.com but was surprised to see that it doesn't even
 use staticfiles.
 >
 > Yes, as described in the docs, by default staticfiles will look at the
 static/ directories of each app and all the directories listed in
 STATICFILES_DIRS -- similarly to how templates are structured. If you have
 "common files" that don't fit any of your apps, put them in a separate
 directory and add that directory to the STATICFILES_DIRS setting.
 Okay - got that. But since my original static folder got served under / to
 allow for serving common files like favicon.ico or robots.txt (and other
 files which need to be served under /) I have no idea where to put them in
 this setup. The docs don't say anything about this common case - so where
 do I put these?

-- 
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] #15765: Serving static files in development doesn't work with staticfiles activated

2011-04-13 Thread Django
#15765: Serving static files in development doesn't work with staticfiles 
activated
-+-
   Reporter:  Semmel |Owner:  nobody
   Type: |   Status:  closed
  Uncategorized  |Component:  contrib.staticfiles
  Milestone: | Severity:  Normal
Version:  1.3| Keywords:
 Resolution: |Has patch:  0
  worksforme |  Needs tests:  0
   Triage Stage: |
  Unreviewed |
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-

Comment (by jezdez):

 Replying to [comment:2 Semmel]:
 > I've added a little test project to demonstrate the behavior. Just run
 it and point your browser to http://localhost:8000/static/myfolder/. Of
 course I could use `staticfiles_urlpatterns` for serving files in
 development. For this example I used `static` and added `show_indexes` as
 an easy way to see that the folder really is there
 (http://localhost:8000/static/ works as expected) but navigating to
 anything else just doesn't work.

 As I said, if you use staticfiles, the STATIC_ROOT directory won't be
 served directly but will use the staticfiles finders instead to find the
 files linked via STATIC_URL. Feel free to not use staticfiles but the
 django.core.views.static view if you just want to serve files located in
 the STATIC_ROOT directory.

 > Is there any resource for a standard staticfiles layout? I tried to peek
 at djangoproject.com but was surprised to see that it doesn't even use
 staticfiles.

 Yes, as described in the docs, by default staticfiles will look at the
 static/ directories of each app and all the directories listed in
 STATICFILES_DIRS -- similarly to how templates are structured. If you have
 "common files" that don't fit any of your apps, put them in a separate
 directory and add that directory to the STATICFILES_DIRS setting.

-- 
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] #15765: Serving static files in development doesn't work with staticfiles activated

2011-04-13 Thread Django
#15765: Serving static files in development doesn't work with staticfiles 
activated
-+-
   Reporter:  Semmel |Owner:  nobody
   Type: |   Status:  closed
  Uncategorized  |Component:  contrib.staticfiles
  Milestone: | Severity:  Normal
Version:  1.3| Keywords:
 Resolution: |Has patch:  0
  worksforme |  Needs tests:  0
   Triage Stage: |
  Unreviewed |
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-

Comment (by Semmel):

 Replying to [comment:1 jezdez]:
 > Quoting from the [http://docs.djangoproject.com/en/1.3/howto/static-
 files/#using-django-contrib-staticfiles docs]:
 >
 > "Many projects will also have static assets that aren’t tied to a
 particular app; you can give staticfiles additional directories to search
 via the STATICFILES_DIRS setting ."
 >
 > The automatic serving during development via staticfiles' runserver
 command doesn't set `show_indexes=True`. You don't have to manually add
 the static pattern to your URLs.

 I've added a little test project to demonstrate the behavior. Just run it
 and point your browser to http://localhost:8000/static/myfolder/. Of
 course I could use `staticfiles_urlpatterns` for serving files in
 development. For this example I used `static` and added `show_indexes` as
 an easy way to see that the folder really is there
 (http://localhost:8000/static/ works as expected) but navigating to
 anything else just doesn't work.

 Is there any resource for a standard staticfiles layout? I tried to peek
 at djangoproject.com but was surprised to see that it doesn't even use
 staticfiles.

-- 
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] #15765: Serving static files in development doesn't work with staticfiles activated

2011-04-05 Thread Django
#15765: Serving static files in development doesn't work with staticfiles 
activated
-+-
   Reporter:  Semmel |Owner:  nobody
   Type: |   Status:  closed
  Uncategorized  |Component:  contrib.staticfiles
  Milestone: | Severity:  Normal
Version:  1.3| Keywords:
 Resolution: |Has patch:  0
  worksforme |  Needs tests:  0
   Triage Stage: |
  Unreviewed |
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by jezdez):

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


Comment:

 Quoting from the [http://docs.djangoproject.com/en/1.3/howto/static-files
 /#using-django-contrib-staticfiles docs]:

 "Many projects will also have static assets that aren’t tied to a
 particular app; you can give staticfiles additional directories to search
 via the STATICFILES_DIRS setting ."

 The automatic serving during development via staticfiles' runserver
 command doesn't set `show_indexes=True`. You don't have to manually add
 the static pattern to your URLs.

-- 
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] #15765: Serving static files in development doesn't work with staticfiles activated

2011-04-05 Thread Django
#15765: Serving static files in development doesn't work with staticfiles 
activated
---+
 Reporter:  Semmel | Owner:  nobody
 Type:  Uncategorized  |Status:  new
Milestone: | Component:  contrib.staticfiles
  Version:  1.3|  Severity:  Normal
 Keywords: |  Triage Stage:  Unreviewed
Has patch:  0  |
---+
 I have a few static files living in STATIC_ROOT that get served correctly
 when staticfiles is not in INSTALLED_APPS. So using things like
 http://localhost:8000/static/myfolder/ just work. However when I enable
 staticfiles things like http://localhost:8000/static/myfolder/ yield a 404
 saying "'myfolder\' could not be found". Maybe i'm using staticfiles wrong
 (i have no idea where site-specific stuff (e.g. favicon, robots, site-
 global css, etc. should go) but shouldn't the contents in STATIC_ROOT just
 get served?

 settings.py:
 {{{
 STATIC_ROOT = os.path.join(os.path.dirname(__file__),
 '../static/').replace('\\', '/')
 STATIC_URL = '/static/'
 ADMIN_MEDIA_PREFIX = '/static/admin/'
 }}}

 urls.py:
 {{{
 urlpatterns += static(settings.STATIC_URL,
 document_root=settings.STATIC_ROOT, show_indexes=True)
 }}}

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