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.
Related
I have build an simple chatbot in python, but the framework for the UI in python is not what I want to use to build a UI. I want to use react to make the UI for better and more professional look to the chatbot.
So my question is can I do that, if yes, then how? And I would like to test it on an mobile app as well, how do you guys suggest I go forward with that?
I appreciate every respond.
You could use a framework like Django and the Django-rest-framework for the backend, and use React for the frontend. You could also use React-native to build mobile apps out of it.
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
I'm trying to integrate Django and Angular 4 in the same app (running as two servers as well).
Well, reading the setup guide I noticed about the references to the node_modules directory (and some "hardcode" references).
Well, I wanna know if is possible to merge those technologies, I mean, to use the Django context and the http.get of angular to bind the results.
Or, those npm_modules should are included in my static directory?
But, where I should generate the angular project?
I know this is an old thread, but I finally got this to work the way I want/need. I have a Django backend with DRF and I wanted to use Angular 4 for the front end. My app depends on user logins and running two debug servers (one for Django and one for Angular) was not an option for me.
The secret sauce is to run this command:
ng build --watch true --output-path <your_static_scripts_dir>
I created my Angular app (using ng new app-name) inside my Django project, copied the index.html into the templates directory (and modified it to use my staticfiles directory).
Now I can edit my files in PyCharm, the watch will recompile the .ts files and I only have to run the built-in Django debug server.
What you can do is use angular in front-end with nodejs or a parent make an api with Django using DRF or tastypie ... but if you absolutely want to combine the two would have to consider the versions prior to the 2+ I even develop in Django but as we want to be present on the mobile platforms and native also then to the fact of API's or sometimes we pass the weapon to the left using only javascript. But do not forget in the world of technology what really matters is adaptation and agility
I am going to develop a auto text summarization tool as my FYP. I am going to use Python and it's going to be a web application. Since, there would be no database involved in my tool is it a good idea to use Django? Can anyone recommend any other framework? Thanks.
If there's no database in your application then you presumably won't be using Django's ORM, which is one main reason to use it rather than something lighter.
Having said that, if you're familiar with Django, use Django. If you're not and are looking for a Python web framework, how about something like Flask? The templating module (Jinja2, I think) is a bit more powerful than Django's templates.
It doesn't matter if database is involved or not, but for overall web development, it's an easy to use framework.
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).