Skip to content
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

Feedback #1

Open
wants to merge 29 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
9780593
Setting up GitHub Classroom Feedback
github-classroom[bot] Sep 13, 2022
8dd0b02
initial commit
Tomtuhtomtom Sep 13, 2022
473550e
heroku deployed, initial skeleton I believe is done, ready to start b…
Tomtuhtomtom Sep 13, 2022
bc4fba2
added AUTH_USERS to settings
Tomtuhtomtom Sep 13, 2022
302d4a1
fixed migration error, no other changes
Tomtuhtomtom Sep 13, 2022
b1bd57c
models built and registered
Tomtuhtomtom Sep 13, 2022
160a111
installed restframework and pygments
Tomtuhtomtom Sep 13, 2022
aa99703
errors pushing to heroku pertaining to static files appear to be fixed
Tomtuhtomtom Sep 14, 2022
a068226
removed registration for now, don't believe it will be needed
Tomtuhtomtom Sep 14, 2022
692c758
added views/urls/serializers for book, track and note
Tomtuhtomtom Sep 14, 2022
b8a793c
fixed typo
Tomtuhtomtom Sep 14, 2022
9f859a5
added possible list of genres, login for users on admin page, started…
Tomtuhtomtom Sep 14, 2022
f638f70
started building permissions, edit and delete permissions working, ne…
Tomtuhtomtom Sep 15, 2022
667cf8b
changed track and note apiview to show words instead of numbers
Tomtuhtomtom Sep 15, 2022
4b4b5fc
have create track in book detail and list all tracks by user
Tomtuhtomtom Sep 15, 2022
219555b
got tracks to show without crashing, need to do same for notes
Tomtuhtomtom Sep 16, 2022
baf5576
added list and detail views for notes based on users and books
Tomtuhtomtom Sep 16, 2022
0f0c632
changed related names in models and migrated
Tomtuhtomtom Sep 16, 2022
1cd1f34
added hyperlinks to serializers
Tomtuhtomtom Sep 16, 2022
5235496
filtered notes by private
Tomtuhtomtom Sep 17, 2022
a33ebc0
Constraints for author and title working
Tomtuhtomtom Sep 17, 2022
aa8512a
added search fields to books
Tomtuhtomtom Sep 17, 2022
49f489f
sorted user list of tracks by status
Tomtuhtomtom Sep 17, 2022
605f2b8
added permissions back in
Tomtuhtomtom Sep 17, 2022
b2b4b7e
deleted my markdown file for storing test code
Tomtuhtomtom Sep 17, 2022
1dec0a7
created constraint for users making a status for same book
Tomtuhtomtom Sep 18, 2022
a7ce295
installed django-filters and applied filters to tracks and notes in u…
Tomtuhtomtom Sep 18, 2022
106af16
added gitignore file
Tomtuhtomtom Oct 9, 2022
492f0a3
removes .env file
Tomtuhtomtom Oct 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 129 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# 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/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
22 changes: 22 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
django = "*"
psycopg2-binary = "*"
django-environ = "*"
django-on-heroku = "*"
gunicorn = "*"
django-registration-redux = "*"
django-extensions = "*"
django-debug-toolbar = "*"
djangorestframework = "*"
pygments = "*"
django-filter = "*"

[dev-packages]

[requires]
python_version = "3.10"
209 changes: 209 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
web: gunicorn config.wsgi
release: python manage.py migrate
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,25 @@

Create a new API-only application that lets users keep track of books, including important information like title, author, publication date, a genre, and a field that marks it as "featured". Books should be unique by title and author (that is, you can't have two books with the same title _and_ author; two books with the same title is fine as long as the authors are different).

1. users track books
2. book has title, author, publication date, genre, featured
3. constraint for book by title and author(title can be same if author is different)

Users should be able to search for a book by title or author.

1. sort book by title or author

Anyone can add a new book as long as the same book is not already in the library. Only admin users can update book details (like whether it is "featured") and delete books.

1. users can create a book if not already in library
2. admin can update book details(featured) and delete books

You'll also need a book tracking model so that users can mark a book as "want to read", "reading", or "read/done"; this status can also be updated. The tracking model should have a foreign key to a book and to a user.
1. tracking model has status and foreign keys to books and to users

Optionally users can take notes on books. These notes have a foreign key relationship with a book and a user, a datetime they are created, a note body, a boolean field marking it as public or private, and an optional page number. Private notes are viewable only by the author. When notes are retrieved, return them by creation time in reverse order.
1. Users make notes on books - created time, public/private setting, page number optional
2. Retreive by reverse date

Users should be able to see a list of all the books they are tracking, or a list by status (for instance, all their "want to read" books). You _could_ consider using [DjangoFilterBackend](https://www.django-rest-framework.org/api-guide/filtering/#djangofilterbackend) for this.

Expand Down
Empty file added config/__init__.py
Empty file.
Binary file added config/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file added config/__pycache__/settings.cpython-310.pyc
Binary file not shown.
Binary file added config/__pycache__/urls.cpython-310.pyc
Binary file not shown.
Loading