A Django-based desk reservation and floor/room management application. DeskManager provides models and a UI to manage floors, rooms, desks, and weekly desk booking schedules.
- Space Management: Manage Floors (
FloorData), Rooms (RoomData), and Desks (DeskData). - Scheduling: Weekly booking schedule (
BookSchedule) with validation. - Styling: Integrated Tailwind CSS.
- Security: Basic landing view guarded by authentication.
- Backend: Python (Django)
- Database: MySQL (using
mysqlclient) - Frontend: JavaScript, HTML, CSS (Tailwind via
django-tailwind)
deskmanager_app/— Main Django project folderdeskmanager/— Project settings, WSGI/ASGIcore/— Core app (landing page, app config)desks/— Models for office space and schedulingtheme/— Tailwind/static source filesmanage.py— Django CLI entrypoint
requirements.txt— Python dependencies
- Python 3.12+
- MySQL Database
- Node.js & npm (Only required if you need to rebuild Tailwind assets)
- Virtual Environment tool (venv, poetry, etc.)
-
Clone the repository
git clone https://github.com/maciula2/deskmanager.git cd deskmanager -
Set up Virtual Environment
# Windows python -m venv .venv .venv\Scripts\activate # macOS / Linux python3 -m venv .venv source .venv/bin/activate
-
Install Dependencies
py -m pip install -r requirements.txt
-
Database Setup Create a MySQL database named
deskmanagerand ensure you have a user with privileges. -
Environment Configuration Create a
.envfile in thedeskmanager_appfolder with the following keys:SECRET_KEY=your_secret_key DEBUG=True MYSQL_DB_NAME=deskmanager MYSQL_USER=your_db_user MYSQL_PASSWORD=your_db_password EMAIL_HOST_USER=your_email_user EMAIL_HOST_PASSWORD=your_email_password
-
Initialize Application
py -m deskmanager_app/manage.py makemigrations py -m deskmanager_app/manage.py migrate py -m deskmanager_app/manage.py createsuperuser
-
Tailwind (Optional) If you need to build the CSS:
py -m deskmanager_app/manage.py tailwind install py -m deskmanager_app/manage.py tailwind build
-
Django Settings: Located in
deskmanager_app/deskmanager/settings.py. -
Database: Configure via the
.envfile referenced above. -
Static Files: Tailwind source is located at
deskmanager_app/theme/static_src/.
To deploy on Windows using Apache and mod_wsgi, configure your httpd.conf and httpd-vhosts.conf files as shown below.
Add the following to load the Python DLL and the WSGI module.
# Load Python DLL
LoadFile "/path/to/python(version).dll"
# Load mod_wsgi module
# Ensure the path points to the mod_wsgi.pyd inside your virtual environment
LoadModule wsgi_module "/path/to/wsgi/module"
Configure the virtual host to serve static files and the WSGI application.
<VirtualHost *:80>
# 1. Static Files Configuration
Alias /theme/static/ "(global_path)/deskmanager/deskmanager/deskmanager_app/staticfiles/"
<Directory "(global_path)/deskmanager/deskmanager/deskmanager_app/staticfiles">
Require all granted
</Directory>
# 2. WSGI Directory Configuration
<Directory "(global_path)/deskmanager/deskmanager/deskmanager_app/deskmanager">
<Files wsgi.py>
Require all granted
</Files>
</Directory>
# 3. Script Alias
WSGIScriptAlias / "(global_path)/deskmanager/deskmanager/deskmanager_app/deskmanager/wsgi.py"
# 4. Logs
ErrorLog "logs/deskmanager-error.log"
CustomLog "logs/deskmanager-access.log" common
</VirtualHost>Before restarting Apache, collect static files to the folder specified in the configuration:
py -m deskmanager_app/manage.py collectstatic
-
Run Tests:
py -m deskmanager_app/manage.py test
-
Update Models:
py -m deskmanager_app/manage.py makemigrations py -m deskmanager_app/manage.py migrate
-
Fork the repository.
-
Run linters/tests before submitting.
-
Ensure migrations are included for model changes.
-
Open a Pull Request.
DeskManager is licensed under the Apache-2.0 license.