Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
django-mobile-app-distribution
Advanced tools
A Django app that adds iOS and Android app upload functionality to the Django admin interface. Provides a mobile optimized HTML fronted for clients to download Ad Hoc mobile applications using their iOS or Android devices.
#Django Mobile App Distribution
Django Mobile App Distribution is a Django app that allows you to distribute iPhone, iPad and Android apps over the air to your clients.
It is made up of 2 components:
#Installation Django >= 1.7
pip install django-mobile-app-distribution
django_mobile_app_distribution
to your INSTALLED_APPS
list in your project's settings.py.django.contrib.sites
to the list of INSTALLED_APPS
in your project's settings.py.BASE_PATH
(or BASE_DIR
) to your project's settings.py, e.g. import os.path BASE_PATH = os.path.dirname(__file__)
. In order to create an Android upload folder on the same level as your project's settings.py this has to be set.python manage.py migrate
python manage.py collectstatic
android/android_apps
folder on the same level as your project's settings.py is readable and writable by your webserver.
django_mobile_app_distribution.urls
into your project's urls.py file at the mount point of your choosing (see below). This will be where your client downloads her apps.django_mobile_app_distribution.auth_urls
into your project's urls.py (see below)./distribute/
.http://127.0.0.1:8000/
#URL setup
Inside your project's urls.py
from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^distribute/', include('django_mobile_app_distribution.urls')),
url(r'^accounts/', include('django_mobile_app_distribution.auth_urls')),
]
Inside your project's settings.py
file
import os.path
BASE_PATH = os.path.dirname(__file__) # `BASE_DIR` is also available.
LOGIN_REDIRECT_URL = '/distribute/'
SITE_ID = 1
#Security considerations
By default iOS apps are uploaded to a folder called ios_apps
within your MEDIA_ROOT
.
This should generally be safe enough as Ad Hoc iOS apps are provisioned to run on a limited number of devices.
On Android however a hijacked signed APK file could be redistributed against your client's wishes which is to be avoided at all cost.
To this end Android apps are uploaded with a custom instance of FileSystemStorage
. By default, Android apps are uploaded to a folder called android
on the same level as your project's settings.py. The default upload path within the android
folder is android_apps
.
You can change the default upload and file storage paths with the following directives in your project's settings.py:
MOBILE_APP_DISTRIBUTION_IOS_UPLOAD_TO_DIRECTORY_NAME
MOBILE_APP_DISTRIBUTION_ANDROID_UPLOAD_TO_DIRECTORY_NAME
MOBILE_APP_DISTRIBUTION_ANDROID_FILE_STORAGE_PATH
.. note:: Make sure the android/android_apps
folder is readable and writable by your webserver, but not served by your webserver.
#Notify clients of available app downloads by email
Django Mobile App Distribution exposes an Admin Action that allows you to notify your clients once you've uploaded and app. An email message is generated that contains a link to the download page. In order for email messaging to work you need to set the following fields in your settings.py module:
#Usage
Staff status
and Superuser status
fields.#Android specifics
In case you get a permission denied error when uploading an Android APK, make sure that the android/android_apps
folder on the same level as your project's settings.py is writable by your webserver.
#Export your iOS app for Over the Air distribution
#Customizing the default color scheme
The frontend templates make use of the Zurb Foundation CSS framework 5.5.1.
In line with foundation's customization rules there is an app.css
file you can override to customize the default color scheme.
To do that create the following folder inside one of your own apps:
static/django_mobile_app_distribution/css/
Make sure your app comes before django_mobile_app_distribution
in the list of INSTALLED_APPS
.
Inside that folder create a file called app.css
. There you can do custom styling, for instance:
a {
color: black;
}
button, .button {
background-color: black;
}
button:hover, button:focus, .button:hover, .button:focus {
background-color: gray;
}
FAQs
A Django app that adds iOS and Android app upload functionality to the Django admin interface. Provides a mobile optimized HTML fronted for clients to download Ad Hoc mobile applications using their iOS or Android devices.
We found that django-mobile-app-distribution demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.