Install dependencies
sudo apt-get install libpq-dev python-dev
Note: If you're using python3, then use python-dev for python 3.
- Install PostgreSQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
This module contains interchangeable clients for sending notifications. | |
Use cases for those helpers: | |
- send notifications using a common interface; | |
- change the client in a transparent way (based on settings); | |
''' | |
from __future__ import unicode_literals | |
import logging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/sitemaps.py | |
''' | |
Example of sitemaps module for a list of products. | |
For more info about sitemaps check out django docs | |
https://docs.djangoproject.com/en/stable/ref/contrib/sitemaps/ | |
''' | |
from django.contrib.sitemaps import Sitemap | |
from .models import Product |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
emote: HEAD is now at e766da0 Move confirmed booking rendering in the same view. | |
remote: files changed: 5 | |
remote: ============================================ | |
remote: Exporting needed config variables (from .env) | |
remote: ============================================ | |
remote: ============================================ | |
remote: Installing nodejs dependencies | |
remote: ============================================ | |
.... | |
remote: [00:25:56] Using gulpfile /var/www/bakimli/gulpfile.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for message in messages %} | |
{# Login redirect alert.#} | |
{# We have to display only the last message. Other are irelevant, but must be iterated #} | |
{% if 'login_required' in message.tags and forloop.last %} | |
<div class="alert alert-info alert-dismissible fade in" role="alert"> | |
<button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
<span aria-hidden="true">×</span> | |
</button> | |
{{ message }} | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf8 -*- | |
from __future__ import unicode_literals | |
import logging | |
import sys | |
import traceback | |
LOGGER = logging.getLogger(__name__) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
read -p "Project's folder (press Enter to install in current folder): " project_folder </dev/tty ; | |
read -p "Project name (required - letters, numbers underscore): " project_name </dev/tty ; | |
if [ -n "$project_folder" ]; then | |
mkdir $project_folder; cd $project_folder; | |
fi | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': False, | |
'formatters': { | |
'verbose': { | |
'format': '%(levelname)s | %(asctime)s | %(name)s:%(funcName)s | %(process)d | %(thread)d | %(message)s' | |
}, | |
'simple': { | |
'format': '%(levelname)s | %(name)s | %(message)s' | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Some helper serializer mixins. | |
Helps to reuse serializers for different purposes. | |
""" | |
import logging | |
from rest_framework import serializers | |
LOGGER = logging.getLogger(__name__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python | |
*.py[cod] | |
venv/ | |
__pycache__/ | |
# Packages | |
dist/ | |
lib/ | |
lib64/ |
NewerOlder