9

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.

user2817200
  • 1,097
  • 2
  • 18
  • 38
  • Not really sure what your asking. I have used webfaction. It is very easy to host a django site. As far as creating a mobile app, will it be a native app? You definitely cannot use django for that. You will need to learn objective c for an iOS app and java for the android. – jproffitt Oct 05 '13 at 02:43
  • For developing native app learn android,java, objective c. Php Socket is just awful when it compares to python. Just stick with it. – ddiipp Oct 05 '13 at 02:57
  • Okay thanks, so after I have finished creating my django app, in order to deploy the django app written in python with a postgreSQL database, how would I use Java to make it an android app and C to make it an iOS app? Any quick link to get me started will do, but how exactly do I take a django app which already has an existing UI and the HTMLand css all done and use Java to make it an Android app? Againm a link to a documentation which will get me started will suffice. – user2817200 Oct 05 '13 at 03:45
  • @jproffitt, 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. – user2817200 Oct 05 '13 at 03:50
  • You cannot simply make a django app with HTML etc into an iOS or android app. Those are totally different platforms, and don't even use HTML. It just isn't possible. You could make a mobile web app, or use phonegap, but the experience isn't nearly as good in my opinion. Either way it is not going to be a simple transfer in any way. – jproffitt Oct 05 '13 at 04:14
  • Right, okay so the django app which I created has its views, models and forms written in python, and the templates which are created using HTML, everything else is python code. So now I want to make this django app a phone app for Android, where would I start? I would I start making it a phone app using Java? And yes I do not want to use phone gap, I want to actually know how it is done.. Is there any documentation you would recommend to just get me started on making my django app a mobile app for Android or iOS? – user2817200 Oct 05 '13 at 04:43

3 Answers3

14

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).

Z-Mehn
  • 268
  • 1
  • 2
  • 12
5

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.

Brandon Taylor
  • 33,823
  • 15
  • 104
  • 144
2

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