Is there any way to return 'hello world' string from bare django project (without creating app and views.py)?
Something like this:
urlpatterns = patterns('',
url(r'^$', plaint_text_module, 'Hello World!'),
)
You can add inline lambda (or view callable for that matter):
from django.http import HttpResponse
urlpatterns = patterns('',
url(r'^$', lambda request: HttpResponse('Hello World!'), name='hello_world'),
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With