Django Deployment - django

I am given a responsibility in my project to develop a Equipment tracking tool with following requirements
New Equipment can be added by admin to a particular user
Once equipment is assigned to a person he will a request to accept the request so he will be responsible
User can transfer his equipment to other users.
At the same time Admin should be sent a mail or message whenever there is a change in status.
It should be deployed locally on a PC( So it is not actually a web app) that is connected to network which can be accessed by everyone
I thought I can use Django for this( I am new to it ), but I do not know much about deployment on a local PC , How can I do this, or is there any better Idea for this?

It still sounds like you want a web app, you just won't be deploying it on a traditional web server. One thing to note, client versions of Windows (XP, Vista) will limit you to 10 incoming connections per computer.
You'll want to follow these instructions on how to install Django. If you haven't installed python yet, I'll recommend that you install version 2.5, since that will include sqlite, an embedded database that makes it very easy to get started developing with Django. Django includes its own development web server, which you will come across naturally as you go through the tutorial.
Start by installing and then jump right into the tutorial. Your deployment options will be much easier to understand once you're comfortable with developing in Django.

Try http://docs.djangoproject.com/en/dev/howto/deployment/#howto-deployment-index
and if you should deploy using IIS then try http://code.djangoproject.com/wiki/DjangoOnWindowsWithIISAndSQLServer

Related

What is necessary to make the deploy of a Django Application in an internal network?

I'm a student, making a django project in school for a few months, since last year, using Django Rest Framework and React. A project for a hospital, to manage patients, appointments, medicines, etc. I have asked some questions here a few times on how to do a few things in Django and it was really helpful.
I've presented the system for the people in the hospital, they liked it, there are some adjustments to do yet, going to fix it this weekend. I'm using python anywhere free account to host it. So now I have a few doubts, this month I need to make the deploy of this project in the hospital, they want to host it there for production. They have scheduled a meeting with me, my teacher who is the one guiding me and responsible for this project, and the director of IT of the hospital, the director want me to explain for him what he will need to host the project in the hospital. In my inexperienced head I thought the only thing he will need there is to install python 3.6 and MySQL on their servers. My teacher asked me to make a research of what we are going to need to make the deploy there, before the talk that is scheduled for next week with the director of IT.
So here I'm, I would like to ask you guys, any tips you have, any text I could read about what I will need to deploy a Django application in the hospital network?
One fact that can be useful, when it get in production, there will be at max 7 people online at same time using the system. Django 2.1, python 3.6, rest framework, reactjs, mysql.
Most probably there will be a windows machine in that case you can simply use the inbuilt IIS and configure the Django on IIS and open few ports on the firewall, it's the easiest i belive.
If IIS is not there you can enable it from the windows features like so
enter image description here
and follow this configuration for the starters
https://learn.microsoft.com/en-us/visualstudio/python/configure-web-apps-for-iis-windows?view=vs-2019

Which is the best development/production environment for Django projects?

A bit of background
I work for a little company as Django developer. The previous developer left the company and I am the only developer (that is the reason they were looking for a Django developer). The company has a simple web application that needs to be mantained and scaled. It seems that the company is getting sales and incomes are increasing. There is a possibility to hire another developer in the short or mid-term. Right now I am analizing possible improvements. This is my first professional job as Django developer, but I achieved to deploy some little personal projects in the past. As you can imagine I am not an expert at all.
The issue
We use a Ubuntu VPS for development, using Django's integrated web server. And another Ubuntu VPS for production, using Nginx+Gunicorn. We use git for version control. The only user we use (for everything) in both VPS is root. I don't work locally in my computer, but connected via ssh to the servers. These are my insights about the structure:
Use of root is unsafe. No doubt about it and we should change this.
What if another developer is hired? Could we work together in the development server?
The question
As the title says, I want to know which would be the perfect working structure for a developers team. After googling a few hours my approach would be something like this:
Production server.
Testing server (replicating as much as possible the production server).
Development environment. Every developer should work and test their code locally in their computers before testing it in the Testing server.
Use of Git for version control.
Use of non-root users for both testing and production servers.
This is just my point of view and I haven't even tried it. I would appreciate you to share your knowledge and experiences.
Thanks in advance!

Running a meteor app as part of a wider django project

I'm currently working on a project which would require some realtime functionalities such as Multi-user chatrooms etc.
Ideally, I’m looking to have meteor run the chat application(on a different port) and mongodb act as message broker to the django back-end which would take care of user registration , management and everything 'non-realtime' related.
This would involve setting up a reverse-proxy which would redirect to a different port based on the url (please let me know if i'm wrong in this)
Would this be possible(or even advisable)? Another option would be to implement the same with tornado. but I have no experience with building tornado-based apps and rather do this with a framework I’m comfortable with.
Thanks,
You can have Django serve the Meteor front-end while providing access to its data using django-ddp, giving you some distinct advantages:
Continue to serve your existing Django project/apps.
No extra services or ports to manage.
Scale out by simply adding more front-end Python/Django servers (server to server IPC is done via the existing database connection).
Use django.contrib.auth user accounts in your Meteor app.
Familiar Python/Django code (no "callback" style such as with Tornado).
Use time-tested, trusted relational databases.
Use Django migrations to effectively manage schema changes.
There's a Gitter chat room where I can give you assistance if you need it.
DISCLAIMER: I'm the author of django-ddp.
A meteor application is more than capable of handling the user registration flow and many other things. Why not just build the application entirely in meteor? Your application sounds like a perfect candidate for meteor, with realtime interaction with your database at the core.
The other option would be to use swampdragon which adds realtime data binding within django. It allows for simple bi directional communication between the server and the client. Again, essential for a chat application. It nice and easy to get setup and running as well.
Are there any specific reasons to not implementing your application in one framework alone?

Creating a web app on django with phone calls functionality

So basically i'm developing a piece of software that will allow user to call any number he wants right from the website. So i need some help in choosing the correct platform or semi cheap service to use. I guess i need a solution with open API because i want to make a db entry (want to record duration and date) for every call made from website.
I've started research and stumbled upon couple of open source solutions: Asterisk and FreeSWITCH. Trying them out right now, but i still have poor understanding of how SIP works. If it will be a softphone will the user have need to install it on their pc or there are server solutions
One possible solution that works with any SIP server is to use PJSUA Python bindings and to implement in Python a basic softphone. Thus your web application will be seen by the SIP server just as a regular soft phone and the server configuration is much easier.

Django real-time game backend

I plan to make an online game. It will be a full real-time during play. For my website backend I have used Django. Database and other things are almost done. What is the best way to make user client side and server side backend for play in realtime? As I use Django it would be nice to have it in Python.
We plan that there will be minimum ~1000 online players all the time.
Twisted/Tornado/Node.js or maybe something else?
Thanks in advance.
Tornado is very light and pretty nice in my opinion. You could integrate it with Django in various ways -- e.g. Integrate Tornado in Django, Integrating Django with Tornado's web server -- or just run it alongside Django behind whatever web server you use.
Node is so fun that you might tire of Django. :-)
I think you should keep separately Django - which is used for general site functions, and Tornado - which is used for realtime data. I think you should use some Redis to store/read data and communicate between django and tornado, so prevent using database access directly from tornado.
Developing your own backend server sounds as interesting project.
But from my experience it becomes a very significant of your R&D effort.
It starts with developing core backend components, dealing with servers, installs, patches, security issues and more.
On top of it, you will need to create admin systems to manage your player, levels, xp, integration to stores and more... and then, you have the reports (installs, retention, etc'...)
I would strongly recommend using existing backend platforms.