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

Model1 #93

Merged
merged 11 commits into from
May 11, 2022
Merged

Model1 #93

merged 11 commits into from
May 11, 2022

Conversation

BElifb
Copy link
Contributor

@BElifb BElifb commented May 10, 2022

  • Updated requirements
  • Added gitignore to the outer directory to match the main, think we should update main and merge to dev.
  • Redirected homapage to api/

@BElifb BElifb requested a review from KarahanS May 10, 2022 22:16
@KarahanS
Copy link
Contributor

KarahanS commented May 11, 2022

  • Reviewed the models.py. I'll be adding following fields to the models:
    • Tag: datecreated, dateupdate (We didn't add them to the ER diagram during our meeting, I added them later so that each entity has these fields)
    • ArtItem: datecreated, dateupdate
    • User: datecreated, dateupdate
  • I have created new migrations and applied them. To reference later, let me document my steps:
    • First, edited models.py file to include missing fields.
    • Then, run the command python manage.py makemigrations. It gave me an error stating that entities that were already in the database don't have default values for new fields. Solved the problem by following these steps.
    • It created a file within the migrations folders named as "0002_comment_created_at_comment_updated_at_and_more"
    • Run the command python manage.py sqlmigrate api 0002.
    • Lastly, run the command python manage.py migrate to change the database. db.sqlite3 had some changes.
  • Created another superuser named as superuser to test the admin/ panel.
  • Removed the changes in views.py of "django_app" folder. Replaced path('', views.index, name = "index") with path('', include('api.urls')) and modified the comments in the urls.py. This does exactly what you do, but there is no need to use views.py within the "django_app" folder. Currently we have these urls:
    • http://127.0.0.1:8000 = homepage (named as "index")
    • http://127.0.0.1:8000/about = about section (dummy url)
    • http://127.0.0.1:8000/api_home = dummy api url that returns a meaningless JSON response
    • http://127.0.0.1:8000/admin = Built-in admin page
  • Designed User model with commit 39e1286.
  • Designed serializers for User and Comment with commit a2ddb67. I'll be working on serializers after merging.

@KarahanS KarahanS closed this May 11, 2022
@KarahanS KarahanS reopened this May 11, 2022
@KarahanS KarahanS merged commit c0cfc27 into dev May 11, 2022
@KarahanS KarahanS deleted the model1 branch May 11, 2022 10:25
@KarahanS
Copy link
Contributor

After merging I've deleted model1 branch in the remote repository (here in this repo).
In order to delete it from local, you can follow these steps:
i) Delete the local branch using git branch -d model1. After this step, if you see that remotes/origin/model1 still exists, then do the following.
ii) Delete the remote branch that doesn't have any correspondence in remote repository: git fetch --prune

@KarahanS KarahanS added the Approved This work is reviewed and approved by a team member label May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved This work is reviewed and approved by a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants