Skip to content
Closed

Misc #226

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
// "remoteEnv": {"PATH": "/home/dev-user/.local/bin:${containerEnv:PATH}"},
"remoteUser": "dev-user",
"workspaceFolder": "/app",
"forwardPorts": [
8000 // Github codespaces cant' detect this port automatically for some reason
],
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
},
Expand Down
3 changes: 0 additions & 3 deletions .prettierignore

This file was deleted.

3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

The MIT License (MIT)
Copyright (c) 2024, Matthew Foster Walsh
Copyright (c) 2025, Matthew Foster Walsh

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
28 changes: 21 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Democrasite
===========

|Built with Cookiecutter Django| |Black code style| |Continuous integration| |Coverage report| |Documentation status|
|Built with Cookiecutter Django| |Ruff| |Continuous integration| |Coverage report| |Documentation status|

.. |Built with Cookiecutter Django| image:: https://img.shields.io/badge/built%20with-Cookiecutter%20Django-ff69b4.svg?logo=cookiecutter
:target: https://github.com/pydanny/cookiecutter-django/

.. |Black code style| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/ambv/black
.. |Ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
:target: //github.com/astral-sh/ruff

.. |Continuous integration| image:: https://github.com/mfosterw/cookiestocracy/actions/workflows/ci.yml/badge.svg
:target: https://github.com/mfosterw/cookiestocracy/actions/workflows/ci.yml
Expand All @@ -23,8 +23,8 @@ Democrasite

Democrasite is a website which automatically merges changes based on popular
approval. For more information on the nature and purpose of the project, visit
our `about page`_. This page is meant for people who want to clone the
repository and contribute to the project. This project is approximately in beta
our `about page`_. This page is meant for people who want to fork the
repository and/or contribute to the project. This project is approximately in beta
development (hence the repository being named "cookiestocracy" - a reference
to cookiecutter and `kakistocracy`_). The alpha version is `here`_ and the
full version doesn't exist yet.
Expand Down Expand Up @@ -55,7 +55,7 @@ Getting Started
The easiest way to explore the repository is to open it in GitHub Codespaces with the
button above. Once you've given the container some time to set up (it should take about
three minutes), navigate to the ports tab right above the terminal and hover over port
3000, then click on the browser icon that appears. You should see the development
8000, then click on the browser icon that appears. You should see the development
version of the homepage! (With no data yet, see below).

Please read the `contribution guide`_ to set up a local development environment with
Expand All @@ -64,6 +64,20 @@ following the instructions in the guide.

.. _`contribution guide`: https://cookiestocracy.readthedocs.io/en/latest/CONTRIBUTING.html

.. warning::
Firefox's "advanced tracking protection" can cause problems connecting to the
codespace. If you are experiencing errors, you can disable it for that page by
clicking on the shield icon to the left of the URL and switching off Advanced
Tracking Protection


Understanding the repository
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check out ``repo_map.txt`` in the root of the repository for a display of the
repository layout and brief explanations for the purpose of each non-obvious file and
directory.


Management Commands
-------------------
Expand All @@ -80,7 +94,7 @@ Loading initial data

To load some initial sample data into the database, run::

$ python manage.py loaddata initial.json
$ python manage.py loaddata democrasite activitypub

Setting up your users
^^^^^^^^^^^^^^^^^^^^^
Expand Down
6 changes: 5 additions & 1 deletion config/settings/base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Base settings to build other settings files upon."""

import warnings
from pathlib import Path

import environ
Expand Down Expand Up @@ -36,8 +37,11 @@

# DATABASES
# ------------------------------------------------------------------------------
with warnings.catch_warnings():
warnings.simplefilter("ignore") # environ raises an unhelpful warning here
db_url = env.db("DATABASE_URL", default=None)
# https://docs.djangoproject.com/en/dev/ref/settings/#databases
if db_url := env.db("DATABASE_URL", default=None):
if db_url:
DATABASES = {"default": db_url}
else:
DATABASES = {
Expand Down
19 changes: 7 additions & 12 deletions constitution.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
{
"constitution.json": null,
"config/settings/base.py": [[340, 359]],
"config/urls.py": [[9, 16]],
"config/settings/base.py": [[412, 431]],
"config/urls.py": [[14, 33]],
"democrasite/static/js/vote.js": null,
"democrasite/templates/base.html": null,
"democrasite/users/models.py": [[7, 13]],
"democrasite/users/urls.py": null,
"democrasite/users/models.py": [[19, 35]],
"democrasite/webiscite/constitution.py": null,
"democrasite/webiscite/models.py": [[11, 84]],
"democrasite/webiscite/tasks.py": [
[43, 80],
[89, 96],
[112, 176]
],
"democrasite/webiscite/urls.py": [[16, 22]],
"democrasite/webiscite/views.py": [[110, 133]]
"democrasite/webiscite/models.py": [[106, 439]],
"democrasite/webiscite/tasks.py": [[23, 78]],
"democrasite/webiscite/urls.py": [[10, 16]],
"democrasite/webiscite/views.py": [[127, 171]]
}
2 changes: 1 addition & 1 deletion democrasite/contrib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
To understand why this file is here, please read:

http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
https://cookiecutter-django.readthedocs.io/en/latest/5-help/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
"""
2 changes: 1 addition & 1 deletion democrasite/contrib/sites/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
To understand why this file is here, please read:

http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
https://cookiecutter-django.readthedocs.io/en/latest/5-help/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
"""
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
To understand why this file is here, please read:

http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
https://cookiecutter-django.readthedocs.io/en/latest/5-help/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
"""

from django.conf import settings
Expand Down
2 changes: 1 addition & 1 deletion democrasite/contrib/sites/migrations/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
To understand why this file is here, please read:

http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
https://cookiecutter-django.readthedocs.io/en/latest/5-help/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
"""
4 changes: 0 additions & 4 deletions democrasite/static/css/webiscite.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
color: var(--red) !important;
}

.git-pull-link {
text-decoration: none !important;
}

.progress {
height: 5px;
}
Loading
Loading