Re: Static files not loading when debug is false

2012-09-10 Thread e.generalov
There is another case - tests. The TestCase forces DEBUG=False, therefore staticfiles application, included to the project in accordance with the documentation, works in the development server, but unexpectedly does't serve static in test scenarios. Why the serving static files in the developme

Re: How to use URL namespaces in tests?

2012-09-07 Thread e.generalov
Unfortunately in my case, no templates are used. среда, 5 сентября 2012 г., 20:37:06 UTC+6 пользователь Natim написал: > > Ok it is quite easy, you are missing {% load url from future %} in your > template. > > Le jeudi 23 août 2012 09:25:54 UTC+2, e.generalov a écrit : >>

Re: with/include template pattern? seeking best practices

2012-09-05 Thread e.generalov
{% for e in some_list %} {% include "single_element.html" with element=e %} {% enfor %} I find myself writing things like this a lot in django templates > > {% for e in some_list %} > {% with e as element %} > {% include "single_element.html" %} > {% endwith %} > {% enfor

How to use URL namespaces in tests?

2012-08-23 Thread e.generalov
Url patterns which provided by a django application should be addressedexternally in the form of "namespace:name". I guess it will be connected to the project as follows: project/urls.py urlpatterns = patterns('', url('^something/', include('django_something.urls', namespace='something'))

Re: How to serve staticfiles with full URL for local development?

2012-05-10 Thread e.generalov
ch should assist in the development? > Am Samstag, 5. Mai 2012 15:34:47 UTC+2 schrieb e.generalov: > > > > > > > > > > > There was a snippet to display a content of response in browser during > > debugging  http://miniblog.glezos.com/post/3388080372/tests-bro

Re: How to serve staticfiles with full URL for local development?

2012-05-10 Thread e.generalov
On 6 май, 04:41, Reinout van Rees wrote: > On 05-05-12 15:34, e.generalov wrote: > > > There was a snippet to display a content of response in browser during > > debugginghttp://miniblog.glezos.com/post/3388080372/tests-browser . > > > "One of the first issues

How to serve staticfiles with full URL for local development?

2012-05-05 Thread e.generalov
There was a snippet to display a content of response in browser during debugging http://miniblog.glezos.com/post/3388080372/tests-browser . "One of the first issues you might face is seeing a style-less page. This happens becuase the test server isn’t really a web server, and you’re probably serv