-
Notifications
You must be signed in to change notification settings - Fork 0
Properties (#7) #8
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend | ||
| EMAIL_HOST=127.0.0.1 | ||
| EMAIL_PORT=1025 # Mailpit default SMTP port | ||
| EMAIL_USE_TLS=False | ||
| [email protected] |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,2 +1,42 @@ | ||||||||||||||||||
| # MyRealEstate | ||||||||||||||||||
| A property management application | ||||||||||||||||||
|
|
||||||||||||||||||
| ## Setup and Installation | ||||||||||||||||||
|
|
||||||||||||||||||
| ### Prerequisites | ||||||||||||||||||
| - Python 3.8+ | ||||||||||||||||||
| - Node.js and npm | ||||||||||||||||||
| - Docker (for MinIO) | ||||||||||||||||||
|
|
||||||||||||||||||
| ### Initial Setup | ||||||||||||||||||
|
|
||||||||||||||||||
| 1. Create and activate virtual environment: | ||||||||||||||||||
| ``` | ||||||||||||||||||
| python | ||||||||||||||||||
| python -m venv venv | ||||||||||||||||||
| source venv/bin/activate # On Windows: venv\Scripts\activate | ||||||||||||||||||
| ``` | ||||||||||||||||||
|
|
||||||||||||||||||
| 1. Install dependencies: | ||||||||||||||||||
| ``` | ||||||||||||||||||
| pip install -r requirements.txt | ||||||||||||||||||
| ``` | ||||||||||||||||||
|
|
||||||||||||||||||
| 1. Configure environment variables: | ||||||||||||||||||
| ``` | ||||||||||||||||||
|
Comment on lines
+25
to
+26
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Consider referencing the .env.example file in the environment setup section Since there's a .env.example file in the repository, it would be helpful to instruct users to copy it to .env as part of the setup process
Suggested change
|
||||||||||||||||||
| # No variables needed for now | ||||||||||||||||||
| ``` | ||||||||||||||||||
|
|
||||||||||||||||||
| 1. Run database migrations: | ||||||||||||||||||
| ``` | ||||||||||||||||||
| python manage.py migrate | ||||||||||||||||||
| ``` | ||||||||||||||||||
| ### Tailwind CSS Setup | ||||||||||||||||||
|
|
||||||||||||||||||
| 1. Install Tailwind dependencies: | ||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue: The command for installing Tailwind dependencies is missing Please add the specific command needed to install the Tailwind dependencies |
||||||||||||||||||
|
|
||||||||||||||||||
| 1. Run the development server: | ||||||||||||||||||
| ``` | ||||||||||||||||||
| python manage.py runserver | ||||||||||||||||||
| ``` | ||||||||||||||||||
|
|
||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Generated by Django 5.1.3 on 2024-12-07 14:47 | ||
|
|
||
| import uuid | ||
| from django.db import migrations, models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('accounts', '0002_usercompanyaccess_user_companies'), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AddField( | ||
| model_name='user', | ||
| name='email_verification_token', | ||
| field=models.UUIDField(default=uuid.uuid4, null=True), | ||
| ), | ||
| migrations.AddField( | ||
| model_name='user', | ||
| name='email_verified', | ||
| field=models.BooleanField(default=False), | ||
| ), | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Generated by Django 5.1.3 on 2024-12-07 14:52 | ||
|
|
||
| import uuid | ||
| from django.db import migrations | ||
|
|
||
|
|
||
| def gen_uuid(apps, schema_editor): | ||
| User = apps.get_model("accounts", "User") | ||
| for row in User.objects.all(): | ||
| row.email_verification_token = uuid.uuid4() | ||
| row.save(update_fields=["email_verification_token"]) | ||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('accounts', '0003_user_email_verification_token_user_email_verified'), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.RunPython(gen_uuid, migrations.RunPython.noop), | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Generated by Django 5.1.3 on 2024-12-07 14:52 | ||
|
|
||
| import uuid | ||
| from django.db import migrations, models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('accounts', '0004_populate_uuid_fields'), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AlterField( | ||
| model_name='user', | ||
| name='email_verification_token', | ||
| field=models.UUIDField(default=uuid.uuid4, unique=True), | ||
| ), | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,9 @@ | |
| """ | ||
|
|
||
| from pathlib import Path | ||
| import django.core.mail | ||
| import os | ||
|
|
||
|
|
||
| # Build paths inside the project like this: BASE_DIR / 'subdir'. | ||
| BASE_DIR = Path(__file__).resolve().parent.parent.parent | ||
|
|
@@ -198,5 +201,11 @@ | |
|
|
||
| MEDIA_URL = f'http://{MINIO_ENDPOINT}/{MINIO_BUCKET_NAME}/' | ||
| MEDIA_ROOT = '' # MEDIA_ROOT is not used when using cloud storage | ||
| DEFAULT_FILE_STORAGE = 'myrealestate.common.storage.CustomS3Boto3Storage' | ||
|
|
||
| EMAIL_BACKEND= os.getenv('EMAIL_BACKEND', 'django.core.mail.backends.smtp.EmailBackend') | ||
| EMAIL_HOST= os.getenv('EMAIL_HOST', '127.0.0.1') | ||
| EMAIL_PORT= os.getenv('EMAIL_PORT', 1025) # Mailpit default SMTP port | ||
| EMAIL_USE_TLS= os.getenv('EMAIL_USE_TLS', False) | ||
| DEFAULT_FROM_EMAIL= os.getenv('DEFAULT_FROM_EMAIL', '[email protected]') | ||
|
|
||
| DEFAULT_FILE_STORAGE = 'myrealestate.common.storage.CustomS3Boto3Storage' | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Remove this superfluous line as it serves no purpose in the instructions
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate