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

chore(code_share): #59

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

aniketmaithani
Copy link

  • project structure changes
  • TODO : remove Hardcoded Values
  • Code Cleanup

- project structure changes
- TODO : remove Hardcoded Values
- Code Cleanup
@aniketmaithani
Copy link
Author

@sourabhtk37 review me please. :) If this makes sense to you we can go ahead and go ahead with the current structure. :)

Copy link
Owner

@sourabhtk37 sourabhtk37 left a 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', {})
Copy link
Owner

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>

Copy link
Author

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 :)

Copy link
Author

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

Copy link
Owner

@sourabhtk37 sourabhtk37 Sep 28, 2017

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.

Copy link
Author

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 -*-
Copy link
Owner

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.

Copy link
Author

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

Copy link
Author

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.

Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants