I'm working my way through https://docs.djangoproject.com/en/dev/intro/tutorial03/. In this there is a discussion of calling a view and connecting the a url to a view. Can this also work for a django app or a script that does not contain a view?
Let's assume that if I had an app called 'myapp' with a script called 'myscript', I assume I would do something like
myapp/urls.py
from django.conf.urls import patterns, url
from myapp import myscript
urlpatterns = patterns('',
url(r'^$', ???myscript???, name='myapp')
)
does this conform to best practices, or if not how should I call the script from inside a django project
.pyfile? A function not in your views file? Something else?