-
Notifications
You must be signed in to change notification settings - Fork 12
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
chore(code_share): #59
base: development
Are you sure you want to change the base?
Conversation
aniketmaithani
commented
Sep 28, 2017
- project structure changes
- TODO : remove Hardcoded Values
- Code Cleanup
- project structure changes - TODO : remove Hardcoded Values - Code Cleanup
@sourabhtk37 review me please. :) If this makes sense to you we can go ahead and go ahead with the current structure. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few changes required. Also some hosting sites like heroku requires you to have requirements.txt
file to made available in root dir.
@@ -26,7 +26,7 @@ def home(request): | |||
""" | |||
|
|||
if request.method == 'GET': | |||
return render(request, 'app_code_share/homepage.html', {}) | |||
return render(request, 'homepage.html', {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to have app_code_share/<template_name>
format I suppose since we are having folder structure as templates/<app_name>/<template_name>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so technically code_share is your main app_name_folder/templates :) and the rest of the things such as wsgi etc. remains outside hence I have kept it to this. Also I have made changes in settings.settings
in STATIC_DIRS part to accomodate the change I've done :)
It would be good to have all static files in one place :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your take on this one? @sourabhtk37
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the changes you made are good, global template file with sub folders and configuration related files in root dir and all.
What I requested to be changed is this:
'DIRS': ['code_share/templates/app_code_share', 'code_share/templates/error', ],
If we changed to having 'code_share/templates/'
only, then writing in views something like return render(request, 'homepage.html', {})
would become return render(request, 'app_code_share/homepage.html', {})
which is better to find the file. Just my opinion since in case we have many sub folders it becomes quite hard for new contributors to find the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm.. makes sense. Let me go through it. Will it push it by tonight :)
@@ -0,0 +1,29 @@ | |||
# -*- coding: utf-8 -*- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Migrations shouldn't be here. Please add migration folders to .gitignore
file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any specific reason? for adding migrations folder to .gitignore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI
The migration files for each app live in a “migrations” directory inside of that app, and are designed to be committed to, and distributed as part of, its codebase. You should be making them once on your development machine and then running the same migrations on your colleagues’ machines, your staging machines, and eventually your production machines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I stand corrected for this. Read more here as to why one should commit migrations.