various updates

This commit is contained in:
Nils Büchner 2024-07-17 10:16:01 +00:00
parent a88c6a3c50
commit 02c12247ee
6 changed files with 79 additions and 9 deletions

2
.gitignore vendored
View file

@ -15,3 +15,5 @@ src
*.log *.log
plugins/* plugins/*
ubottu/maubot.db ubottu/maubot.db
ubottu/ubottu/settings.py
ubottu/ubottu/static/*

View file

@ -2,9 +2,11 @@ aiohttp==3.9.3
aiosignal==1.3.1 aiosignal==1.3.1
aiosqlite==0.18.0 aiosqlite==0.18.0
asgiref==3.8.1 asgiref==3.8.1
async-timeout==4.0.3
asyncpg==0.28.0 asyncpg==0.28.0
attrs==23.2.0 attrs==23.2.0
bcrypt==4.1.2 bcrypt==4.1.2
blinker==1.4
Brotli==1.1.0 Brotli==1.1.0
certifi==2024.2.2 certifi==2024.2.2
cffi==1.16.0 cffi==1.16.0
@ -12,32 +14,59 @@ charset-normalizer==3.3.2
click==8.1.7 click==8.1.7
colorama==0.4.6 colorama==0.4.6
commonmark==0.9.1 commonmark==0.9.1
cryptography==3.4.8
dbus-python==1.2.18
distro==1.7.0
Django==5.0.3 Django==5.0.3
djangorestframework==3.15.1 djangorestframework==3.15.1
feedparser==6.0.11 feedparser==6.0.11
frozenlist==1.4.1 frozenlist==1.4.1
geographiclib==2.0 geographiclib==2.0
geopy==2.4.1 geopy==2.4.1
h3==3.7.7
httplib2==0.20.2
idna==3.6 idna==3.6
importlib-metadata==4.6.4
jeepney==0.7.1
Jinja2==3.1.3 Jinja2==3.1.3
keyring==23.5.0
launchpadlib==1.10.16
lazr.restfulclient==0.14.4
lazr.uri==1.0.6
MarkupSafe==2.1.5 MarkupSafe==2.1.5
more-itertools==8.10.0
multidict==6.0.5 multidict==6.0.5
mysqlclient==2.2.4 mysqlclient==2.1.1
netifaces==0.11.0
numpy==2.0.0
oauthlib==3.2.0
packaging==24.0 packaging==24.0
prompt-toolkit==3.0.43 prompt-toolkit==3.0.43
pycparser==2.21 pycparser==2.21
PyGObject==3.42.1
PyJWT==2.3.0
pyparsing==2.4.7
python-apt==2.4.0+ubuntu3
python-olm==3.2.16 python-olm==3.2.16
pytz==2024.1
PyYAML==5.4.1
questionary==1.10.0 questionary==1.10.0
redis==5.0.3
requests==2.31.0 requests==2.31.0
ruamel.yaml==0.17.40 ruamel.yaml==0.17.40
ruamel.yaml.clib==0.2.8 ruamel.yaml.clib==0.2.8
SecretStorage==3.3.1
sgmllib3k==1.0.0 sgmllib3k==1.0.0
six==1.16.0
SQLAlchemy==1.3.24 SQLAlchemy==1.3.24
sqlparse==0.4.4 sqlparse==0.4.4
ssh-import-id==5.11
timezonefinder==6.5.2
typing_extensions==4.12.2
ubuntu-pro-client==8001
urllib3==2.2.1 urllib3==2.2.1
uWSGI==2.0.24 uWSGI==2.0.24
wadllib==1.3.6
wcwidth==0.2.13 wcwidth==0.2.13
wheel==0.43.0
yarl==1.9.4 yarl==1.9.4
redis==5.0.3 zipp==1.0.0

View file

@ -0,0 +1,39 @@
# Generated by Django 5.0.3 on 2024-07-17 10:08
import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Author',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=64)),
],
),
migrations.CreateModel(
name='Fact',
fields=[
('name', models.CharField(max_length=32)),
('value', models.TextField()),
('ftype', models.CharField(choices=[('REPLY', 'Reply'), ('ALIAS', 'Alias')], default='REPLY', max_length=32)),
('id', models.BigAutoField(primary_key=True, serialize=False)),
('room', models.CharField(blank=True, default=None, max_length=128, null=True)),
('create_date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date published')),
('change_date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date changed')),
('popularity', models.IntegerField(default=0)),
('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
],
),
]

View file

View file

@ -1,7 +1,7 @@
import redis import redis
import json import json
import traceback import traceback
from bugtracker.launchpad_singleton import get_launchpad from . launchpad_singleton import get_launchpad
# Connect to Redis # Connect to Redis
cache = redis.Redis(host='localhost', port=6379, db=0) cache = redis.Redis(host='localhost', port=6379, db=0)

View file

@ -91,7 +91,7 @@ DATABASES = {
'ENGINE': 'django.db.backends.mysql', 'ENGINE': 'django.db.backends.mysql',
'HOST': '127.0.0.1', 'HOST': '127.0.0.1',
'USER': 'ubottu', 'USER': 'ubottu',
'PASSWORD': 'iyoiyiG7Kahy', 'PASSWORD': '',
'NAME': 'ubottu' 'NAME': 'ubottu'
} }
} }
@ -131,9 +131,9 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/5.0/howto/static-files/ # https://docs.djangoproject.com/en/5.0/howto/static-files/
STATIC_URL = 'static/' PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
#STATIC_ROOT = "/home/maubot/ubottu-web/static/" STATIC_URL = '/static/'
STATICFILES_DIRS = [BASE_DIR / 'static'] STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static')
# Default primary key field type # Default primary key field type
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field # https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field