diff --git a/.devcontainer/bashrc.override.sh b/.devcontainer/bashrc.override.sh new file mode 100644 index 0000000..bedddf6 --- /dev/null +++ b/.devcontainer/bashrc.override.sh @@ -0,0 +1,20 @@ + +# +# .bashrc.override.sh +# + +# persistent bash history +HISTFILE=~/.bash_history +PROMPT_COMMAND="history -a; $PROMPT_COMMAND" + +# set some django env vars +source /entrypoint + +# restore default shell options +set +o errexit +set +o pipefail +set +o nounset + +# start ssh-agent +# https://code.visualstudio.com/docs/remote/troubleshooting +eval "$(ssh-agent -s)" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..1641978 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,85 @@ +// For format details, see https://containers.dev/implementors/json_reference/ +{ + "name": "roomify_dev", + "dockerComposeFile": [ + "../local.yml" + ], + "init": true, + "mounts": [ + { + "source": "./.devcontainer/bash_history", + "target": "/home/dev-user/.bash_history", + "type": "bind" + }, + { + "source": "/tmp", + "target": "/tmp", + "type": "bind" + }, + { + "source": "~/.ssh", + "target": "/home/dev-user/.ssh", + "type": "bind" + } + ], + // Tells devcontainer.json supporting services / tools whether they should run + // /bin/sh -c "while sleep 1000; do :; done" when starting the container instead of the container’s default command + "overrideCommand": false, + "service": "django", + // "remoteEnv": {"PATH": "/home/dev-user/.local/bin:${containerEnv:PATH}"}, + "remoteUser": "dev-user", + "workspaceFolder": "/app", + // Set *default* container specific settings.json values on container create. + "customizations": { + "vscode": { + "settings": { + "editor.formatOnSave": true, + "[python]": { + "analysis.autoImportCompletions": true, + "analysis.typeCheckingMode": "basic", + "defaultInterpreterPath": "/usr/local/bin/python", + "editor.codeActionsOnSave": { + "source.organizeImports": true + }, + // Uncomment when fixed + // https://github.com/microsoft/vscode-remote-release/issues/8474 + // "editor.defaultFormatter": "ms-python.black-formatter", + "formatting.blackPath": "/usr/local/bin/black", + "formatting.provider": "black", + "languageServer": "Pylance", + // "linting.banditPath": "/usr/local/py-utils/bin/bandit", + "linting.enabled": true, + "linting.flake8Enabled": true, + "linting.flake8Path": "/usr/local/bin/flake8", + "linting.mypyEnabled": true, + "linting.mypyPath": "/usr/local/bin/mypy", + "linting.pycodestylePath": "/usr/local/bin/pycodestyle", + // "linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", + "linting.pylintEnabled": true, + "linting.pylintPath": "/usr/local/bin/pylint" + } + }, + // https://code.visualstudio.com/docs/remote/devcontainerjson-reference#_vs-code-specific-properties + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "davidanson.vscode-markdownlint", + "mrmlnc.vscode-duplicate", + "visualstudioexptteam.vscodeintellicode", + "visualstudioexptteam.intellicode-api-usage-examples", + // python + "ms-python.python", + "ms-python.vscode-pylance", + "ms-python.isort", + "ms-python.black-formatter", + // django + "batisteo.vscode-django" + ] + } + }, + // Uncomment the next line if you want start specific services in your Docker Compose config. + // "runServices": [], + // Uncomment the next line if you want to keep your containers running after VS Code shuts down. + // "shutdownAction": "none", + // Uncomment the next line to run commands after the container is created. + "postCreateCommand": "cat .devcontainer/bashrc.override.sh >> ~/.bashrc" +} diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..a602416 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,12 @@ +.editorconfig +.gitattributes +.github +.gitignore +.gitlab-ci.yml +.idea +.pre-commit-config.yaml +.readthedocs.yml +.travis.yml +venv +.git +.envs/ diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..c0ce342 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,27 @@ +# http://editorconfig.org + +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{py,rst,ini}] +indent_style = space +indent_size = 4 + +[*.{html,css,scss,json,yml,xml}] +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false + +[Makefile] +indent_style = tab + +[default.conf] +indent_style = space +indent_size = 2 diff --git a/.envs/.local/.django b/.envs/.local/.django new file mode 100644 index 0000000..247287b --- /dev/null +++ b/.envs/.local/.django @@ -0,0 +1,14 @@ +# General +# ------------------------------------------------------------------------------ +USE_DOCKER=yes +IPYTHONDIR=/app/.ipython +# Redis +# ------------------------------------------------------------------------------ +REDIS_URL=redis://redis:6379/0 + +# Celery +# ------------------------------------------------------------------------------ + +# Flower +CELERY_FLOWER_USER=debug +CELERY_FLOWER_PASSWORD=debug diff --git a/.envs/.local/.postgres b/.envs/.local/.postgres new file mode 100644 index 0000000..c34820e --- /dev/null +++ b/.envs/.local/.postgres @@ -0,0 +1,7 @@ +# PostgreSQL +# ------------------------------------------------------------------------------ +POSTGRES_HOST=postgres +POSTGRES_PORT=5432 +POSTGRES_DB=roomify +POSTGRES_USER=debug +POSTGRES_PASSWORD=debug diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..176a458 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..9e2dcb0 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,91 @@ +# Config for Dependabot updates. See Documentation here: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + # Update GitHub actions in workflows + - package-ecosystem: 'github-actions' + directory: '/' + # Every weekday + schedule: + interval: 'daily' + + # Enable version updates for Docker + # We need to specify each Dockerfile in a separate entry because Dependabot doesn't + # support wildcards or recursively checking subdirectories. Check this issue for updates: + # https://github.com/dependabot/dependabot-core/issues/2178 + - package-ecosystem: 'docker' + # Look for a `Dockerfile` in the `compose/local/django` directory + directory: 'compose/local/django/' + # Every weekday + schedule: + interval: 'daily' + # Ignore minor version updates (3.10 -> 3.11) but update patch versions + ignore: + - dependency-name: '*' + update-types: + - 'version-update:semver-major' + - 'version-update:semver-minor' + + - package-ecosystem: 'docker' + # Look for a `Dockerfile` in the `compose/local/docs` directory + directory: 'compose/local/docs/' + # Every weekday + schedule: + interval: 'daily' + # Ignore minor version updates (3.10 -> 3.11) but update patch versions + ignore: + - dependency-name: '*' + update-types: + - 'version-update:semver-major' + - 'version-update:semver-minor' + + - package-ecosystem: 'docker' + # Look for a `Dockerfile` in the `compose/local/node` directory + directory: 'compose/local/node/' + # Every weekday + schedule: + interval: 'daily' + + - package-ecosystem: 'docker' + # Look for a `Dockerfile` in the `compose/production/aws` directory + directory: 'compose/production/aws/' + # Every weekday + schedule: + interval: 'daily' + + - package-ecosystem: 'docker' + # Look for a `Dockerfile` in the `compose/production/django` directory + directory: 'compose/production/django/' + # Every weekday + schedule: + interval: 'daily' + # Ignore minor version updates (3.10 -> 3.11) but update patch versions + ignore: + - dependency-name: '*' + update-types: + - 'version-update:semver-major' + - 'version-update:semver-minor' + + - package-ecosystem: 'docker' + # Look for a `Dockerfile` in the `compose/production/postgres` directory + directory: 'compose/production/postgres/' + # Every weekday + schedule: + interval: 'daily' + + - package-ecosystem: 'docker' + # Look for a `Dockerfile` in the `compose/production/traefik` directory + directory: 'compose/production/traefik/' + # Every weekday + schedule: + interval: 'daily' + + # Enable version updates for Python/Pip - Production + - package-ecosystem: 'pip' + # Look for a `requirements.txt` in the `root` directory + # also 'setup.cfg', 'runtime.txt' and 'requirements/*.txt' + directory: '/' + # Every weekday + schedule: + interval: 'daily' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9f05793 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,54 @@ +name: CI + +# Enable Buildkit and let compose use it to speed up image building +env: + DOCKER_BUILDKIT: 1 + COMPOSE_DOCKER_CLI_BUILD: 1 + +on: + pull_request: + branches: ['master', 'main'] + paths-ignore: ['docs/**'] + + push: + branches: ['master', 'main'] + paths-ignore: ['docs/**'] + +concurrency: + group: ${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + linter: + runs-on: ubuntu-latest + steps: + - name: Checkout Code Repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + # Consider using pre-commit.ci for open source project + - name: Run pre-commit + uses: pre-commit/action@v3.0.0 + + # With no caching at all the entire ci process takes 4m 30s to complete! + pytest: + runs-on: ubuntu-latest + + steps: + - name: Checkout Code Repository + uses: actions/checkout@v4 + + - name: Build the Stack + run: docker compose -f local.yml build + + - name: Run DB Migrations + run: docker compose -f local.yml run --rm django python manage.py migrate + + - name: Run Django Tests + run: docker compose -f local.yml run django pytest + + - name: Tear down the Stack + run: docker compose -f local.yml down diff --git a/.gitignore b/.gitignore index ede6dbc..9670549 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,281 @@ -*.log -*.pot -*.pyc +### Python template +# Byte-compiled / optimized / DLL files __pycache__/ -local_settings.py -db.sqlite3 -media -.env +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +staticfiles/ + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# Environments .venv -env/ venv/ ENV/ -env.bak/ -venv.bak/ -*initial.py \ No newline at end of file + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ + + +### Node template +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Typescript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + + +### Linux template +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + + +### VisualStudioCode template +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for devcontainer +.devcontainer/bash_history + + + + +### Windows template +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + + +### macOS template +# General +*.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + + +### SublimeText template +# Cache files for Sublime Text +*.tmlanguage.cache +*.tmPreferences.cache +*.stTheme.cache + +# Workspace files are user-specific +*.sublime-workspace + +# Project files should be checked into the repository, unless a significant +# proportion of contributors will probably not be using Sublime Text +# *.sublime-project + +# SFTP configuration file +sftp-config.json + +# Package control specific files +Package Control.last-run +Package Control.ca-list +Package Control.ca-bundle +Package Control.system-ca-bundle +Package Control.cache/ +Package Control.ca-certs/ +Package Control.merged-ca-bundle +Package Control.user-ca-bundle +oscrypto-ca-bundle.crt +bh_unicode_properties.cache + +# Sublime-github package stores a github token in this file +# https://packagecontrol.io/packages/sublime-github +GitHub.sublime-settings + + +### Vim template +# Swap +[._]*.s[a-v][a-z] +[._]*.sw[a-p] +[._]s[a-v][a-z] +[._]sw[a-p] + +# Session +Session.vim + +# Temporary +.netrwhist + +# Auto-generated tag files +tags + +# Redis dump file +dump.rdb + +### Project template +roomify/media/ + +.pytest_cache/ +.ipython/ +.env +.envs/* +!.envs/.local/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..31d2f0f --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,57 @@ +exclude: '^docs/|/migrations/' +default_stages: [commit] + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-json + - id: check-toml + - id: check-xml + - id: check-yaml + - id: debug-statements + - id: check-builtin-literals + - id: check-case-conflict + - id: check-docstring-first + - id: detect-private-key + + - repo: https://github.com/adamchainz/django-upgrade + rev: '1.14.1' + hooks: + - id: django-upgrade + args: ['--target-version', '4.2'] + + - repo: https://github.com/asottile/pyupgrade + rev: v3.11.0 + hooks: + - id: pyupgrade + args: [--py311-plus] + + - repo: https://github.com/psf/black + rev: 23.9.1 + hooks: + - id: black + + - repo: https://github.com/PyCQA/isort + rev: 5.12.0 + hooks: + - id: isort + + - repo: https://github.com/PyCQA/flake8 + rev: 6.1.0 + hooks: + - id: flake8 + + - repo: https://github.com/Riverside-Healthcare/djLint + rev: v1.32.1 + hooks: + - id: djlint-reformat-django + - id: djlint-django + +# sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date +ci: + autoupdate_schedule: weekly + skip: [] + submodules: false diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000..d5a8ef6 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,20 @@ +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: '3.11' + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/conf.py + +# Python requirements required to build your docs +python: + install: + - requirements: requirements/local.txt diff --git a/README.md b/README.md index da7faf5..9cda50a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Roomify +# roomify -reservation system via Django +django reservation system [![Built with Cookiecutter Django](https://img.shields.io/badge/built%20with-Cookiecutter%20Django-ff69b4.svg?logo=cookiecutter)](https://github.com/cookiecutter/cookiecutter-django/) [![Black code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) diff --git a/compose/production/postgres/Dockerfile b/compose/production/postgres/Dockerfile index cc17cc4..a19b143 100644 --- a/compose/production/postgres/Dockerfile +++ b/compose/production/postgres/Dockerfile @@ -1,4 +1,4 @@ -FROM postgres:11 +FROM postgres:12 COPY ./compose/production/postgres/maintenance /usr/local/bin/maintenance RUN chmod +x /usr/local/bin/maintenance/* diff --git a/compose/production/traefik/traefik.yml b/compose/production/traefik/traefik.yml index 3e5aa52..e9c923a 100644 --- a/compose/production/traefik/traefik.yml +++ b/compose/production/traefik/traefik.yml @@ -31,7 +31,7 @@ certificatesResolvers: http: routers: web-secure-router: - rule: 'Host(`roomify.moamani.ir`)' + rule: 'Host(`example.com`) || Host(`www.example.com`)' entryPoints: - web-secure middlewares: @@ -42,7 +42,7 @@ http: certResolver: letsencrypt flower-secure-router: - rule: 'Host(`roomify.moamani.ir`)' + rule: 'Host(`example.com`)' entryPoints: - flower service: flower @@ -51,7 +51,7 @@ http: certResolver: letsencrypt web-media-router: - rule: 'Host(`roomify.moamani.ir`) && PathPrefix(`/media/`)' + rule: '(Host(`example.com`) || Host(`www.example.com`)) && PathPrefix(`/media/`)' entryPoints: - web-secure middlewares: diff --git a/config/asgi.py b/config/asgi.py index db8f5b5..a6a6b1c 100644 --- a/config/asgi.py +++ b/config/asgi.py @@ -1,5 +1,5 @@ """ -ASGI config for Roomify project. +ASGI config for roomify project. It exposes the ASGI callable as a module-level variable named ``application``. diff --git a/config/settings/local.py b/config/settings/local.py index c795d49..f72f020 100644 --- a/config/settings/local.py +++ b/config/settings/local.py @@ -8,7 +8,7 @@ # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env( "DJANGO_SECRET_KEY", - default="homZe2tK8xYLdeSdP5pYbVFhrUG0eNY1WCZ5HwT5jkJwA9ljpCZ1c9ZP2lwMwyhL", + default="62TGvBMycJ2Voi8tw2dFus97iS8wDiByjsWyiNOEQ0csoKrBlVLtey9sRisCcfn7", ) # https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1"] diff --git a/config/settings/production.py b/config/settings/production.py index ceb39d3..8be005d 100644 --- a/config/settings/production.py +++ b/config/settings/production.py @@ -14,7 +14,7 @@ # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env("DJANGO_SECRET_KEY") # https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts -ALLOWED_HOSTS = env.list("DJANGO_ALLOWED_HOSTS", default=["roomify.moamani.ir"]) +ALLOWED_HOSTS = env.list("DJANGO_ALLOWED_HOSTS", default=["example.com"]) # DATABASES # ------------------------------------------------------------------------------ @@ -67,14 +67,14 @@ # https://docs.djangoproject.com/en/dev/ref/settings/#default-from-email DEFAULT_FROM_EMAIL = env( "DJANGO_DEFAULT_FROM_EMAIL", - default="Roomify ", + default="roomify ", ) # https://docs.djangoproject.com/en/dev/ref/settings/#server-email SERVER_EMAIL = env("DJANGO_SERVER_EMAIL", default=DEFAULT_FROM_EMAIL) # https://docs.djangoproject.com/en/dev/ref/settings/#email-subject-prefix EMAIL_SUBJECT_PREFIX = env( "DJANGO_EMAIL_SUBJECT_PREFIX", - default="[Roomify] ", + default="[roomify] ", ) # ADMIN diff --git a/config/settings/test.py b/config/settings/test.py index f20dbed..6e5eeb9 100644 --- a/config/settings/test.py +++ b/config/settings/test.py @@ -10,7 +10,7 @@ # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env( "DJANGO_SECRET_KEY", - default="9xRgi0CUBxOPK0INvPEheStav3j1yFQY2HWDGTiVflZakEcJH4LeT9G8a07I2Nlm", + default="W9JF281IUst4otGDyNWXBSDHjBlach2Hh7SYRXtnqbZkhcfLvFfVG1ezDgU9P8BD", ) # https://docs.djangoproject.com/en/dev/ref/settings/#test-runner TEST_RUNNER = "django.test.runner.DiscoverRunner" diff --git a/config/wsgi.py b/config/wsgi.py index 6004af8..d46c7fc 100644 --- a/config/wsgi.py +++ b/config/wsgi.py @@ -1,5 +1,5 @@ """ -WSGI config for Roomify project. +WSGI config for roomify project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable diff --git a/docs/conf.py b/docs/conf.py index 3151e2c..713a265 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -27,7 +27,7 @@ # -- Project information ----------------------------------------------------- -project = "Roomify" +project = "roomify" copyright = """2023, Mohammadreza Amani""" author = "Mohammadreza Amani" diff --git a/docs/index.rst b/docs/index.rst index 06922e8..f0c15af 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,9 +1,9 @@ -.. Roomify documentation master file, created by +.. roomify documentation master file, created by sphinx-quickstart. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to Roomify's documentation! +Welcome to roomify's documentation! ====================================================================== .. toctree:: diff --git a/locale/en_US/LC_MESSAGES/django.po b/locale/en_US/LC_MESSAGES/django.po index 464224a..2986332 100644 --- a/locale/en_US/LC_MESSAGES/django.po +++ b/locale/en_US/LC_MESSAGES/django.po @@ -1,11 +1,11 @@ -# Translations for the Roomify project +# Translations for the roomify project # Copyright (C) 2023 Mohammadreza Amani # Mohammadreza Amani , 2023. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: 0.2.23\n" +"Project-Id-Version: 0.2.33\n" "Language: en-US\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/locale/fr_FR/LC_MESSAGES/django.po b/locale/fr_FR/LC_MESSAGES/django.po index 42b2581..db1bbe0 100644 --- a/locale/fr_FR/LC_MESSAGES/django.po +++ b/locale/fr_FR/LC_MESSAGES/django.po @@ -1,11 +1,11 @@ -# Translations for the Roomify project +# Translations for the roomify project # Copyright (C) 2023 Mohammadreza Amani # Mohammadreza Amani , 2023. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: 0.2.23\n" +"Project-Id-Version: 0.2.33\n" "Language: fr-FR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/locale/pt_BR/LC_MESSAGES/django.po b/locale/pt_BR/LC_MESSAGES/django.po index a73c4cd..3011a5a 100644 --- a/locale/pt_BR/LC_MESSAGES/django.po +++ b/locale/pt_BR/LC_MESSAGES/django.po @@ -1,11 +1,11 @@ -# Translations for the Roomify project +# Translations for the roomify project # Copyright (C) 2023 Mohammadreza Amani # Mohammadreza Amani , 2023. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: 0.2.23\n" +"Project-Id-Version: 0.2.33\n" "Language: pt-BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/roomify/__init__.py b/roomify/__init__.py index 16d9fbe..8744fab 100644 --- a/roomify/__init__.py +++ b/roomify/__init__.py @@ -1,2 +1,2 @@ -__version__ = "0.2.23" +__version__ = "0.2.33" __version_info__ = tuple(int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".")) diff --git a/roomify/contrib/sites/migrations/0001_initial.py b/roomify/contrib/sites/migrations/0001_initial.py new file mode 100644 index 0000000..304cd6d --- /dev/null +++ b/roomify/contrib/sites/migrations/0001_initial.py @@ -0,0 +1,42 @@ +import django.contrib.sites.models +from django.contrib.sites.models import _simple_domain_name_validator +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [] + + operations = [ + migrations.CreateModel( + name="Site", + fields=[ + ( + "id", + models.AutoField( + verbose_name="ID", + serialize=False, + auto_created=True, + primary_key=True, + ), + ), + ( + "domain", + models.CharField( + max_length=100, + verbose_name="domain name", + validators=[_simple_domain_name_validator], + ), + ), + ("name", models.CharField(max_length=50, verbose_name="display name")), + ], + options={ + "ordering": ("domain",), + "db_table": "django_site", + "verbose_name": "site", + "verbose_name_plural": "sites", + }, + bases=(models.Model,), + managers=[("objects", django.contrib.sites.models.SiteManager())], + ) + ] diff --git a/roomify/contrib/sites/migrations/0003_set_site_domain_and_name.py b/roomify/contrib/sites/migrations/0003_set_site_domain_and_name.py index c12de99..1d6da20 100644 --- a/roomify/contrib/sites/migrations/0003_set_site_domain_and_name.py +++ b/roomify/contrib/sites/migrations/0003_set_site_domain_and_name.py @@ -40,8 +40,8 @@ def update_site_forward(apps, schema_editor): _update_or_create_site_with_sequence( Site, schema_editor.connection, - "roomify.moamani.ir", - "Roomify", + "example.com", + "roomify", ) diff --git a/roomify/templates/base.html b/roomify/templates/base.html index 90025ef..b49e193 100644 --- a/roomify/templates/base.html +++ b/roomify/templates/base.html @@ -7,12 +7,12 @@ {% block title %} - Roomify + roomify {% endblock title %} + content="django reservation system" /> @@ -67,7 +67,7 @@ aria-label="Toggle navigation"> - Roomify + roomify