[TASK] Reformat some files.
This commit is contained in:
parent
bc2ebea8de
commit
0952922757
@ -6,7 +6,7 @@ from django.db import models
|
|||||||
class Project(models.Model):
|
class Project(models.Model):
|
||||||
name = models.CharField(max_length=255)
|
name = models.CharField(max_length=255)
|
||||||
description = models.TextField()
|
description = models.TextField()
|
||||||
associated_filename = models.CharField(max_length=255,blank=True,null=True)
|
associated_filename = models.CharField(max_length=255, blank=True, null=True)
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
repr = self.name
|
repr = self.name
|
||||||
@ -19,7 +19,7 @@ class Project(models.Model):
|
|||||||
|
|
||||||
class PersonGlobalIdentity(models.Model):
|
class PersonGlobalIdentity(models.Model):
|
||||||
type = models.CharField(max_length=255)
|
type = models.CharField(max_length=255)
|
||||||
#TODO: Extend this for further stuff - maybe vivo external url or something?
|
# TODO: Extend this for further stuff - maybe vivo external url or something?
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
repr = "<PersonGlobalIdentity ID=" + str(self.id) + ", type=" + self.type + ">"
|
repr = "<PersonGlobalIdentity ID=" + str(self.id) + ", type=" + self.type + ">"
|
||||||
|
@ -138,6 +138,7 @@ class UpdateProjectView(ProtectedFormView, SingleObjectMixin):
|
|||||||
""" Test if SQLite is a valid citavi project. """
|
""" Test if SQLite is a valid citavi project. """
|
||||||
from service import Citavi
|
from service import Citavi
|
||||||
citavi_project = Citavi.Project(temp_sqlite)
|
citavi_project = Citavi.Project(temp_sqlite)
|
||||||
|
citavi_project.open()
|
||||||
citavi_project_valid = citavi_project.is_valid()
|
citavi_project_valid = citavi_project.is_valid()
|
||||||
""" Free temporary ressources. """
|
""" Free temporary ressources. """
|
||||||
del citavi_project
|
del citavi_project
|
||||||
@ -163,7 +164,8 @@ class UpdateProjectView(ProtectedFormView, SingleObjectMixin):
|
|||||||
|
|
||||||
""" Refresh identities from citavi project. """
|
""" Refresh identities from citavi project. """
|
||||||
# TODO
|
# TODO
|
||||||
#citavi_project = Citavi.Project(sqlite_path)
|
# citavi_project = Citavi.Project(sqlite_path)
|
||||||
#del citavi_project
|
# citavi_project.open()
|
||||||
|
# del citavi_project
|
||||||
return super(UpdateProjectView, self).form_valid(form)
|
return super(UpdateProjectView, self).form_valid(form)
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from sqlalchemy import create_engine, MetaData
|
from sqlalchemy import create_engine, MetaData
|
||||||
from sqlalchemy.ext.automap import automap_base
|
from sqlalchemy.ext.automap import automap_base
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ class Project():
|
|||||||
self.sqlite_file = sqlite_file
|
self.sqlite_file = sqlite_file
|
||||||
self._is_open = False
|
self._is_open = False
|
||||||
self._is_error = False
|
self._is_error = False
|
||||||
self._sa = {} # Object namespace for sqlalchemy related objects
|
self._sa = {} # Object namespace for sqlalchemy related objects
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
""" Destructor to close the citavi file. """
|
""" Destructor to close the citavi file. """
|
||||||
|
Loading…
Reference in New Issue
Block a user