Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Backup & Load Live Heroku PostgreSQL Database to Local Django Project
I've used [Django fixtures](ht... -
Where to Learn Django in 2019
I quite often get asked for resources on where to learn Django. Here’s a list of the places I know! The Deep End First, a warning: there’s a lot of stuff to know. Learning Django with zero web or programming knowledge is diving in at the deep end. If you’ve never done anything like it, you’ll be learning about Python, databases, HTML, CSS, browsers, Git, Django, and more, all at the same time. I’d recommend knowing how to build a static website before attempting to learn Django. There are many ways to do this, for free tutorials check out W3Schools or Learn Web Development from Mozilla. But if you think you’re ready to begin, let’s continue. Written Tutorials First and foremost is the official “Start” page which links to several things, including the official tutorial. A warning: the tutorial is quite comprehensive, and is not really designed for zero-experience beginners. It also has some blind spots, for example it does not feature any advice on installing Python, or deploying your website to the actual internet. The Django Girls tutorial is a full guide to creating and deploying a blog for free. This organization uses it to teach weekend workshops to … -
Convert SVG Icons To CSS Webfonts and Deploy to CDN
If you're like me, you've undo... -
Create a Standalone React App
This post will answer the foll... -
10 Common Design Mistakes… and How to Avoid Them
Design work is complex business. It’s far too easy to mess up. To create high-quality products, all of the small details are crucially important. Each detail must be taken into account. It can be easy to get lost in the details and lose sight of the big picture. That’s why there are several incredibly common user interface (UI) design mistakes and weaknesses. The post 10 Common Design Mistakes… and How to Avoid Them appeared first on Distillery. -
Hello Linux: Celery & Supervisor
<div class='alert alert-succes... -
Hello Linux: Install Redis
<div class='alert alert-succes... -
Tips for Testing Django Views
Views are probably the most essential part of a Django application. They provide an interface to your application for users or other external applications. It only makes sense that these need to be well-tested. At first, it can seem difficult and/or tedious to write unit tests for them. However, by decoupling your business logic from … Continue reading Tips for Testing Django Views The post Tips for Testing Django Views appeared first on concise coder. -
Tips for Testing Django Views
Views are probably the most essential part of a Django application. They provide an interface to your application for users or other external applications. It only makes sense that these need to be well-tested. At first, it can seem difficult and/or tedious to write unit tests for them. However, by decoupling your business logic from … Continue reading Tips for Testing Django Views The post Tips for Testing Django Views appeared first on concise coder. -
De-Google my life - Part 1 of ¯ (ツ)_/¯: Why? How?
Hi everyone! I’m here with my first project of the year. It is almost done, but I think it is time to start documenting everything. One day I was hanging out with my girlfriend looking for trips to japan online and found myself bombarded by ads that were disturbingly specific. We realized at the moment that Google knows A LOT of us, and we were not happy about that. With my tech knowledge, I knew that there were a lot of alternatives to Google, but first I needed to answer a bigger question: Why? I told my techie friends about the craziness I was trying to accomplish and they all answered in unison: Why? So I came up with the following list: Privacy. The internet is a scary place if you don’t know what you are doing. I don’t like big corporations knowing everything about me just to sell ads or use my data for whatever they want. I have learned that if something is free it’s because you are the product EXCEPT in opensource (thanks to /u/SnowKissedBerries for that clarification. Security. I live in a very controlled country (Venezuela). Over here, almost every government agency is looking at you, … -
De-Google my life - Part 1 of ¯ (ツ)_/¯: Why? How?
Hi everyone! I’m here with my first project of the year. It is almost done, but I think it is time to start documenting everything. One day I was hanging out with my girlfriend looking for trips to japan online and found myself bombarded by ads that were disturbingly specific. We realized at the moment that Google knows A LOT of us, and we were not happy about that. With my tech knowledge, I knew that there were a lot of alternatives to Google, but first I needed to answer a bigger question: Why? I told my techie friends about the craziness I was trying to accomplish and they all answered in unison: Why? So I came up with the following list: Privacy. The internet is a scary place if you don’t know what you are doing. I don’t like big corporations knowing everything about me just to sell ads or use my data for whatever they want. I have learned that if something is free it’s because you are the product EXCEPT in opensource (thanks to /u/SnowKissedBerries for that clarification. Security. I live in a very controlled country (Venezuela). Over here, almost every government agency is looking at you, … -
Using Multiple SSH Keys
Every time you use a new host,... -
Using SSH & Creating SSH Keys
Using a Secure Shell (`ssh`) w... -
Hello Linux: Custom Domain & Https with Let's Encrypt
<div class='alert alert-succes... -
Hello Linux: Nginx & UFW Firewall
<div class='alert alert-succes... -
Hello Linux: Gunicorn & Supervisor
<div class='alert alert-succes... -
Hello Linux: PostgreSQL on Live Linux Server
<div class='alert alert-succes... -
Hello Linux: Virtual Environment in Working Directory
# Virtual Environment For Prod... -
Hello Linux
<div class='alert alert-warnin... -
Git Push Local Code to Live Linux Server
<div class='alert alert-succes... -
Webinar: Deploying Django—from zero to production in 20 minutes
I held this webinar two years ago—28 February 2017. We start from zero: no server, no DNS, only a Django project in development. In 20 minutes we have a Ubuntu server running our Django project with nginx, Gunicorn and SQLite. Even if you only know Windows, you will get a good feeling of these technologies and understand why deploying on GNU/Linux is usually the most cost-effective solution. We have some fun making requests altogether in order to see whether the server can take it, and we also see whether SQLite is up to the task. Less than 30 minutes of presentation and lots of Q&A (total duration one hour). These are questions that were asked and the times in the video in which I answer Different settings for development and production environment 27m30s Managing passwords and secret keys 31m35 Is /etc/opt a standard? I have seen other locations like /usr/local/etc 36m00s The FHS isn’t entirely clear. It says you can put third-party applications in /usr/local or /opt or /srv. If you choose to put everything (program files, data files, configuration files etc.) under a single directory it should be /srv. My impression from common practices and from discussing it is … -
5 Samsung Galaxy Fold Features That Enhance Mobile Functionality
Samsung's new Galaxy Fold provides consumers with a phone and tablet in one device. Although it is a costly phone, it could eliminate your need for other expensive devices. In this way, it takes mobile phones to the next level for consumers and businesses alike. The post 5 Samsung Galaxy Fold Features That Enhance Mobile Functionality appeared first on Distillery. -
Multiple Image/File Upload with Django, Ionic 4 and FormData
In this tutorial, you'll learn to implement multiple file upload with Ionic 4, Django and FormData. In a previous tutorial, we've created a django RESTful application for uploading files using Django REST framework and Ionic 4. Since the backend code will be the same as we only need an /upload endpoint that accepts POST requests we'll simply clone the previous and start our django REST API server using the following command: $ cd ~/demos $ mkdir ionic-file-upload $ cd ionic-file-upload $ git clone https://github.com/techiediaries/django-rest-file-upload.git backend Next, create and activate a virtual environment using the following commands: $ cd backend $ python3 -m venv .env $ source .env/bin/activate Next, install the Python packages used in the project: $ pip install -r requirements.txt You can then start the development server using: $ python manage.py makemigrations $ python manage.py migrate $ python manage.py runserver Your RESTful django server will be available from the 127.0.0.1:8000 address. Here is some information about our restful server: It exposes an /upload endpoint which accepts POST requests for uploading files. It has CORS enabled so you can send requests from different doamins without getting blocked by the Same Origin Policy. Prerequisites This tutorial makes use of Ionic 4 … -
Post Multipart Form Data in Python with Requests: Flask File Upload Example
In this tutorial we'll demonstrate how to upload a file from a Python server to another server by sending a POST request with multipart/form-data using the Python requests library. We'll be using two servers. The server that receives the file doesn't need to be a Python server but since we'he previously created one with Django in this tutorial, let's use it instead of re-inventing the wheel. Note: Typically we upload files from a client to a server but in this tutorial, we'll see how we can upload files from a server to another web server using Python and the Requests library. Open a new terminal and create and activate a virtual environment: $ python3 -m venv .env $ source .env/bin/activate Next, clone the GitHub repository and install the dependencies: $ git clone https://github.com/techiediaries/django-rest-file-upload.git server2 $ cd server2 $ pip install -r requirments.txt Next, run the server using the following commands: $ python manage.py makemigrations $ python manage.py migrate $ python manage.py runserver The server will be available from the 127.0.0.1:8000 and will expose an /upload endpoint that accepts a POST request. Note: This server has also CORS enabled which means it can accept requests from different domains so make sure … -
Multiple File Image/Upload with Django, Angular 7 and FormData
In the previous tutorial we have seen how to implement file uploading in Django and Angular 7. In this tutorial, we'll see how to implement multiple file uploading. It's recommended that you start from the previous tutorial to see detailed steps of how to create a django project, how to install Angular CLI and generate a new Angular 7 project along with services and components as we won't cover those basics in this part. If you don't want to follow the steps from the previous part, you first need to get the project we've built. Open a new terminal and run the following command: $ git clone https://github.com/techiediaries/django-angular-file-upload-example.git Next, navigate inside the project's folder and install the npm dependencies using the following command: $ cd django-angular-file-upload-example $ npm install Next, start the development server using: $ ng serve Your Angular application will be available from the 127.0.0.1:4200 address. Open a new terminal window and create a virtual environment using the following command: $ python3 -m venv .env Next, activate the virtual environment using: $ source .env/bin/activate Next, navigate to the backend project and install the Python packages using: $ cd django-angular-file-upload-example/backend $ pip install -r requirements.txt Finally, start the development …