-
Notifications
You must be signed in to change notification settings - Fork 12
chore(code_share): #59
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
base: development
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| ### OSX ### | ||
| .DS_Store | ||
| .AppleDouble | ||
| .LSOverride | ||
|
|
||
| # Icon must ends with two \r. | ||
| Icon | ||
|
|
||
| # Thumbnails | ||
| ._* | ||
|
|
||
| # Files that might appear on external disk | ||
| .Spotlight-V100 | ||
| .Trashes | ||
|
|
||
|
|
||
| ### Python ### | ||
| # Byte-compiled / optimized / DLL files | ||
| __pycache__/ | ||
| *.py[cod] | ||
|
|
||
| # C extensions | ||
| *.so | ||
|
|
||
| # Distribution / packaging | ||
| .Python | ||
| *.egg-info/ | ||
| .installed.cfg | ||
| *.egg | ||
|
|
||
| # Installer logs | ||
| pip-log.txt | ||
| pip-delete-this-directory.txt | ||
|
|
||
| # Unit test / coverage reports | ||
| .tox/ | ||
| .coverage | ||
| .cache | ||
| nosetests.xml | ||
| coverage.xml | ||
| htmlcov/ | ||
|
|
||
| # Translations | ||
| *.mo | ||
|
|
||
| # Mr Developer | ||
| .mr.developer.cfg | ||
| .project | ||
| .pydevproject | ||
|
|
||
| # Rope | ||
| .ropeproject | ||
|
|
||
| # Django stuff: | ||
| *.log | ||
| *.pot | ||
| .staticfiles/ | ||
| .media/ | ||
|
|
||
| # Sphinx documentation | ||
| docs/_build/ | ||
|
|
||
| # npm | ||
| node_modules/ | ||
|
|
||
| # Campass | ||
| .sass-cache | ||
|
|
||
| # Celery | ||
| celerybeat-schedule | ||
|
|
||
| # Vagrant | ||
| .vagrant | ||
|
|
||
| # Redis | ||
| dump.rdb | ||
|
|
||
| # python-dotenv | ||
| .env | ||
|
|
||
| # Others | ||
| _docs_html/ | ||
| media/ | ||
| provisioner/site.retry | ||
| *.sqlite3 | ||
|
|
||
| # Virtualenv | ||
| venv/ | ||
|
|
||
| ### Vim ### | ||
| [._]*.s[a-w][a-z] | ||
| [._]s[a-w][a-z] | ||
| *.un~ | ||
| Session.vim | ||
| .netrwhist | ||
|
|
||
| # Pycharm | ||
| .idea/ | ||
|
|
||
| # Local Files | ||
| .static_media/* | ||
| .cache/* | ||
| ../.vscode/ |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # -*- coding: utf-8 -*- | ||
| # Generated by Django 1.11.2 on 2017-09-28 09:10 | ||
| from __future__ import unicode_literals | ||
|
|
||
| from django.db import migrations, models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| initial = True | ||
|
|
||
| dependencies = [ | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.CreateModel( | ||
| name='CodeShare', | ||
| fields=[ | ||
| ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
| ('code', models.TextField(blank=True, max_length=100000, null=True)), | ||
| ('hash_value', models.SlugField(blank=True, max_length=100, null=True, unique=True)), | ||
| ('file_name', models.CharField(blank=True, max_length=50, null=True)), | ||
| ('language', models.CharField(blank=True, default=None, max_length=20, null=True)), | ||
| ], | ||
| options={ | ||
| 'verbose_name': 'CodeShare', | ||
| }, | ||
| ), | ||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,7 @@ def home(request): | |
| """ | ||
|
|
||
| if request.method == 'GET': | ||
| return render(request, 'app_code_share/homepage.html', {}) | ||
| return render(request, 'homepage.html', {}) | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be better to have
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 It would be good to have all static files in one place :)
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. your take on this one? @sourabhtk37
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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: If we changed to having
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 :) |
||
|
|
||
| if request.method == 'POST': | ||
| code_share = request.POST.get('code_snippet') | ||
|
|
@@ -68,7 +68,7 @@ def view_by_hash(request, hash_id): | |
| except CodeShare.DoesNotExist: | ||
| raise Http404("Codeshare does not exist") | ||
| context = {'code_share': code_share} | ||
| return render(request, 'app_code_share/code_view.html', context) | ||
| return render(request, 'code_view.html', context) | ||
|
|
||
| if request.method == 'POST': | ||
| code_share = request.POST.get('code_snippet') | ||
|
|
||
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
.gitignorefile.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
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.