Commit 98d1c0d9 authored by rakvat's avatar rakvat

initial django

parent 17381be9
name = "pypi"
url = ""
verify_ssl = true
django = "==2.2"
psycopg2 = "*"
python_version = "3.6"
"_meta": {
"hash": {
"sha256": "db73527e20f003c0866aea1c670790acc3647405e2a3c2f1fdbc116156f9d2d3"
"pipfile-spec": 6,
"requires": {
"python_version": "3.6"
"sources": [
"name": "pypi",
"url": "",
"verify_ssl": true
"default": {
"django": {
"hashes": [
"index": "pypi",
"version": "==2.2"
"psycopg2": {
"hashes": [
"index": "pypi",
"version": "==2.8.2"
"pytz": {
"hashes": [
"version": "==2019.1"
"sqlparse": {
"hashes": [
"version": "==0.3.0"
"develop": {}
......@@ -7,6 +7,16 @@
## Tech Setup
### Django app
pipenv shell
python runserver
### Diagrams
The diagrams are generated with [PlantUML](
cd diagrams && java -jar plantuml.jar *.txt
......@@ -40,6 +40,7 @@ This is the basic framework that hopefully many people can agree on and that giv
### Implementation
People continue living where and how they want. Instead of voting for a party that will make decisions, those who want to take part in decisions get organized (by going to meetings or in online communication) in various groups or send someone they trust to those groups:
1. Consumption councils communicate the needs of people in a specific area (consumption community). (Of course, individuals can also communicate their own needs if they are not part of a council).
2. Production collectives (or individuals) communicate what they are able to produce and what kind of resources they need for production (this includes care and reproduction work).
3. Coordination committees plan how the needs could be met best with the available resources and production capacities. In the case of scarce resources, they will have to find solutions that are as fair as possible for everyone involved. In the case of distribution conflicts, they meditate between consumption councils and production collectives until everyone involved can live with the proposed solution. The coordination committee does not force a decision on the people but supports them in finding a decision that is best for everyone. (The plans should not be as rigid as Soviet 5-year plans and way more decentralized but they need to include long term planning for scarce and toxic resources as well as dynamic day-to-day adaption possibilities.)
......@@ -66,6 +67,7 @@ The goal of free and solidary communities has to be present in the ways that are
The idea of transformation via reforms implemented by the government sounds unrealistic because the goal is a society without government and the government will probably not be willing to remove itself. Some social improvements can be reached with reforms, system change probably not.
A forceful and violent revolution sounds unrealistic too for multiple reasons:
1. With today's technology (surveillance and weapons) we can no longer hope to just storm the Bastille - the government/military can decide to kill those movements if they want to with their resources.
2. The use of force is not compatible with the goal and will just generate more violence instead of a free society.
3. If force is required, it means that not enough people agreed with the goals of the transformation yet and those might try to create new leaders and governments after the revolution.
......@@ -97,6 +99,7 @@ Right-wing movements are racist, elitist, sexist, and exclusionary (they might o
3. Projects help to start new projects by supporting them with knowledge and resources.
The seed level can get more traction and become dominant by (some ideas just to show that there are many ways):
0. Spreading the idea in many languages and in various social, cultural, and artistic styles.
1. Building bigger projects and autonomous regions that implement the ideas of free and solidary societies.
2. The same approach could be applied to small cities ("Projekt A" in Neustadt was an example of that).
......@@ -121,7 +124,8 @@ Start with various approaches everywhere. Now.
## References
This text is influenced by
This text is influenced by:
- Simon Sutterlütti/Stefan Meretz: Kapitalismus aufheben and
- Ursula K. Le Guin: The Dispossessed
- P.M.: bolo'bolo
Django settings for fsoso_web project.
Generated by 'django-admin startproject' using Django 2.2.
For more information on this file, see
For the full list of settings and their values, see
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '&258t*l(*e4#4zvdb1b$hop(+h_5px0tbznx5vr2xpu9j61#+7'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
# Application definition
ROOT_URLCONF = 'fsoso_web.urls'
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'context_processors': [
WSGI_APPLICATION = 'fsoso_web.wsgi.application'
# Database
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'fsoso',
'USER': 'fsoso_user',
'PASSWORD': 'password',
'HOST': 'localhost',
'PORT': '',
# Password validation
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
# Internationalization
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
STATIC_URL = '/static/'
"""fsoso_web URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
from django.contrib import admin
from django.urls import include, path
urlpatterns = [
path('web/', include('web.urls')),
WSGI config for fsoso_web project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'fsoso_web.settings')
application = get_wsgi_application()
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'fsoso_web.settings')
from import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
if __name__ == '__main__':
from django.contrib import admin
from .models import Good
class GoodAdmin(admin.ModelAdmin):
fields = ['name', 'description', 'expires_at'], GoodAdmin)
from django.apps import AppConfig
class WebConfig(AppConfig):
name = 'web'
# Generated by Django 2.2 on 2019-05-19 17:51
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
operations = [
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200)),
('description', models.TextField()),
('expires_at', models.DateTimeField(verbose_name='expires at')),
from django.utils import timezone
from django.db import models
class Good(models.Model):
name = models.CharField(max_length=200)
description = models.TextField()
expires_at = models.DateTimeField('expires at')
def __str__(self):
def is_expired(self):
return self.expires_at <
def non_expired(cls):
return cls.objects.filter(
from django.test import TestCase
# Create your tests here.
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
from django.shortcuts import render
from django.http import HttpResponse
def index(request):
return HttpResponse("Hello, world. This is FSoSo taking")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment