A community where more user-friendly coding tutorials can be made
[ririro93]
- try django-allauth
- keep to git commit conventions
- get used to CBV
- try Typescript
- study datetime objects, timezones(naive)
[sean]
- get used to git, django
- research github api
-
front-end
- navbar
- django messages
- signup page
- add interests tags
- login page
- form validation -> use bootstrap? or django.contrib.auth.authenticate?
- consider github as the only main socials login
- reset password page
- logout page
- profile page
- Items
- gihub.io link
- bio
- interests
- followers / following
- Research other services
- Items
- home page
- feeds
- repo view
- basic view
- file view
- commenting section
- comments for every file
- pressing comment can highlights specific section
- sticky-top not working
- 1 min ago facebook like timestamp
- contents section
- markdown is highlighted like a python file for some reason
- html tags are shown like processed markdown file -> fixed
- getting updated files takes too long
- explorer
- tree view
- fold all feature
- independent scrollbar
- does not work when Korean chars in id (when directory) -> ex). assets-postunderscoreimages-2021-01-27-객체의 크기와 가비지컬렉터 -> because html elements cannot have Korean chars in their id
- commenting section
-
back-end
- get repo data from github API
- socials login using allauth
- github
- facebook
- app needs to be approved beforehand
- if user tries to sign in using a username that already exists on Github -> ask if same person
- yes -> would you like to sign in using your github account?
- no -> please choose a different username.
- logout redirect to previous page
- show logged out message
- using github API's search might be better than using PyGithub get_user() and get_repo() methods -[x] this feature existed on PyGithub too.. -> update using this
-
db
- migrate to postgres
- button on RepoDetailView page to update db
-
features
- follow other people
- when mutually following -> relation : friend (is this needed for github?)
- show repos in a friendlier way
- comments + likes
- threads -> main comment on the side
- suggestions -> repos with similar projects, languages
- repo : auto-tag difficulty
- repo : different visuals according to # of commits
- repo : see all liked repos all organized in one page
- feeds : when new repo created
- starter guide for ppl new to programming
- make guide interactive (embedded live code editors & terminals)
- comments section that moves around
-
etc
- add license
[ririro93]
Tasks
- started working on login page
- implemented google login (1) with icons (2)
Problems
- logout redirect does not take user back to login page
- intended : redirect to
accounts/login
- instead redirects to
accounts/logout/accounts/login
- ->
fixed by using {% url 'login' %} and likewise
- intended : redirect to
- navbar doesn't work correctly when not starting from root url
-
also fixed by using {% url 'login' %} and likewise
-
- login with google makes username ririro931 instead of ririro93 because it already exists
- let new username be ririro93@gmail.com instead
- logout also doesn't logout from google
- next login attempt just lets you go right through
- django message 'successfully signed in' stays forever
[ririro93]
Tasks
- accounts
- implement github, twitter login
- signup_page
- gitAPI
- recieve repo data according to requested username
[ririro93]
Tasks
- gitAPI
- create models for users and repos
- added view for Creating and Updating these models
- entering an Github username in the navbar input activates the Creating and Updating
Learned
- there might be an easier way but for now I can get a list of all field names of a model by using
list(map(lambda x: x.name, <ModelName>._meta.fields))
Problem
- repos with same names from different Github users
- inputting same username twice should only update the datetime fields of the GithubRepo model
[ririro93]
Learned
- (3) adding ImageField to a model requires the following
- adding MEDIA_URL, MEDIA_ROOT to settings
- adding
static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
to urlpatterns - calling image via url
src="{{ user.gitinuser.profile_img.url }}"
[ririro93]
Problem
- [x]: GET request to github's API for commits only gives 30 recent commits -> find way to get all commits -> used Pygithub
- [x]: found out that there is a 5000 API request limit per hour per ip address -> adding all 30 most recent commits per repo maybe too costly -> 5000 was enough was only using 60 because of no authentication -> used access token to raise limit
[ririro]
Learned
- [CSS] use
white-space: nowrap
withoverflow-x: scroll
to get horizontal scrollbar
[ririro]
Learned
- [django] Customizing Allauth(5)
(1) medium post : google login
(2) iconfinder : sns icons
(3) ImageField : profile image
(4) dev.to
(5) medium