Skip to content

Commit

Permalink
Mega update lol
Browse files Browse the repository at this point in the history
  • Loading branch information
nishi7409 committed Dec 27, 2020
1 parent aa8f1d2 commit a57aba2
Show file tree
Hide file tree
Showing 22 changed files with 23,965 additions and 218 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
venv/
venv/
.env
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"git.ignoreLimitWarning": true
{
"git.ignoreLimitWarning": true
}
46 changes: 23 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# CourseCal
Automate the process of transferring your semester's calendar from your university's end to your personal calendar (google calendar/outlook calendar/etc)

# Virtual Environment
- `python3 -m venv venv`
- `source venv/bin/activate`
To deactivate, simply enter `deactivate`

# Dependencies
- `python3 -m pip install -r requirements.txt` then lock the requirements
- `pip freeze > requirements.txt`

# Starting the server & stuff
- `cd web_app`
- `python3 manage.py runserver`

Since we're working with a MongoDB, we don't have to worry about migrations :smiley:

# Next?
- Work on the project
- Setup Docker shit for professionalism (lol) & for ease of deployment
- Work on RPI's automation
- Integrate a ReCaptcha solver (I bet some universities have implemented Google ReCaptcha or something similar)
# CourseCal
Automate the process of transferring your semester's calendar from your university's end to your personal calendar (google calendar/outlook calendar/etc)

# Virtual Environment
- `python3 -m venv venv`
- `source venv/bin/activate`
To deactivate, simply enter `deactivate`

# Dependencies
- `python3 -m pip install -r requirements.txt` then lock the requirements *(you may need to run `wget https://bootstrap.pypa.io/get-pip.py` then `sudo python3.6 get-pip.py`)*
- `pip freeze > requirements.txt`

# Starting the server & stuff
- `cd web_app`
- `python3 manage.py runserver`

Since we're working with a MongoDB, we don't have to worry about migrations :smiley:

# Next?
- Work on the project
- Setup Docker shit for professionalism (lol) & for ease of deployment
- Work on RPI's automation
- Integrate a ReCaptcha solver (I bet some universities have implemented Google ReCaptcha or something similar)
-- maybe make our own ReCaptcha solver (that'd be an insane side project)
23,704 changes: 23,704 additions & 0 deletions get-pip.py

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Django==2.2.13
git+https://github.com/django-nonrel/mongodb-engine
git+https://github.com/django-nonrel/djangotoolbox
git+https://github.com/django-nonrel/[email protected]
python-dotenv
# Django==2.2.13
git+https://github.com/django-nonrel/mongodb-engine
git+https://github.com/django-nonrel/djangotoolbox
git+https://github.com/django-nonrel/[email protected]
python-dotenv
django-mongodb-engine-py3
Binary file added web_app/app/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file added web_app/app/__pycache__/admin.cpython-36.pyc
Binary file not shown.
Binary file added web_app/app/__pycache__/models.cpython-36.pyc
Binary file not shown.
44 changes: 44 additions & 0 deletions web_app/app/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Generated by Django 2.2.13 on 2020-12-27 10:46

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

initial = True

dependencies = [
]

operations = [
migrations.CreateModel(
name='University',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200)),
('address', models.CharField(max_length=500)),
('phone_num', models.IntegerField(default='-1')),
('domain', models.CharField(max_length=20)),
],
),
migrations.CreateModel(
name='URLCalendar',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('calendar', models.CharField(max_length=200)),
],
),
migrations.CreateModel(
name='Student',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('username', models.CharField(max_length=10)),
('email', models.CharField(max_length=100)),
('first_name', models.CharField(max_length=100)),
('last_name', models.CharField(max_length=100)),
('phone_num', models.IntegerField()),
('calendar_link', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.URLCalendar')),
],
),
]
Binary file not shown.
Binary file not shown.
8 changes: 4 additions & 4 deletions web_app/app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
class University(models.Model):
name = models.CharField(max_length=200, null=False, blank=False)
address = models.CharField(max_length=500, null=False, blank=False)
phone_num = models.IntegerField(max_length=10 null=False, blank=False, default="-1")
phone_num = models.IntegerField(null=False, blank=False, default="-1")
domain = models.CharField(max_length=20, null=False, blank=False)

class Student(models.Model):
username = models.CharField(max_length=10, null=False, blank=False)
email = models.CharField(max_length=100, null=False, blank=False)
first_name = models.CharField(max_length=100, null=False, blank=False)
last_name = models.CharField(max_length=100, null=False, blank=False)
phone_num = models.IntegerField(max_length=10 null=False, blank=False)
calendar_link = models.ForeignKey(URLCalendar, on_delete=models.CASCADE)
phone_num = models.IntegerField(null=False, blank=False)
calendar_link = models.ForeignKey("URLCalendar", on_delete=models.CASCADE)

class URLCalendar(models.Model):
calendar = models.CharField(null=False, blank=False)
calendar = models.CharField(max_length=200, null=False, blank=False)
42 changes: 21 additions & 21 deletions web_app/manage.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys


def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'web_app.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)


if __name__ == '__main__':
main()
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys


def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'web_app.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exec
execute_from_command_line(sys.argv)


if __name__ == '__main__':
main()
Binary file added web_app/mydatabase
Binary file not shown.
Binary file added web_app/web_app/__init__.pyc
Binary file not shown.
Binary file modified web_app/web_app/__pycache__/settings.cpython-36.pyc
Binary file not shown.
Binary file added web_app/web_app/__pycache__/urls.cpython-36.pyc
Binary file not shown.
Binary file added web_app/web_app/__pycache__/wsgi.cpython-36.pyc
Binary file not shown.
Loading

0 comments on commit a57aba2

Please sign in to comment.