Django and Drupal - django

Since Django is a web development framework and Drupal is a CMS.
Is it possible to use them both together instead of a preferred database on Django like apache?
Maybe that question isn't clear enough.
Is it possible to use Django and Drupal simultaneously on the server side to provide a better web development solution?

You can use Drupal and Django side-by-side on the same server for different portions of your web site, but they will be entirely separate systems. They cannot interact in any meaningful fashion (except possibly a Django app making web API calls to Drupal, if Drupal has a web API).
Django is a Python-based web development framework. Drupal is a CMS (and framework, through its module system) written in PHP. They really can't use each other.

Communication between Drupal and any other system is possible and very common, especially using their Services module, and by calling other SOAP (and other) web services.
You can, if you want, to make both Django and Drupal work on the same server, and to call "localhost" for the services you are using, both ways. For Drupal, it is irrelevant where the actual server sits.
If you have a certain Django application you want to integrate with Drupal just write down what it is, and accordingly you will be able to get more help...
Regards,
Shushu

Related

How to deploy a Django backend and Flutter frontend web app

I've been working on a web application that uses Django REST Framework and Django channels in the backend and has a Flutter frontend. It works successfully when tested locally, but my question was how would I deploy this:
What server is most appropriate for this application? (it should be free as this is just a personal project I've been testing)
Do I need to deploy the frontend and backend separately?
Are there any online resources I can refer to, to help me in this process?
Any help is appreciated :)
If you want to use it only for your personal use you could use https://www.heroku.com/free to host you backend.
You could use this guide
Yes, you should deploy them seperately.
Since in your specific case the django application is only used to hold the data, provide a REST API and sockets.

Hosting HTML+CSS+JS websites with Django rest framework backend

My backend APIs are hosted on Django rest framework and the for the frontend I have purchased a theme which is on HTML, CSS, Bootstrap, and Javascript, I wanted to know what would be the best practice to host this website in production, should I have two servers one for handling the static website and other for the backend or shall I integrate this with the backend. The theme is quite vast and would like to go with the first option, so I go with the first option then where should I host the website, and does it impact the performance?
I have already researched but could not find what would be the best practice in this situation, Let me know if any other details are required.
If you're use API and frontend template, you don't necessarily need to host them on separate servers. You can do that on one server. It's just a matter of API calls

Can Django be used to combine both webapp and moblie api?

I want to use django framework to write a web site with static/dynamic pages (I will not be using angular/react - i.e. SPA technology) but I also want the web app to serve as the backend for a mobile app.
What's the best practice here? Can Django alone be used for it?
Will I need to use Django REST framework?
If you could recommend some specific modules to keep the app as simple as possible and avoid DRY code. That'd be great.
Thanks.
You have the right pointers in your question already.
Use django-rest-framework to create a rest service, create your web app in django to consume that service, create a mobile app to consume the same rest service.
In general, once you have a rest service, you can build anything on top of it. Just consume the service from whichever platform you want to build for.
I hope that helps.

Communication between Django applications hosted in different servers

I have a Django project hosted in a server and it wants to interact with another django application hosted in another server. How do I go about doing this?
It really depends on what exactly you want to communicate. But irrespective of specific technology, RESTful API is one of the best practices when it comes to communication between applications.
There are numerous apps developed to help RESTful implementation in Django. You can try RestifyDjango or Django REST framework

Can I deploy CakePHP web application and BottlePy base WebServices API on same server?

I have a CakePHP based web application deployed on Apache (LAMP stack). Now I am doing a Web Services API using bottlePy that will expose services to be consumed by an Android application. The thing is both the applications will be working of the same MySql DB tables and reading/writing to the same. The reason its been done this way is because the CakaPHP based application is already available and was done a while back. Now we have a need to do an Android app and hence need to expose a Web Services API and since I am more comfortable with Python I would rather use. But before I dive deep in this direction I wanted to get answer to the following:
Can I have both the CakePHP web app and BottlePy based Web Services API served from the same Apache server? If not what will be an alternate?
Will two different apps accessing the same MySQL DB cause any issues in terms of locks, data integrity etc?
Anything else I need to be careful about?
So, I have implemented it anyways and it has been working great. I guess that answers the question, that yes it can be done.
I have both cakephp and bottlepy app served from same apache server.
I havent seen any issues and data gets written from both cakephp web app and bottlepy web api connected to android app.
Getting cakephp and bottlepy served from same apache server was a bit tricky but I got it working. I am not a webserver expert so dont know if the problems I faced were trivial or I solved something difficult. In either case it is working. If you face similar issues, let me know and I will post a detailed reply on how I did the setup.