Hi all, Ticket [1]8713 is tracking removing dependency of Django core on contrib apps code.
One of the action items enumerated there is the fact that LiveServerTestCase makes use of django.contrib.staticfiles' facilities. I've opened ticket [2]20739 for it and have some work in progress on a [3]PR. What I've done so far is move some base functionality of staticfiles' StaticFilesHandler to a new FSFilesHandler that lives in django.core.handlers and make both StaticFilesHandler and a new ad-hoc, private _StaticFilesHandler located in django/test/testcases.py (similar to the existing _MediaFilesHandler) inherit from it. Another change introduced is duplicating (simplifying it slightly) django.contrib.staticfiles.views.serve() view functionality. The last stumbling block we need to remove is use of staticfiles' finders infrastructure, for which I don't have any solution for now. I'm posting this here to get feedback/help on the approach and more generally to know your opinions about if the dependency removal is worth pursuing because, frankly, moving contrib.* code to the core and duplicating functionality smells a little bit funny to me. Regards, -- Ramiro Morales @ramiromorales 1. https://code.djangoproject.com/ticket/8713#comment:13 2. https://code.djangoproject.com/ticket/20739 3. https://github.com/django/django/pull/1354 -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. For more options, visit https://groups.google.com/groups/opt_out.
