https://github.com/chnm/ct-django

Django site for Connecting Threads

https://github.com/chnm/ct-django

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.4%) to scientific vocabulary

Keywords

django
Last synced: 10 months ago · JSON representation

Repository

Django site for Connecting Threads

Basic Info
  • Host: GitHub
  • Owner: chnm
  • Language: JavaScript
  • Default Branch: main
  • Homepage:
  • Size: 8.53 MB
Statistics
  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • Open Issues: 12
  • Releases: 0
Topics
django
Created about 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme

README.md

Connecting Threads

This repository contains code for the Connecting Threads project.

Python 3.11.0 / Django 4.1 / PostgreSQL 16

Development

The project uses Poetry for dependency and package management. To create your Django environment, navigate to the root (cloned) directory and do the following:

```sh cd ct-django

poetry install ```

We also use pre-commit with black and djhtml to keep things nicely formatted.

```sh poetry run pre-commit install

poetry run pre-commit autoupdate ```

Running manage.py will require prepending poetry to the commands, like so:

```sh poetry run python manage.py migrate

poetry run python manage.py tailwind build

poetry run python manage.py runserver ```

A Makefile exists to make life a little more convenient. The common commands are:

  • make preview: preview the site locally; this runs poetry run python manage.py runserver. You can also use npm run serve.
  • make tailwind: compile the CSS; this runs poetry run python manage.py tailwind start and will reload the browser anytime updates happen.
  • make mm: performs Django's makemigration
  • make migrate: performs Django's migrate

Setting up configuration in environment

For security, we store configurations in a local .env file. To get a local environment file to work with django-environ, we install python-dotenv:

sh % poetry add python-dotenv

Then add relevant files to an .env file:

% echo DEBUG=True >> .env % echo DJANGO_SECRET_KEY=$(poetry run python -c "import secrets; print(secrets.token_urlsafe())") >> .env

Update config/settings.py to read the .env file.

```python import environ from dotenv import load_dotenv

load_dotenv()

env = environ.FileAwareEnv( DEBUG=(bool, False) )

[...]

Update this existing value

DEBUG = env('DEBUG')

Update this existing value

SECRETKEY = env('DJANGOSECRET_KEY') ```

When it comes time to connect to Postgres, we also store the Postgres connection string in .env.

Owner

  • Name: Roy Rosenzweig Center for History and New Media
  • Login: chnm
  • Kind: organization
  • Location: Fairfax, VA, USA

GitHub Events

Total
  • Issues event: 7
  • Delete event: 6
  • Issue comment event: 7
  • Push event: 13
  • Pull request event: 16
  • Create event: 10
Last Year
  • Issues event: 7
  • Delete event: 6
  • Issue comment event: 7
  • Push event: 13
  • Pull request event: 16
  • Create event: 10

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 6
  • Total pull requests: 9
  • Average time to close issues: 24 days
  • Average time to close pull requests: 21 days
  • Total issue authors: 2
  • Total pull request authors: 3
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.11
  • Merged pull requests: 1
  • Bot issues: 1
  • Bot pull requests: 7
Past Year
  • Issues: 6
  • Pull requests: 9
  • Average time to close issues: 24 days
  • Average time to close pull requests: 21 days
  • Issue authors: 2
  • Pull request authors: 3
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.11
  • Merged pull requests: 1
  • Bot issues: 1
  • Bot pull requests: 7
Top Authors
Issue Authors
  • hepplerj (11)
Pull Request Authors
  • hepplerj (14)
  • dependabot[bot] (7)
  • qtrinh2 (3)
Top Labels
Issue Labels
type: feature (5) lang: django (2) priority: high (2) type: design (2) type: bug (1) database (1) documentation (1) question (1) data-model (1) status: needs estimation (1)
Pull Request Labels
dependencies (7) type: feature (7) python (5) type: design (5) lang: tailwind (2) lang: django (2) javascript (1) enhancement (1) design (1) data-model (1) priority: high (1) lang: javascript (1)

Dependencies

poetry.lock pypi
  • anyascii 0.3.2
  • asgiref 3.8.1
  • astroid 3.1.0
  • beautifulsoup4 4.12.3
  • black 24.4.2
  • certifi 2024.2.2
  • cfgv 3.4.0
  • charset-normalizer 3.3.2
  • click 8.1.7
  • colorama 0.4.6
  • defusedxml 0.7.1
  • dill 0.3.8
  • distlib 0.3.8
  • django 5.0.6
  • django-allauth 0.62.1
  • django-debug-toolbar 4.3.0
  • django-environ 0.11.2
  • django-filter 24.2
  • django-htmx 1.17.3
  • django-modelcluster 6.3
  • django-permissionedforms 0.1
  • django-taggit 5.0.1
  • django-tailwind 3.8.0
  • django-treebeard 4.7.1
  • djangorestframework 3.15.1
  • djhtml 3.0.6
  • draftjs-exporter 5.0.0
  • et-xmlfile 1.1.0
  • filelock 3.14.0
  • filetype 1.2.0
  • identify 2.5.36
  • idna 3.7
  • iniconfig 2.0.0
  • isort 5.13.2
  • l18n 2021.3
  • laces 0.1.1
  • mccabe 0.7.0
  • mypy-extensions 1.0.0
  • nodeenv 1.8.0
  • openpyxl 3.1.2
  • packaging 24.0
  • pathspec 0.12.1
  • pillow 10.3.0
  • pillow-heif 0.16.0
  • platformdirs 4.2.1
  • pluggy 1.5.0
  • pre-commit 3.7.0
  • psycopg2 2.9.9
  • pylint 3.1.0
  • pylint-django 2.5.5
  • pylint-plugin-utils 0.8.2
  • pytest 8.2.0
  • pytest-django 4.8.0
  • python-dotenv 1.0.1
  • pytz 2024.1
  • pyyaml 6.0.1
  • requests 2.31.0
  • setuptools 69.5.1
  • six 1.16.0
  • soupsieve 2.5
  • sqlparse 0.5.0
  • taggit-selectize 2.11.0
  • telepath 0.3.1
  • tomlkit 0.12.4
  • tzdata 2024.1
  • urllib3 2.2.1
  • virtualenv 20.26.1
  • wagtail 6.1
  • willow 1.8.0
pyproject.toml pypi
  • black ^24.4.2 develop
  • django-debug-toolbar ^4.3.0 develop
  • djhtml ^3.0.6 develop
  • pre-commit ^3.7.0 develop
  • pylint-django ^2.5.5 develop
  • pytest-django ^4.8.0 develop
  • django ^5.0.6
  • django-allauth ^0.62.1
  • django-environ ^0.11.2
  • django-htmx ^1.17.3
  • django-taggit ^5.0.1
  • django-tailwind ^3.8.0
  • psycopg2 ^2.9.9
  • python ^3.11
  • python-dotenv ^1.0.1
  • taggit-selectize ^2.11.0
  • wagtail ^6.1
.github/workflows/cicd.yml actions
Dockerfile docker
  • python 3.11 build
docker-compose.yml docker
  • rrchnm/ct-django latest
theme/static_src/package-lock.json npm
  • 119 dependencies
theme/static_src/package.json npm
  • @tailwindcss/aspect-ratio ^0.4.2 development
  • @tailwindcss/forms ^0.5.7 development
  • @tailwindcss/typography ^0.5.10 development
  • cross-env ^7.0.3 development
  • postcss ^8.4.32 development
  • postcss-import ^15.1.0 development
  • postcss-nested ^6.0.1 development
  • postcss-simple-vars ^7.0.1 development
  • rimraf ^5.0.5 development
  • tailwindcss ^3.4.0 development