Django

Django is a high-level Python framework for developing web applications rapidly. Its core principles are scalability, re-usability, and rapid development.

featured tutorialHow To Install Django and Set Up a Development Environment on Ubuntu 20.04
Django is a free and open-source web framework written in Python with its core principles being scalability, re-usabi...

Lisa Tagliaferri • Published on May 7, 2020

featured tutorialHow To Add Unit Testing to Your Django Project
Testing a website can be a complex task to undertake because it is made up of several layers of logic like handling H...

Evans Ehiorobo • Published on May 7, 2020 · Updated on May 6, 2020

featured tutorialHow To Create a URL Shortener with Django and GraphQL
GraphQL is an API standard created and open-sourced by Facebook as an alternative to REST APIs. It exposes a single e...

Jonatas Baldin • Published on March 24, 2020

Subscribe to Django
Get notified when new articles on Django are published.
    All
  • 20 Results
    • Question

      Broken Pipe from (IP add)

      I have set-up Django project which works just fine on my local. Then I have set a droplet on digitalocean and once I ran for testing the python manage runserver 0.0.0.0:8000 it ran fine if i try to visit the browser w...
      3 answers0 days agoBy bizmoduleDjango
    • Question

      botocore.vendored.requests.exceptions.ConnectTimeout: Connect timeout on endpoint URL

      When I am trying upload pdf file to our space, it keeps on failing due to this botocore.vendored.requests.exceptions.ConnectTimeout: Connect timeout on endpoint URL: "https://xxx.digitaloceanspaces.com/xxx.xxx/xxxx/fi...
      1 answer4 days agoBy Harold MendozaDjangoDigitalOcean Spaces
    • Question

      What code needed for App Platform "Worker"

      I’m trying to make code that will run one method in my App Platform Django project every 15 minutes. According to the D.O. docs a Worker resource can do this. However, after scouring the internet for hours I can’t fin...
      No answers yet5 days agoBy robbarberApplicationsDigitalOcean App PlatformDjangoInfrastructurePython
    • Tutorial

      How To Install the Django Web Framework on Ubuntu 22.04

      Introduction Django is a full-featured Python web framework for developing dynamic websites and applications. Using Django, you can quickly create Python web applications and rely on the framework to do a good deal of...
      5 days agoBy Brian Boucheron, Jamon CamissoDjangoPythonPython FrameworksUbuntuUbuntu 22.04
    • Question

      Edge CDN path with Spaces and django-storages

      As per the tutorial at : https://www.digitalocean.com/community/tutorials/how-to-set-up-a-scalable-django-app-with-digitalocean-managed-databases-and-spaces The guidance to setup CDN access via Spaces from the above i...
      Accepted Answer: Just a quick note to say that this was resolved. Reset the spaces and then seemed to work. thanks
      1 answer13 days agoBy Craig HollingsworthCDNDjangoDigitalOcean Spaces
    • Question

      Outgoing Traffic From Back-end Pod Through NGINX Ingress IP

      “Hello There”, I am trying to deploy a web application that uses the Django framework, running on a Daphne server on a k8s cluster. I have a couple of services listed below (FYI): Celery Celery Beat Redis Django There...
      No answers yet14 days agoBy Toni SkuljDatabasesDjangoKubernetes
    • Question

      Best practice: Should I make separate project for dev/staging, or just add new droplet in same project?

      So I’m planning to have a site using: Django, VueJS I was going to just create new droplet, but i noticed in the project settings, I have to define wether it’s production or staging - It got me thinking, why? Is it wr...
      1 answer17 days agoBy JihadDigitalOcean DropletsDjangoInitial Server SetupVue.js
    • Tutorial

      How To Install Django and Set Up a Development Environment on Ubuntu 22.04

      Django is a free and open-source web framework written in Python with its core principles being scalability, re-usability and rapid development. In this tutorial, we will set up a Django environment for development pu...
      21 days agoBy Lisa Tagliaferri, Tony TranDevelopmentDjangoPython FrameworksUbuntu 22.04
    • Tutorial

      How To Set Up Django with Postgres, Nginx, and Gunicorn on Ubuntu 22.04

      Django is a powerful web framework that can help you get your Python application or website off the ground. Django includes a simplified development server for testing your code locally, but for anything even slightly...
      22 days agoBy Erin Glass, Jamon CamissoDatabasesDjangoNginxPostgreSQLPythonPython FrameworksUbuntu
    • Question

      How to change the domain from example.com to example.com/homepage/

      I have purchased a domain name from Namecheap and it is as follows : example.com , and I use each of the following services: 1 - My hosting is from Digital Ocean. 2 - I use Cloudflare as a CDN. Now where and how do I ...
      1 answer22 days agoBy tarekhussien53ApacheDigitalOceanDjango
    • Question

      How to setup channel on droplet without running into the error Cannot import ASGI_APPLICATION module

      I have been trying for the past two weeks now to host my web app on digital oceans droplet cloud server , after I had successfully uploaded all the files of my Django app to the droplet cloud server, I can’t seem to f...
      1 answer24 days agoBy GoddaDjangoPythonUbuntu 20.04
    • Question

      Choosing CPU level

      Hi, I am running a basic droplet that caps out at 100% CPU for 3 hours a day (if it doesn’t lock up) when running a data analysis script. It’s a bunch of scripts that run to analyze data and put it into a database to ...
      1 answer25 days agoBy CodingMonkeyApplicationsDjangoPostgreSQL
    • Question

      Problems with sessions in django

      I have deployed my site in django in an Ubuntu droplet. I have no problem with the deployment and everything seems to be in order. However, when I want to start a session, it does not persist, therefore I do not maint...
      1 answer25 days agoBy Greg-502DeploymentDigitalOcean DropletsDjangoPythonUbuntu
    • Tutorial

      How To Secure Your Django Application with a Content Security Policy

      Websites use various services, styles, scripts, and images to load and render content, and the browser will execute all of it. Using a Content Security Policy (CSP) can help ensure that users are protected from malici...
      29 days agoBy Ari BirnbaumDevelopmentDjangoPython FrameworksSecurity
    • Question

      Django (App Platform) Migrate Command raises ERROR: "could not translate host name '[...]' to address: Temporary failure in name resolution'

      I re-deployed my Django App on DO’s app platform but I am facing a new issue that I did not encounter before. Once successfully deployed, when I try to go into the console and run Django’s Migrate Command (python mana...
      1 answer29 days agoBy Al3xsDeploymentDigitalOcean App PlatformDigitalOcean Managed PostgreSQL DatabaseDjangoPostgreSQL
    • Question

      Django migrations are not applied to postgres database

      I followed the following documentation https://docs.digitalocean.com/tutorials/app-deploy-django-app/ My app has deployed fine however when I push changes that require me to run python manage.py makemigrations and pyt...
      1 answer1 month agoBy DriftingLapisWhaleDigitalOcean Managed PostgreSQL DatabaseDjango
    • Question

      How to increase Request Timeout on App Platform?

      I have a web application that processes Excel files. Sometimes, some excel files are bigger than usual and need a bit more time. However, the request times out after 30 seconds (Error Code 504). Now, is it somehow pos...
      1 answer1 month agoBy Al3xsDigitalOcean App PlatformDjangoNginx
    • Question

      Requirements apparrently cached Python App

      I was following the tutorial https://docs.digitalocean.com/tutorials/app-deploy-django-app/ and finally during the build i foundgunicorn: command not found In my requirements.txt i double checked that the line contain...
      1 answer2 months agoBy tassionoronhaBuilding on DigitalOceanDjangoPython Frameworks
    • Question

      What does adding POSTGRES env variables achieve? Django + Postgres DB

      As I have a Django App (using the app platform) with a connected DB, the connection to the DB seems to work out of the box. However, some tutorials online suggest I add the following env variables to my app: POSTGRES_...
      1 answer2 months agoBy frfaDjangoPostgreSQL
    • Question

      Run command: Python Script fails due to collectstatic

      I have set up a Django website with Github following the tutorial. I have also set up an associated job, which runs a python script before every deploy. The python script fails with the following error: elif len(sys.a...
      3 answers2 months agoBy frfaDjango