[Read complete documentation](http://django-for-android.readthedocs.io/en/latest/index.html)
---
# Installation #
Install using **pip**.
```
#!bash
pip install djangoforandroid
```
Add **djangoforandroid.builder** to your **INSTALLED_APPS** setting.
```
#!python
INSTALLED_APPS = (
...
'djangoforandroid.builder',
'djangoforandroid.mdl', #optional
)
```
There are some additional settings that you can override. Here are all the available defaults.
Basic configuration:
```
#!python
ANDROID = {
'APK': {
'name': "App Name",
'version': '0.1',
'numericversion': 10,
'package': 'com.djangoforandroid.appname',
'icon': os.path.join(BASE_DIR, 'static', 'images', 'icon.png'),
},
'ANDROID': {
'ARCH': 'armeabi-v7a',
'SDK': '/absolute/path/to/android-sdk-linux',
'API': '21',
'CRYSTAX_NDK': '/absolute/path/to/crystax-ndk-10.3.2',
'CRYSTAX_NDK_VERSION': '10.3.2',
},
}
```
All configuration options with default values:
```
#!python
ANDROID = {
'APK': {
'name': "App Name",
'version': '0.1', #https://developer.android.com/studio/publish/versioning.html
'numericversion': 10,
'package': 'com.djangoforandroid.appname',
'icon': os.path.join(BASE_DIR, 'static', 'images', 'icon.png'),
'statusbarcolor': '#7c962b',
'navigationbarcolor': '#000000',
'orientation': 'sensor', #other options: 'portrait' and 'landscape'
'intent_filters': None,
},
'ANDROID': {
'ARCH': 'armeabi-v7a',
'SDK': '/absolute/path/to/android-sdk-linux', #https://developer.android.com/studio/index.html
'API': '21',
'CRYSTAX_NDK': '/absolute/path/to/crystax-ndk-10.3.2', #https://www.crystax.net/en/download
'CRYSTAX_NDK_VERSION': '10.3.2',
},
'APP': {
'multithread': False,
},
#Extra configurations
#for sign and release packages
'KEY': {
'RELEASE_KEYSTORE': os.path.join(BASE_DIR, 'djangoforandroid.keystore'),
'RELEASE_KEYALIAS': 'djangoforandroid',
'RELEASE_KEYSTORE_PASSWD': 'djangoforandroid', #use your own password
'RELEASE_KEYALIAS_PASSWD': 'djangoforandroid',
},
#splash screen for your app, this is static html, NOT a Django view
'SPLASH': {
'static_html': False, #path to .html, resources must be added with ony name, i.e background-image: url("splash.png");
'resources': [], #list of files used in the static html, i.e ['static/images/splash.png']
},
#for localserver
'PORT': '8888',
#extra permissions for app https://developer.android.com/reference/android/Manifest.permission.html
'PERMISSIONS': [], #list of permissions, i.e ['BLUETOOTH', 'BLUETOOTH_ADMIN', 'CAMERA']
#sandbox for python-for-andoid operations
'BUILD': {
'build': os.path.expanduser('~/.django-for-android'), #where the magic happens
'recipes': None, #path for user recipes parent directory, check http://python-for-android.readthedocs.io/en/latest/recipes/
'whitelist': None, #for python-for-android users
'requirements': [], #extra python packages to install, differents to ['python3crystax', 'pyjnius', 'django', 'sqlite3', 'djangoforandroid']
'exclude_dirs': [], #list of RELATIVE paths, this directories will not be included in the final .apk
'include_exts': [], #list of extensions to include in final .apk, i.e ['py', 'png', 'sqlite3', 'html', 'css', 'js'], if empty then add all files
},
}
```
没有合适的资源?快使用搜索试试~ 我知道了~
资源详情
资源评论
资源推荐
收起资源包目录
PyPI 官网下载 | djangoforandroid-2.7.tar.gz (576个子文件)
.babelrc 28B
biglink 1KB
.bowerrc 26B
start.c 10KB
_android_jni.c 10KB
_android_sound_jni.c 8KB
pyjniusjni.c 4KB
_android_billing_jni.c 3KB
setup.cfg 38B
p4a.cmake 132B
Linux.cmake 118B
codepoints 16KB
sliderh.coffee 4KB
touchdrawer.coffee 4KB
Gruntfile.coffee 3KB
mdc.coffee 2KB
d4a.coffee 1KB
d4a.config 1KB
material.css 349KB
material-components-web.min.css 232KB
material.min.css 137KB
material-grid.css 34KB
font-awesome.min.css 30KB
material-grid.min.css 18KB
normalize.css 8KB
qunit.css 4KB
roboto.css 4KB
b0dcca.css 3KB
ubuntu-font-family.css 2KB
material-icons.css 970B
style.css 725B
dialog-polyfill.css 636B
.directory 138B
.directory 84B
djangoforandroid 129B
fontawesome-webfont.eot 162KB
MaterialIcons-Regular.eot 140KB
.gitignore 137B
.gitignore 27B
.gitignore 13B
.gitkeep 0B
cpu-features.h 150B
t.htm 8KB
nested.html 8KB
visual.html 5KB
simulator.html 3KB
touchaction.html 3KB
simulator-googlemaps.html 3KB
multiple.html 2KB
base_mdl.html 2KB
log.html 2KB
splash.html 2KB
mdc.html 2KB
mdl.html 2KB
input.html 2KB
base_mdc.html 2KB
_load.html 2KB
index.html 1KB
DESCRIPTION.en_us.html 771B
splash.html 767B
compute_touch_action.html 551B
brython.html 459B
home.html 138B
logs.html 90B
MaterialIcons-Regular.ijmap 28KB
MANIFEST.in 124B
user-config.jam 1KB
AdvancedWebView.java 42KB
PythonActivity.java 19KB
Hardware.java 9KB
TarEntry.java 7KB
TarHeader.java 6KB
TarInputStream.java 5KB
TarOutputStream.java 5KB
Octal.java 4KB
PythonService.java 4KB
AssetExtract.java 3KB
TarUtils.java 2KB
Service.tmpl.java 2KB
WebViewLoader.tmpl.java 2KB
PythonUtil.java 2KB
ResourceManager.java 2KB
PythonEvent.java 967B
TarConstants.java 881B
GenericBroadcastReceiver.java 505B
PythonActivity.java 434B
PythonService.java 426B
PythonLock.java 361B
GenericBroadcastReceiverCallback.java 198B
a899e84.jpg 21KB
kivy-presplash.jpg 18KB
brython_stdlib.js 3.02MB
brython.js 593KB
lodash.compat.js 238KB
material-components-web.min.js 205KB
blanket.js 186KB
material.js 142KB
jquery.js 94KB
jquery-3.2.1.min.js 85KB
jquery.min.js 82KB
共 576 条
- 1
- 2
- 3
- 4
- 5
- 6
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0