* Python code cleanup by the cleanup-python-code Jenkins job. This pull request was generated by the cleanup-python-code Jenkins job, which ran ``` cd lms/djangoapps/dashboard; find . -type f -name '*.py' | while read fname; do sed -i 's/ # lint-amnesty, pylint: disable=super-with-arguments//; s/ # lint-amnesty, pylint: disable=import-error, wrong-import-order//; s/ # lint-amnesty, pylint: disable=wrong-import-order//' "$fname"; done; find . -type f -name '*.py' | while read fname; do pyupgrade --exit-zero-even-if-changed --py3-plus --py36-plus --py38-plus "$fname"; done; isort --recursive . ``` The following packages were installed: `pyupgrade,isort` * feedback done Co-authored-by: Zulqarnain <muhammad.zulqarnain@arbisoft.com>
22 lines
853 B
Python
22 lines
853 B
Python
"""Models for dashboard application"""
|
|
|
|
|
|
import mongoengine
|
|
from xmodule.modulestore.mongoengine_fields import CourseKeyField
|
|
|
|
|
|
class CourseImportLog(mongoengine.Document):
|
|
"""Mongoengine model for git log"""
|
|
course_id = CourseKeyField(max_length=128)
|
|
# NOTE: this location is not a Location object but a pathname
|
|
location = mongoengine.StringField(max_length=168)
|
|
import_log = mongoengine.StringField(max_length=20 * 65535)
|
|
git_log = mongoengine.StringField(max_length=65535)
|
|
repo_dir = mongoengine.StringField(max_length=128)
|
|
commit = mongoengine.StringField(max_length=40, null=True)
|
|
author = mongoengine.StringField(max_length=500, null=True)
|
|
date = mongoengine.DateTimeField()
|
|
created = mongoengine.DateTimeField()
|
|
meta = {'indexes': ['course_id', 'created'],
|
|
'allow_inheritance': False}
|