I was wondering if it is possible for me to use Django code I have for my website and somehow use that in a mobile app, in a framework such as, for example, Flutter.
So is it possible to use the Django backend I have right now and use it in a mobile app?
So like the models, views etc...
Yes. There are a couple ways you could do it
Use the Django Rest Framework to serve as the backend for something like React Native.
Build a traditional website for mobile and then run it through a tool like PhoneGap.
Use the standard Android app tools and use Django to serve and process data through API requests.
Update for 2022: This article from AppPresser provides alternatives to PhoneGap which was mentioned in the other answer. These alternatives can be used to package web native sites as mobile apps.
The alternatives listed are:
Bitrise
Ionic
The honorable mentions were:
Appcircle
Appcenter
CodeMagic
Codeship
Related
I have an application which uses flask and flask-security-too in the rest layer. Since flask-security contains some nice, out-of-the-box solutions for user signup, registration etc. including some override-able views. I would really like to use it if possible.
However, I would instead like to plug in a react frontend to get the SPA things going. I read in the documentation for flask-security that the views are indeed possible to override but not sure if/how I would manage to get this working for a built react app?
To summarize my question: Can I use React.js still benefit from flask-security features?
Please read:
https://flask-security-too.readthedocs.io/en/stable/spa.html
basically - you will be using the JSON api rather than forms.
I have a django webapp, which is a repository for alumni. Users can sign up using the extended user model and fill-in multiple fields. Then there is a detail page for each user that shows their respective data. All this is built using function based views. This bit is fine. But I also want to make its corresponding mobile apps for android and ios hopefully in flutter otherwise react native. My question is, should I host this as it is, or there are some basic things that I already need in the code so I can make a REST API and connect mobile apps later? I don't really have any knowledge about mobile apps and connecting django's REST API? So please guide me in this regard.
Thanks :)
There two ways to do it based in my knowldge :
1- using flutter web view in packages website only pick the best pkg for you .
2-or using HTTPS req by http pkg and make sure you have get and post in your backend like flask in paython or laraval php .
I hope I answred your question :)
I currently have google and facebook authentication for my application. I would like to add firebase-auth as the backend for my Django/appengine backend. The tutorial i followed (https://cloud.google.com/appengine/docs/standard/python/authenticating-users-firebase-appengine) only show how to use it for a python Flask backend.
Does anyone know how to set up firebase in a Django backend that uses appengine?
You should follow the same logic mentioned in the tutorial that you indicated here. As per the documentation informs:
The sample app uses Flask because of its simplicity and ease of use, but the concepts and technologies explored are applicable regardless of which framework you use.
So, the concepts are the same for any framework, which should work for you using Django. Since there isn't a specific tutorial for the use of Django, I recommend you take a look at the below article, to better understand the integration of Firebase and Django, so you can implement it on your
Python Django with Google Firebase : Getting Started, Intro, Basic Configuration & Firebase Authentication #Part1
Let me know if the information helped you!
I've made a desktop-friendly django app and would prefer not to have to rewrite all of the html/css to allow proper view on mobile browsers.
I'm on django 1.5 and python 2.7
Is there a package or library or quicker way to efficiently create a mobile version of my django (web) app instead of having to re-write a whole new template with html/css ?
Thank you!
In a word, no. You're going to have to rewrite most of your templates to be "responsive" to smaller (mobile) screen sizes.
I'd recommend Bootstrap for your HTML5/CSS3 framework. Easy to get started, easy to extend.
Use the bootstrap. I developed the django app too using the bootstrap and it works fine in all smartphone, tablet and desktop devices.
My friend said, "Pylons is so much better for web services."
My other friend said, "You can modify Django in a way to do exactly whatever you like."
In Django, what is necessary to be modified (urls.py? models classes? settings?) in order to do "web services" with APIs and REST and versioning, etc etc.?
Yes Django can be used for web services. Check out django-piston:
A mini-framework for Django for
creating RESTful APIs.
Piston is a relatively small Django
application that lets you create
application programming interfaces
(API) for your sites.
Yes, we use it directly. We have view functions that respond to some URI's with serialized JSON or XML objects instead of pretty HTML pages.
Absolutely.
Django is in fact made to be used on server side. But first you need to understand that it is a framework.
A framework is a set of tools which get the common activities done in web development (e.g Login or Sign up module).