SMTP setting for Drupal, Django, and WordPress

Drupal, Django, and WordPress are using localhost as SMTP server by default. But there is a way to use another SMTP server to send email.

Change django administration title

There are two ways to change them.

  1. Create //templates/admin/base_site.html file with the following content

    {% extends "admin/base.html" %}
    {% block title %}{{ title }} | Your website title here {% endblock %}
    
    {% block branding %}
    
    <h1 id="site-name">
        <a href="{% url 'admin:index' %}">Your website title here</a>
    </h1>
    {% endblock %}
    

    The original file is https://github.com/django/django/blob/master/django/contrib/admin/templates/admin/base_site.html

  2. Change settings.py and urls.py

    $ vi settings.py
    ...
    ADMIN_SITE_HEADER = "My shiny new administration"
    ...
    
    $ vi urls.py
    from django.conf import settings
    ...
    admin.site.site_title = settings.ADMIN_SITE_HEADER
    admin.site.site_header = settings.ADMIN_SITE_HEADER
    ...
    

    Source: http://stackoverflow.com/questions/4938491/django-admin-change-header-django-administration-text

Using pyenv on Ubuntu

Installing pyenv

$ sudo apt-get install -y --fix-missing make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils
$ git clone https://github.com/yyuu/pyenv.git ~/.pyenv
$ git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
$ . ~/.bash_profile

Installing python

$ pyenv install 3.5.2

Setting python version

$ pyenv versions
$ pyenv global system
$ pyenv global 3.5.2
$ pyenv global
$ pyenv local
$ pyenv local 3.5.2

Using virtualenv

$ pyenv virtualenv 3.5.2 venv
$ pyenv activate venv
$ pyenv deactivate venv

Checking python version

$ python -V