diff --git a/.gitignore b/.gitignore index f3d94a7..f6b75cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,139 @@ -/myenv \ No newline at end of file +# Django # +*.log +*.pot +*.pyc +__pycache__ +db.sqlite3 +media + +# Backup files # +*.bak + +# If you are using PyCharm # +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# File-based project format +*.iws + +# IntelliJ +out/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Python # +*.py[cod] +*$py.class + +# Distribution / packaging +.Python build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.whl +*.egg-info/ +.installed.cfg +*.egg +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +.pytest_cache/ +nosetests.xml +coverage.xml +*.cover +.hypothesis/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery +celerybeat-schedule.* + +# SageMath parsed files +*.sage.py + +# Environments +/myenv +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ + +# Sublime Text # +*.tmlanguage.cache +*.tmPreferences.cache +*.stTheme.cache +*.sublime-workspace +*.sublime-project + +# sftp configuration file +sftp-config.json + +# Package control specific files Package +Control.last-run +Control.ca-list +Control.ca-bundle +Control.system-ca-bundle +GitHub.sublime-settings + +# Visual Studio Code # +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history \ No newline at end of file diff --git a/accounts/validators.py b/accounts/validators.py index ac6a560..0e699e8 100644 --- a/accounts/validators.py +++ b/accounts/validators.py @@ -1,6 +1,7 @@ from django.core.validators import EmailValidator from django.utils.deconstruct import deconstructible +# Function to validate only nyu.edu email addresses for sign up @deconstructible class NyuEmailValidator(EmailValidator): def validate_domain_part(self, domain_part): diff --git a/db.sqlite3 b/db.sqlite3 index eb55f86..4e7aa5c 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/readme.md b/readme.md index d37417e..149e955 100644 --- a/readme.md +++ b/readme.md @@ -37,4 +37,4 @@ python deactivate # Update the requirements.txt if new packages are installed -pip freeze > requirements.txt \ No newline at end of file +pip freeze > requirements.txt diff --git a/requirements.txt b/requirements.txt index be8d8e2..5d8ef15 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,8 @@ asgiref==3.8.1 -Django==5.1.2 +beautifulsoup4==4.12.3 +Django==4.2.16 +django-bootstrap-v5==1.0.11 +pytz==2024.2 +soupsieve==2.6 sqlparse==0.5.1 typing_extensions==4.12.2 diff --git a/routepals/settings.py b/routepals/settings.py index 8295df1..21773e3 100644 --- a/routepals/settings.py +++ b/routepals/settings.py @@ -25,7 +25,7 @@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = ["RoutePals-dev.us-east-1.elasticbeanstalk.com"] +ALLOWED_HOSTS = ["RoutePals-dev.us-east-1.elasticbeanstalk.com", "127.0.0.1"] # Application definition @@ -38,6 +38,7 @@ 'django.contrib.messages', 'django.contrib.staticfiles', 'accounts', + 'bootstrap5', ] MIDDLEWARE = [ @@ -114,7 +115,7 @@ # Static files (CSS, JavaScript, Images) -STATIC_URL = 'static/' +STATIC_URL = '/static/' STATIC_ROOT = 'static' # Default primary key field type diff --git a/routepals/views.py b/routepals/views.py new file mode 100644 index 0000000..0a9d063 --- /dev/null +++ b/routepals/views.py @@ -0,0 +1,4 @@ +from django.shortcuts import render_to_response + +def index( request ): + return render_to_response('base.html') \ No newline at end of file diff --git a/static/assets/img/routepalslogo.jpg b/static/assets/img/routepalslogo.jpg new file mode 100644 index 0000000..b265e97 Binary files /dev/null and b/static/assets/img/routepalslogo.jpg differ diff --git a/templates/base.html b/templates/base.html index 4575d3a..866ba32 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,15 +1,40 @@ - - + - - {% block title %}Route Pals{% endblock %} + {% load static %} + + RoutePals - {% block title %}{% endblock %} + {% load bootstrap5 %} + {% bootstrap_css %} + - -
- {% block content %} - {% endblock %} -
+
+ + +
+ {% block content %} + {% endblock %} +
+
+ {% bootstrap_javascript %} - \ No newline at end of file + diff --git a/templates/home.html b/templates/home.html index 0a681e7..6f7a7c6 100644 --- a/templates/home.html +++ b/templates/home.html @@ -4,16 +4,11 @@ {% block content %} {% if user.is_authenticated %} -Hi {{ user.username }}! Welcome to Route Pals. -

Password Change

-
- {% csrf_token %} - -
+

Hi {{ user.username }}! Welcome to Route Pals.

+

Password Change

{% else %} -

You are not logged in

-

Sign Up

-

Password Reset

-Log In +

Welcome to Route Pals.

+

Sign Up

+Log In {% endif %} {% endblock %} \ No newline at end of file diff --git a/templates/registration/login.html b/templates/registration/login.html index 4bbe6a5..9879920 100644 --- a/templates/registration/login.html +++ b/templates/registration/login.html @@ -1,13 +1,49 @@ {% extends "base.html" %} +{% load static %} {% block title %}Login{% endblock %} {% block content %} -

Log In

- -
- {% csrf_token %} - {{ form }} - -
-{% endblock %} \ No newline at end of file + +
+
+
+
+ Sample Image +
+
+
+ {% csrf_token %} + + + +
+ + {{ form.username }} +
+ + +
+ + {{ form.password }} +
+ + + +
+ +

Don't have an account? Register

+
+ +
+
+
+
+
+ +{% endblock %} diff --git a/templates/registration/signup.html b/templates/registration/signup.html index a301346..748f1e6 100644 --- a/templates/registration/signup.html +++ b/templates/registration/signup.html @@ -3,11 +3,25 @@ {% block title %}Sign Up{% endblock %} {% block content %} -

Sign Up

-

Only NYU students can use Route Pals. Please sign up using your NYU email.

-
- {% csrf_token %} - {{ form.as_p }} - -
+ +
+
+
+
+ Sample Image +
+
+
Only NYU students can use Route Pals. Please sign up using your NYU email.
+
+
+ {% csrf_token %} + {{ form.as_p }} + +
+
+
+
+
{% endblock %}