-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
[WIP] Python3 support - Django #144
Closed
Closed
Changes from 4 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6dd11b3
Python3 support - Django
prshnt19 d0bfaa8
all printers supported
prshnt19 2cf458b
django admin staticfiles
prshnt19 b2df0ce
_ and completion working
prshnt19 3c3e4a3
sympy live integrated to docs
prshnt19 9926ead
AnonymousUser and session working
prshnt19 f8d500f
Clear Buttons clears the session
prshnt19 d967608
django project name changed to sympy_live
prshnt19 4fa36e2
requirements.txt updated
prshnt19 834358b
numpy and scipy added
prshnt19 ca4d483
added setting up instructions in README
prshnt19 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
*.swp | ||
*.~ | ||
*.py[co] | ||
__pycache__/ | ||
.idea/ | ||
nohup.out | ||
.gcloudignore | ||
cloud_sql_proxy | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
indexes: | ||
|
||
# AUTOGENERATED | ||
|
||
# This index.yaml is automatically updated whenever the dev_appserver | ||
# detects that a new type of query is run. If you want to manage the | ||
# index.yaml file manually, remove the above marker line (the line | ||
# saying "# AUTOGENERATED"). If you want to manage some indexes | ||
# manually, move them above the marker line. The index.yaml file is | ||
# automatically uploaded to the admin console when you next deploy | ||
# your application using appcfg.py. | ||
|
||
- kind: Searches | ||
properties: | ||
- name: private | ||
- name: timestamp | ||
direction: desc | ||
|
||
- kind: Searches | ||
properties: | ||
- name: user_id | ||
- name: timestamp | ||
direction: desc | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env python | ||
"""Django's command-line utility for administrative tasks.""" | ||
import os | ||
import sys | ||
|
||
|
||
def main(): | ||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sympy_live_django.settings') | ||
try: | ||
from django.core.management import execute_from_command_line | ||
except ImportError as exc: | ||
raise ImportError( | ||
"Couldn't import Django. Are you sure it's installed and " | ||
"available on your PYTHONPATH environment variable? Did you " | ||
"forget to activate a virtual environment?" | ||
) from exc | ||
execute_from_command_line(sys.argv) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
asgiref==3.2.3 | ||
bitarray==1.2.1 | ||
cachetools==4.0.0 | ||
certifi==2019.11.28 | ||
chardet==3.0.4 | ||
cycler==0.10.0 | ||
Django==3.0.2 | ||
google-api-core==1.16.0 | ||
google-auth==1.11.0 | ||
google-cloud==0.34.0 | ||
google-cloud-core==1.2.0 | ||
google-cloud-storage==1.25.0 | ||
google-resumable-media==0.5.0 | ||
googleapis-common-protos==1.51.0 | ||
gunicorn==20.0.4 | ||
idna==2.8 | ||
kiwisolver==1.1.0 | ||
matplotlib==3.1.2 | ||
mysqlclient==1.4.6 | ||
numpy==1.18.1 | ||
protobuf==3.11.2 | ||
pyasn1==0.4.8 | ||
pyasn1-modules==0.2.8 | ||
pyparsing==2.4.6 | ||
python-dateutil==2.8.1 | ||
pytz==2019.3 | ||
requests==2.22.0 | ||
rsa==4.0 | ||
six==1.14.0 | ||
sqlparse==0.3.0 | ||
urllib3==1.25.8 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from django.contrib import admin | ||
from .models import Searches | ||
from django.contrib.sessions.models import Session | ||
|
||
|
||
class SearchesEntry(admin.ModelAdmin): | ||
list_display = ("id", "user_id", "query", "timestamp", "private") | ||
|
||
|
||
class SessionEntry(admin.ModelAdmin): | ||
list_display = ("session_key", "expire_date", "session_data") | ||
|
||
|
||
admin.site.register(Searches, SearchesEntry) | ||
admin.site.register(Session, SessionEntry) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class ShellConfig(AppConfig): | ||
name = 'shell' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 3.0.2 on 2020-02-08 11:12 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Searches', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('query', models.CharField(default=None, max_length=100)), | ||
('timestamp', models.DateTimeField(auto_now_add=True)), | ||
('private', models.BooleanField()), | ||
('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 3.0.2 on 2020-02-09 12:27 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('shell', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='searches', | ||
name='private', | ||
field=models.BooleanField(blank=True), | ||
), | ||
migrations.AlterField( | ||
model_name='searches', | ||
name='query', | ||
field=models.CharField(blank=True, default=None, max_length=100), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 3.0.2 on 2020-02-09 12:36 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('shell', '0002_auto_20200209_1757'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='searches', | ||
name='private', | ||
field=models.BooleanField(), | ||
), | ||
migrations.AlterField( | ||
model_name='searches', | ||
name='query', | ||
field=models.CharField(default=None, max_length=100), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 3.0.2 on 2020-02-25 12:36 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('shell', '0003_auto_20200209_1806'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='searches', | ||
options={'verbose_name_plural': 'Searches'}, | ||
), | ||
] | ||
prshnt19 marked this conversation as resolved.
Show resolved
Hide resolved
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from django.db import models | ||
from django.contrib.auth.models import User | ||
|
||
|
||
class Searches(models.Model): | ||
user_id = models.ForeignKey(User, on_delete=models.CASCADE) | ||
query = models.CharField(max_length=100, default=None) | ||
timestamp = models.DateTimeField(auto_now_add=True) | ||
private = models.BooleanField() | ||
|
||
class Meta: | ||
verbose_name_plural = "Searches" | ||
|
||
|
||
# class SessionTable(models.Model): | ||
# global_names = models.CharField(max_length=50) | ||
# globals = models.BinaryField() | ||
# unpicklable_names = models.CharField(max_length=30) | ||
# unpicklables = models.CharField(max_length=30) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What is the purpose of these? I highly doubt that it is supported in Python3 runtime.
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 was automatically generated while running dev_appserver for Python2 local testing. I think it should be removed.