Getting started with Python
So you’d like to give Python a go. How do you start? (If you are going to be using Python for Scientific Computing, including Data Analysis, have a look at this article instead) Installing...
So you’d like to give Python a go. How do you start? (If you are going to be using Python for Scientific Computing, including Data Analysis, have a look at this article instead) Installing...
Like Flask, Bottle is a Python micro-framework. It is so micro that it only consists of a single file. Whilst Flask is already a fairly small framework, some developers prefer Bottle, mainly for its...
As I’m making my way through Natural Language Processing with Python and Data Science from Scratch: First Principles with Python, the first step is to set up the development environment. My first attempt was to install numpy,...
If you’re developing a websocket app you may need to throw some tests at it. Whilst looking for a websocket client I came across this client, which makes it very easy to generate websocket...
Django has a great system for maintaining your database structure, for keeping your RDMS (typically MySQL, PostgreSQL or SQLite) in line with your Django-defined Models, and within your version control system. I recently hit...
Test Driven Development (TDD) is a methodology for developing programs where you first write the test, and then write just enough code to make your program pass all tests TDD makes it far less...
Here is how go set up Django to work with PostgreSQL Install necessary libraries, etc sudo apt-get install libpq-dev sudo apt-get install python-dev sudo apt-get install postgresql-contrib Create a new database and user sudo...
From https://docs.djangoproject.com/en/dev/howto/static-files/: For a production site you probably want to configure the server to serve static files directly, without going through Django. For a test site, you can use the following approach In settings.py,...
Instead of using Python to create all the HTML, Django can load and render templates In settings.py specify the location of the templates, e.g. TEMPLATE_DIRS = [ os.path.join(BASE_DIR, ‘templates’), ] Create the folder within...
If you’ve followed the steps in the previous blog posts, you should have your first basic Django project up and running. You’ll also have various bits and pieces already installed, ready for your next...