Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
E
esi-table-data
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esi-data-scrapping
esi-table-data
Commits
318bdd47
Commit
318bdd47
authored
7 years ago
by
Vasyl Bodnaruk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add app for scraper and model
parent
6ac97a98
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
settings.py
esi/esi/settings.py
+1
-0
models.py
esi/scraper/models.py
+25
-0
No files found.
esi/esi/settings.py
View file @
318bdd47
...
@@ -41,6 +41,7 @@ INSTALLED_APPS = [
...
@@ -41,6 +41,7 @@ INSTALLED_APPS = [
'webapp.apps.WebappConfig'
,
'webapp.apps.WebappConfig'
,
'main.apps.MainConfig'
,
'main.apps.MainConfig'
,
'scraper.apps.ScraperConfig'
,
]
]
MIDDLEWARE
=
[
MIDDLEWARE
=
[
...
...
This diff is collapsed.
Click to expand it.
esi/scraper/models.py
View file @
318bdd47
from
django.db
import
models
from
django.db
import
models
# Create your models here.
# Create your models here.
class
Spider
(
models
.
Model
):
name
=
models
.
CharField
(
max_length
=
50
,
default
=
None
,
null
=
True
)
sp_name
=
models
.
CharField
(
max_length
=
20
,
default
=
None
)
class
Job
(
models
.
Model
):
DELETE
=
'DEL'
COMPLETE
=
'COM'
RUNNING
=
'RUN'
NOTOP
=
'NOT'
STATUS
=
(
(
DELETE
,
'delete'
),
(
COMPLETE
,
'complete'
),
(
RUNNING
,
'running'
),
(
NOTOP
,
'not_status'
)
)
name
=
models
.
CharField
(
max_length
=
50
,
default
=
None
,
null
=
True
)
job_id
=
models
.
CharField
(
max_length
=
50
,
default
=
None
,
null
=
True
)
start_time
=
models
.
DateTimeField
()
finish_time
=
models
.
DateTimeField
()
status
=
models
.
CharField
(
max_length
=
3
,
choices
=
STATUS
,
default
=
NOTOP
)
spider
=
models
.
ForeignKey
(
Spider
,
default
=
None
,
null
=
True
)
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment