This commit is contained in:
parent e3fecaa9ed
commit fa3d39de35
8 changed files with 62 additions and 1 deletions

3
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

10
.idea/misc.xml Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="Python 3.12 (Course_FirstProject) (3)" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12 (Course_FirstProject) (3)" project-jdk-type="Python SDK" />
<component name="PyCharmProfessionalAdvertiser">
<option name="shown" value="true" />
</component>
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/to_inventory.iml" filepath="$PROJECT_DIR$/.idea/to_inventory.iml" />
</modules>
</component>
</project>

12
.idea/to_inventory.iml Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">
<option name="format" value="PLAIN" />
<option name="myDocStringFormat" value="Plain" />
</component>
</module>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@ -1,3 +1,18 @@
from django.db import models
# Create your models here.
class Counter_agent(models.Model):
id = models.AutoField(primary_key=True)
def __str__(self):
return f' Counter_agent {self.id}'
class element(models.Model):
id = models.AutoField(primary_key=True)
external_id = models.IntegerField()
type = models.CharField(max_length=100)
photo = models.ImageField(upload_to='.')
dop_text = models.TextField()
Counter_agent = models.ForeignKey(Counter_agent, related_name='element', on_delete=models.CASCADE)
def __str__(self):
return f' element {self.id} (Counter_agent {self.Counter_agent.id})'

View File

@ -37,6 +37,7 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'inventory.apps.PostsConfig'
]
MIDDLEWARE = [