Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plain text db #217

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add plain text db #217

wants to merge 2 commits into from

Conversation

Omrigan
Copy link

@Omrigan Omrigan commented Apr 8, 2023

Plain text is easier to audit, and doesn't require setting up any extra databases.

PR is a bit dirty but I will clean it up if maintainers decide to merge

Omrigan added 2 commits April 8, 2023 16:58
Signed-off-by: Oleg Vasilev <[email protected]>
Signed-off-by: Oleg Vasilev <[email protected]>
@dontsovcmc
Copy link

@Omrigan спасибо за коммит!
Только поправьте ошибку - уберите username, т.к. если его нет, то не будет работать. self.user.get('username') вернёт None и не будет переходить к str(self.user["_id"])
Оставьте:
def _folder_name(self):
return str(self.user["_id"])

@dontsovcmc
Copy link

@Omrigan может сделать просто если есть mongodb_uri, то БД монго, иначе plain_text (но можно и plain_text_db_uri сделать.
Еще добавить в .gitignore папку с текстовой БД

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants