semvec/pypi-packages huggingface dataset:
django-configurations-ec2 2020.10.25
django-configurations AWS EC2 settings - ALLOWED_HOSTS and LOGGING
License: Unlicense
Keywords: django django-configurations AWS EC2

<!--
https://readme42.com
-->


[![](https://img.shields.io/pypi/v/django-configurations-ec2.svg?maxAge=3600)](https://pypi.org/project/django-configurations-ec2/)
[![](https://img.shields.io/badge/License-Unlicense-blue.svg?longCache=True)](https://unlicense.org/)

### Installation
```bash
$ [sudo] pip install django-configurations-ec2
```

#### Features
+   `ALLOWED_HOSTS` - EC2 private ip
+   `LOGGING` - CloudWatch logging

##### `settings.py`
```python
from configurations import Configuration
from django_configurations_ec2 import AllowedHostsMixin, LoggingMixin

class Prod(AllowedHostsMixin,Configuration):
    ALLOWED_HOSTS=['.domain.com']
```

CloudWatch
```python
from configurations import Configuration
from django_configurations_ec2 import LoggingMixin

class Prod(LoggingMixin,Configuration):
    ...
```

##### `.env`
```bash
DJANGO_AWS_ACCESS_KEY_ID=ACCESS_KEY_ID
DJANGO_AWS_SECRET_ACCESS_KEY=SECRET_ACCESS_KEY
DJANGO_AWS_REGION_NAME=REGION_NAME
DJANGO_AWS_LOG_GROUP=LOG_GROUP
DJANGO_AWS_STREAM_NAME=STREAM_NAME
```

#### Links
+   [django-configurations](https://github.com/jazzband/django-configurations)

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
django-configurations-webpack 2020.10.25
django-configurations webpack settings
License: Unlicense
Keywords: django webpack configuration

<!--
https://readme42.com
-->


[![](https://img.shields.io/pypi/v/django-configurations-webpack.svg?maxAge=3600)](https://pypi.org/project/django-configurations-webpack/)
[![](https://img.shields.io/badge/License-Unlicense-blue.svg?longCache=True)](https://unlicense.org/)

### Installation
```bash
$ [sudo] pip install django-configurations-webpack
```

#### Examples
`settings.py`
```python
from configurations import Configuration
from django_configurations_webpack import WebpackDevMixin, WebpackProdMixin

class Dev(WebpackDevMixin,Configuration):
    ... # WEBPACK_STATS_FILE ./webpack-stats.json by default

class Prod(WebpackProdMixin,Configuration):
    ... # WEBPACK_STATS_FILE ./webpack-stats-prod.json by default
```


`webpack.config.js`
```js
var path = require('path');
var BundleTracker = require('webpack-bundle-tracker');

module.exports = {
  output: {
      path: path.resolve('./assets/webpack_bundles/')
  },

  plugins: [
    new BundleTracker({filename: './webpack-stats.json'}) // './webpack-stats-prod.json' (prod)
  ]
}
```

template
```html
{% load render_bundle from webpack_loader %}
<head>
{% render_bundle 'main' 'css' %}
</head>
<body>
...
{% render_bundle 'main' 'js' %}
</body>
```

#### Links
+   [django-configurations](https://github.com/jazzband/django-configurations)
+   [django-webpack-loader](https://github.com/owais/django-webpack-loader)

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>