Kenneth Gonsalves wrote: > > On 03-Dec-07, at 10:38 AM, dave's not here wrote: >> Thanks for the quick reply. The problem is I don't currently have >> shell access to the server, only ftp. Is there anything I can put into >> one of the .py or template files?
Create a view that imports django and puts django.VERSION into the
context. A simple (untested) way in the urls.py by using the generic
views is:
----- BEGIN -----
import django
from django.conf.urls.defaults import *
urlpatterns = patterns(''
(r'^private/info/$',
'django.views.generic.simple.direct_to_template',
{'template': 'info.html',
'extra_context': {'version': django.VERSION'}}),
)
----- END -----
And then you just need to create a simple info.html:
----- BEGIN -----
<html>
<head>
<title>Info!</title>
</head>
<body>
The django version is {{version}}.
</body>
</html>
----- END -----
> I don't think you can do django with only ftp access
Sure you can, if django is installed into the server by the hosting
company. I'm in the process of getting a django hosting company in
Australia going and it's not that hard to run a django site without
shell access.
Regards
Darryl
signature.asc
Description: OpenPGP digital signature

