<commit_before># Epic Spindle Template for Really Awesome Django Apps (ESTRADA)

Template to provide defaults for new Django 1.8+ projects with docker + postgres included.

## Requirements

Install pip
(If you have PIP installed skip this part)

Official guide: https://pip.pypa.io/en/latest/installing.html

Example for Ubuntu
```
sudo apt-get install python-pip

# Upgrade pip
pip install -U pip
```

A working django version >= 1.5 for generating the project from a template. The
created project will use django 1.8+ but we need a django version to create
the project from this template.
```
sudo pip install django
```

Docker and docker-compose

Depending on your machine the installation process might be different check:
https://docs.docker.com/installation/
https://docs.docker.com/compose/install/

Example for Ubuntu
```
# Docker
wget -qO- https://get.docker.com/ | sh

# docker-compose
sudo pip install docker-compose
```

## Usage

To create a new django project with this template:
```
# Replace project_name with the name of your project
django-admin startproject --template=https://github.com/wearespindle/estrada/archive/master.zip --extension=py,yml,sh --name=Dockerfile,spindle.html project_name
```

Build the Docker environment
```
cd /project_name # Where the docker-compose.yml lives.
docker-compose build
# Run this twice if first time fails (slow DB initialization first time)
docker-compose run web python manage.py migrate
docker-compose up
```

Visit the site at localhost:8000 or your dockerhost_ip:8000
<commit_msg>change port to 8005<commit_after># Epic Spindle Template for Really Awesome Django Apps (ESTRADA)

Template to provide defaults for new Django 1.8+ projects with docker + postgres included.

## Requirements

Install pip
(If you have PIP installed skip this part)

Official guide: https://pip.pypa.io/en/latest/installing.html

Example for Ubuntu
```
sudo apt-get install python-pip

# Upgrade pip
pip install -U pip
```

A working django version >= 1.5 for generating the project from a template. The
created project will use django 1.8+ but we need a django version to create
the project from this template.
```
sudo pip install django
```

Docker and docker-compose

Depending on your machine the installation process might be different check:
https://docs.docker.com/installation/
https://docs.docker.com/compose/install/

Example for Ubuntu
```
# Docker
wget -qO- https://get.docker.com/ | sh

# docker-compose
sudo pip install docker-compose
```

## Usage

To create a new django project with this template:
```
# Replace project_name with the name of your project
django-admin startproject --template=https://github.com/wearespindle/estrada/archive/master.zip --extension=py,yml,sh --name=Dockerfile,spindle.html project_name
```

Build the Docker environment
```
cd /project_name # Where the docker-compose.yml lives.
docker-compose build
# Run this twice if first time fails (slow DB initialization first time)
docker-compose run web python manage.py migrate
docker-compose up
```

Visit the site at localhost:8005 or your dockerhost_ip:8005

{'fraction_non_alphanumeric': 0.08791208791208792, 'fraction_numerical': 0.010342598577892695, 'mean_word_length': 4.50711743772242, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2383847', 'n_tokens_mistral': 1000, 'n_tokens_neox': 870, 'n_words': 361}