Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difficulty deploying Django app on Android and iPhone.. planning on switching to PHP instead of Django

Okay so I am 1/4th finished creating a django application (where users must register an account, log in and can interact with other users of the application, basically a social network. And the application has a PostgreSQL database). I decided to do research and figure out ways to actually host this django powered social network site on the internet and make it a mobile app which can be downloaded from the android and iphone appstore. I want to first host the site, so I looked for places to host it. I found webfaction.com and this links in particular

http://docs.webfaction.com/software/django/getting-started.html

which explains how to host the djnago application. Now, I did not read over it completely but I trust that I can host my social network django application using webfaction without going through a whole bunch of trouble. (please correct me if there is someone here who did try hosting a django application and had great difficulty).

After hosting it as a site, I also want it to be a mobile application which can be used on iPhones and Androids. Now, all I want to know is, what is the least complicated way of doing this properly? (because I'm guessing all ways will be pretty complicated.. I don't want a step by step tutorial on how to do it, a simple url to a documentation on how to do it is good enough). Will I need to learn PHP, C, Java or anything else or will I be able to do this with just knowing django and python? Note that this isn't just an application where users visit and read information, it's a social network.

I just need someone to confirm to me that deploying a social network created using django and hosting it on a site is possible and then taking that app and making it an Android and iOS app without have to completely recreate it with a different language is possible. If you can provide me a link to get me started on how to take am existing django app and make it an Android app without having to completely retype the app with a different language, that would be great.

like image 504
user2817200 Avatar asked Oct 05 '13 02:10

user2817200


3 Answers

Simply put: you would create your web app (website) using Python+Django (for the back end) and HTML, JavaScript & CSS (for the front end). Once you've done this, you can make a very basic app for iOS and Android which is really just a browser window pointed to your website.

Google 'android webview' for some examples of embedding your site into an android app with Java (note this is a very basic way of doing it).

like image 197
Z-Mehn Avatar answered Oct 17 '22 16:10

Z-Mehn


I don't think you're understanding the fundamentals here...

A NATIVE app for iOS must be written in Objective C or Swift.

A NATIVE app for Android must be written in Java.

You simply cannot compile and deploy a web application written in Django to Objective C or Java (to the best of my knowledge).

However, it's possible to write an HTML5/JavaScript web application that can be compiled to one of the respective native platforms, using Appcellerator or PhoneGap. The backend data provider for such an app could certainly be a REST API powered by Django.

I don't know Objective C or Java, so I stick with the tool set I know - Django, Python, HTML5, Twitter Bootstrap and JavaScript to create mobile friendly web apps. These are web sites using responsive CSS to format the content best for mobile and tablet viewports, but they are NOT native iOS or Android applications.

like image 26
Brandon Avatar answered Oct 17 '22 17:10

Brandon


Actually you can have a python app compile to native C on both iOS and Android and get them accepted into the relevant app stores. Check http://kivy.org and http://Cython.org

like image 27
user2660475 Avatar answered Oct 17 '22 16:10

user2660475