Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
K
KawowyDzienniczek
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rafal
KawowyDzienniczek
Commits
39583281
Commit
39583281
authored
Aug 04, 2016
by
lizonr1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change max_size of CharFields
parent
f4eff4ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
models.py
KawowyDzienniczek/App/promotion/models.py
+14
-14
No files found.
KawowyDzienniczek/App/promotion/models.py
View file @
39583281
...
@@ -17,18 +17,19 @@ class Task(models.Model):
...
@@ -17,18 +17,19 @@ class Task(models.Model):
)
)
type
=
models
.
CharField
(
max_length
=
2
,
choices
=
TYPE_CHOICES
,
default
=
PRESENCE
)
type
=
models
.
CharField
(
max_length
=
2
,
choices
=
TYPE_CHOICES
,
default
=
PRESENCE
)
update_delay
=
models
.
DurationField
()
# raz na dzień? Tego nie widzi usera
update_delay
=
models
.
DurationField
()
description
=
models
.
CharField
(
max_length
=
50
)
description
=
models
.
CharField
(
max_length
=
50
)
name
=
models
.
CharField
(
max_length
=
5
0
)
name
=
models
.
CharField
(
max_length
=
2
0
)
counter_target
=
models
.
IntegerField
()
#badz 10 razy #badz przez m # To widzi user #cel koncowy
counter_target
=
models
.
IntegerField
()
counter_incrementation
=
models
.
IntegerField
()
# o 1 # Tego nie widzi user
counter_incrementation
=
models
.
IntegerField
()
beacon_counter_target
=
models
.
IntegerField
()
# 3x # 1x # tego nie widiz user
beacon_counter_target
=
models
.
IntegerField
()
beacon_signal_delay
=
models
.
DurationField
()
# przez 5minut # co 5 minut #tego nie widzi user
beacon_signal_delay
=
models
.
DurationField
()
beacon_singal_delay_maximum_delay
=
models
.
DurationField
()
# ale po 20 minutach sie restartuje
beacon_singal_delay_maximum_delay
=
models
.
DurationField
()
def
__str__
(
self
):
def
__str__
(
self
):
return
self
.
name
return
self
.
name
class
Promotion
(
models
.
Model
):
class
Promotion
(
models
.
Model
):
AVAILABLE
=
'AV'
AVAILABLE
=
'AV'
NON_AVAILABLE
=
'NAV'
NON_AVAILABLE
=
'NAV'
...
@@ -38,9 +39,9 @@ class Promotion(models.Model):
...
@@ -38,9 +39,9 @@ class Promotion(models.Model):
(
NON_AVAILABLE
,
'Non Available'
),
(
NON_AVAILABLE
,
'Non Available'
),
)
)
name
=
models
.
CharField
(
max_length
=
5
0
)
name
=
models
.
CharField
(
max_length
=
2
0
)
description
=
models
.
CharField
(
max_length
=
50
)
description
=
models
.
CharField
(
max_length
=
50
)
code
=
models
.
CharField
(
max_length
=
5
0
)
code
=
models
.
CharField
(
max_length
=
1
0
)
img
=
models
.
ImageField
()
img
=
models
.
ImageField
()
status
=
models
.
CharField
(
max_length
=
2
,
choices
=
STATUS_CHOICES
,
default
=
AVAILABLE
)
status
=
models
.
CharField
(
max_length
=
2
,
choices
=
STATUS_CHOICES
,
default
=
AVAILABLE
)
task
=
models
.
ForeignKey
(
Task
)
task
=
models
.
ForeignKey
(
Task
)
...
@@ -50,20 +51,19 @@ class Promotion(models.Model):
...
@@ -50,20 +51,19 @@ class Promotion(models.Model):
class
PromotionSet
(
models
.
Model
):
class
PromotionSet
(
models
.
Model
):
name
=
models
.
CharField
(
max_length
=
5
0
)
name
=
models
.
CharField
(
max_length
=
2
0
)
promotions
=
models
.
ManyToManyField
(
Promotion
,
default
=
''
)
promotions
=
models
.
ManyToManyField
(
Promotion
,
default
=
''
)
class
UserTask
(
models
.
Model
):
class
UserTask
(
models
.
Model
):
task
=
models
.
ForeignKey
(
Task
)
task
=
models
.
ForeignKey
(
Task
)
user
=
models
.
ForeignKey
(
User
,
related_name
=
'user_task'
,
user
=
models
.
ForeignKey
(
User
,
related_name
=
'user_task'
,
blank
=
False
,
null
=
False
,
default
=
None
)
blank
=
False
,
null
=
False
,
default
=
None
)
done
=
models
.
BooleanField
(
default
=
False
)
done
=
models
.
BooleanField
(
default
=
False
)
last_update
=
models
.
DateTimeField
()
last_update
=
models
.
DateTimeField
()
counter
=
models
.
IntegerField
()
# akutalnie bylem 3 razy # aktualny status uzytkwonika w zadaniu
counter
=
models
.
IntegerField
()
beacon_counter
=
models
.
IntegerField
()
# juz 10 minut, jeszcze raz i bedzie hyvka # status czy zaliczyc z beaconow taska
beacon_counter
=
models
.
IntegerField
()
beacon_signal_last_update
=
models
.
DateTimeField
()
# ostatnio 23 h temu # last update
beacon_signal_last_update
=
models
.
DateTimeField
()
def
update
(
self
):
def
update
(
self
):
if
not
self
.
ready_to_update
():
if
not
self
.
ready_to_update
():
...
...
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