Running Django on Jython. Django Software
تبلیغات
تبلیغات
Django Documentation, Release 1.11.8.dev20171115160334
into the database. Note this means that if you change one of the rows created by a fixture and then run
again, you’ll wipe out any changes you’ve made.
Where Django finds fixture files
By default, Django looks in the fixtures directory inside each app for fixtures. You can set the
setting to a list of additional directories where Django should look.
When running
manage.py loaddata , you can also specify a path to a fixture file, which overrides searching the
usual directories.
See also:
Fixtures are also used by the
to help set up a consistent test environment.
4.10.2 Providing initial data with migrations
If you want to automatically load initial data for an app, don’t use fixtures. Instead, create a migration for your application with
or
operations.
4.11 Running Django on Jython
Jython is an implementation of Python that runs on the Java platform (JVM). This document will get you up and running with Django on top of Jython.
4.11.1 Installing Jython
Django works with Jython versions 2.7b2 and higher. See the Jython website for download and installation instructions.
4.11.2 Creating a servlet container
If you just want to experiment with Django, skip ahead to the next section; Django includes a lightweight Web server you can use for testing, so you won’t need to set up anything else until you’re ready to deploy Django in production.
If you want to use Django on a production site, use a Java servlet container, such as Apache Tomcat . Full JavaEE applications servers such as GlassFish or JBoss are also OK, if you need the extra features they include.
4.11.3 Installing Django
The next step is to install Django itself. This is exactly the same as installing Django on standard Python, so see
Remove any old versions of Django
and
for instructions.
4.11.4 Installing Jython platform support libraries
The django-jython project contains database backends and management commands for Django/Jython development.
Note that the builtin Django backends won’t work on top of Jython.
To install it, follow the installation instructions detailed on the project website. Also, read the database backends documentation there.
4.11. Running Django on Jython 603
دانلود
تبلیغات