mirror of https://github.com/gmbrax/Pilgrim.git
Changed the names of the files to conform the python convection and also added photo_in_entry.py to diminish the cyclic import error in pylint
This commit is contained in:
parent
89e6d0a783
commit
ac29e84833
|
|
@ -4,11 +4,17 @@
|
|||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="0a7f92e2-b44a-4dfe-8e01-136d1c0c18be" name="Changes" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/src/Pilgrim/Models/Photo.py" afterDir="false" />
|
||||
<list default="true" id="0a7f92e2-b44a-4dfe-8e01-136d1c0c18be" name="Changes" comment="Added a Back Relationship in Entry to list all the photos">
|
||||
<change afterPath="$PROJECT_DIR$/src/pilgrim/models/photo_in_entry.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Pilgrim/Models/Entry.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/Pilgrim/Models/Entry.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Pilgrim/__init__.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/Pilgrim/__init__.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Pilgrim/Application.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/pilgrim/application.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Pilgrim/Database.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/pilgrim/database.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Pilgrim/Models/Entry.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/pilgrim/models/Entry.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Pilgrim/Models/Photo.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/pilgrim/models/Photo.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Pilgrim/Models/TravelDiary.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/pilgrim/models/TravelDiary.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Pilgrim/Models/__init__.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/pilgrim/models/__init__.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Pilgrim/__init__.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/pilgrim/__init__.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Pilgrim/command.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/pilgrim/command.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
|
@ -50,23 +56,23 @@
|
|||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
||||
"Python.Database.executor": "Run",
|
||||
"Python.command.executor": "Run",
|
||||
"Python.main.executor": "Run",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.git.unshallow": "true",
|
||||
"git-widget-placeholder": "master",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
||||
"Python.Database.executor": "Run",
|
||||
"Python.command.executor": "Run",
|
||||
"Python.main.executor": "Run",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.git.unshallow": "true",
|
||||
"git-widget-placeholder": "master",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}]]></component>
|
||||
}</component>
|
||||
<component name="SharedIndexes">
|
||||
<attachedChunks>
|
||||
<set>
|
||||
|
|
@ -85,11 +91,24 @@
|
|||
<workItem from="1748985569621" duration="2124000" />
|
||||
<workItem from="1748992451560" duration="312000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="Added a Back Relationship in Entry to list all the photos">
|
||||
<option name="closed" value="true" />
|
||||
<created>1749004109515</created>
|
||||
<option name="number" value="00001" />
|
||||
<option name="presentableId" value="LOCAL-00001" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1749004109515</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="2" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="Added a Back Relationship in Entry to list all the photos" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Added a Back Relationship in Entry to list all the photos" />
|
||||
</component>
|
||||
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
||||
<SUITE FILE_PATH="coverage/Pilgrim$Database.coverage" NAME="Database Coverage Results" MODIFIED="1748987101492" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/src/Database" />
|
||||
<SUITE FILE_PATH="coverage/Pilgrim$main.coverage" NAME="main Coverage Results" MODIFIED="1748992510527" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/src" />
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
from Pilgrim.Application import Application
|
||||
from Pilgrim.command import main
|
||||
from Pilgrim.Database import Database, Base
|
||||
from Pilgrim.Models.TravelDiary import TravelDiary
|
||||
from Pilgrim.Models.Entry import Entry
|
||||
from Pilgrim.Models.Photo import Photo
|
||||
|
||||
__all__ = ["Application", "Database", "TravelDiary", "Entry", "Photo", "main", "Base"]
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
from pilgrim.application import Application
|
||||
from pilgrim.command import main
|
||||
from pilgrim.database import Database, Base
|
||||
from pilgrim.models.travel_diary import TravelDiary
|
||||
from pilgrim.models.entry import Entry
|
||||
from pilgrim.models.photo import Photo
|
||||
|
||||
__all__ = ["Application", "Database", "TravelDiary", "Entry", "Photo", "main", "Base"]
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from Pilgrim.Database import Database
|
||||
from pilgrim.database import Database
|
||||
|
||||
|
||||
class Application:
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from Pilgrim import Application
|
||||
from pilgrim.application import Application
|
||||
|
||||
|
||||
def main():
|
||||
|
|
@ -12,10 +12,10 @@ class Database:
|
|||
echo=False,
|
||||
connect_args={"check_same_thread": False},
|
||||
)
|
||||
self.Session = sessionmaker(bind=self.engine, autoflush=False, autocommit=False)
|
||||
self.session = sessionmaker(bind=self.engine, autoflush=False, autocommit=False)
|
||||
|
||||
def create(self):
|
||||
Base.metadata.create_all(self.engine)
|
||||
|
||||
def get_db(self):
|
||||
return self.Session()
|
||||
return self.session()
|
||||
|
|
@ -1,13 +1,8 @@
|
|||
from sqlalchemy import Column, Integer, String, ForeignKey, Table
|
||||
from sqlalchemy import Column, Integer, String, ForeignKey
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from Pilgrim import Base
|
||||
|
||||
|
||||
photo_entry_association = Table('photo_entry_association', Base.metadata,
|
||||
Column('id', Integer, primary_key=True, autoincrement=True),
|
||||
Column('fk_Photo_id', Integer, ForeignKey('photo.id')),
|
||||
Column('fk_Entry_id', Integer, ForeignKey('Entry.id')))
|
||||
from pilgrim.models.photo_in_entry import photo_entry_association
|
||||
from ..database import Base
|
||||
|
||||
|
||||
class Entry(Base):
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
from sqlalchemy import Column, Integer, String
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from Pilgrim import Base
|
||||
from Pilgrim.Models.Entry import photo_entry_association
|
||||
from pilgrim.models.photo_in_entry import photo_entry_association
|
||||
from ..database import Base
|
||||
|
||||
|
||||
class Photo(Base):
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
from sqlalchemy import Table, Column, Integer, ForeignKey
|
||||
|
||||
from ..database import Base
|
||||
|
||||
photo_entry_association = Table('photo_entry_association', Base.metadata,
|
||||
Column('id', Integer, primary_key=True, autoincrement=True),
|
||||
Column('fk_Photo_id', Integer, ForeignKey('photo.id')),
|
||||
Column('fk_Entry_id', Integer, ForeignKey('Entry.id')))
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
from sqlalchemy import Column, String, Integer
|
||||
|
||||
from Pilgrim import Application, Base
|
||||
|
||||
from ..database import Base
|
||||
|
||||
class TravelDiary(Base):
|
||||
__tablename__ = "TravelDiary"
|
||||
Loading…
Reference in New Issue