https://github.com/sageteamorg/django-sage-qrcode
https://github.com/sageteamorg/django-sage-qrcode
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sageteamorg/django-sage-qrcode
- Owner: sageteamorg
- License: mit
- Created: 2024-08-14T05:40:33.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-12-06T19:00:40.000Z (6 months ago)
- Last Synced: 2024-12-30T11:52:18.270Z (6 months ago)
- Language: Python
- Size: 4.79 MB
- Stars: 0
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# django-sage-qrcode
## Installation
### Using `pip` with `virtualenv`
1. **Create a Virtual Environment**:
```bash
python -m venv .venv
```2. **Activate the Virtual Environment**:
- On Windows:
```bash
.venv\Scripts\activate
```- On macOS/Linux:
```bash
source .venv/bin/activate
```3. **Install `django-sage-qrcode`**:
```bash
pip install django-sage-qrcode
```### Using `poetry`
1. **Initialize Poetry** (if not already initialized):
```bash
poetry init
```2. **Install Dependencies**:
```bash
poetry install
```3. **Install `django-sage-qrcode`**:
```bash
poetry add django-sage-qrcode
```4. **Apply Migrations**:
After installation, make sure to run the following commands to create the necessary database tables:
```bash
poetry run python manage.py makemigrations
poetry run python manage.py migrate
```## Django Settings Configuration
### Installed Apps
To use `django-sage-qrcode`, add it to your `INSTALLED_APPS` in the Django settings:
```python
INSTALLED_APPS = [
...
"sage_qrcode",
"sage_tools",
"colorfield",
"polymorphic",
...
]
```## Setup for Testing
Before running tests, ensure you set the `DJANGO_SETTINGS_MODULE` environment variable. This can be done in your terminal by running:
```bash
export DJANGO_SETTINGS_MODULE=your_project_name.settings
```Alternatively, you can configure this in the `tox.ini` file under `[testenv]` like this:
```ini
[testenv]
passenv = DJANGO_SETTINGS_MODULE
```This will ensure the correct settings module is used during testing.