Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ce649c0d
authored
Jun 17, 2018
by
Szabolcs Gelencser
Committed by
Szabolcs Gelencsér
Jun 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add windows support
parent
d72aa9c8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
18 deletions
+33
-18
.gitignore
+4
-2
circle/circle/settings/base.py
+17
-10
circle/common/management/commands/watch.py
+9
-4
requirements/circlestack.txt
+0
-2
requirements/circlestack_linux.txt
+3
-0
No files found.
.gitignore
View file @
ce649c0d
...
...
@@ -47,4 +47,6 @@ scripts.rc
circle/celery
circle/circle/db.sqlite3
.idea
\ No newline at end of file
.idea
venv
\ No newline at end of file
circle/circle/settings/base.py
View file @
ce649c0d
...
...
@@ -113,7 +113,12 @@ try:
except
:
systz
=
None
TIME_ZONE
=
get_env_variable
(
'DJANGO_TIME_ZONE'
,
default
=
systz
)
WINDOWS
=
get_env_variable
(
'WINDOWS'
,
False
)
if
WINDOWS
:
TIME_ZONE
=
'Europe/Budapest'
else
:
TIME_ZONE
=
get_env_variable
(
'DJANGO_TIME_ZONE'
,
default
=
systz
)
# See: https://docs.djangoproject.com/en/dev/ref/settings/#language-code
LANGUAGE_CODE
=
get_env_variable
(
"DJANGO_LANGUAGE_CODE"
,
"en"
)
...
...
@@ -439,23 +444,25 @@ LOGGING = {
'filters'
:
[
'require_debug_false'
],
'class'
:
'django.utils.log.AdminEmailHandler'
},
'syslog'
:
{
'level'
:
'INFO'
,
'class'
:
'logging.handlers.SysLogHandler'
,
'formatter'
:
'simple'
,
'address'
:
'/dev/log'
,
# 'socktype': SOCK_STREAM,
# 'address': ('host', '514'),
}
},
'loggers'
:
{
'django.request'
:
{
'handlers'
:
[
'mail_admins'
,
'syslog'
],
'handlers'
:
[
'mail_admins'
,],
'level'
:
'INFO'
,
'propagate'
:
True
,
},
}
}
if
WINDOWS
:
LOGGING
[
'handlers'
][
'syslog'
]
=
{
'level'
:
'INFO'
,
'class'
:
'logging.handlers.SysLogHandler'
,
'formatter'
:
'simple'
,
'address'
:
'/dev/log'
,
# 'socktype': SOCK_STREAM,
# 'address': ('host', '514'),
}
LOGGING
[
'loggers'
][
'django.request'
][
'handlers'
]
+=
'syslog'
########## END LOGGING CONFIGURATION
...
...
circle/common/management/commands/watch.py
View file @
ce649c0d
...
...
@@ -17,7 +17,6 @@
import
subprocess
import
os
import
pyinotify
from
django.core.management.base
import
BaseCommand
from
django.conf
import
settings
...
...
@@ -39,7 +38,11 @@ class LessUtils(object):
print
(
"Compiling:
%
s"
%
os
.
path
.
basename
(
less_pathname
))
try
:
subprocess
.
check_output
(
cmd
)
if
settings
.
WINDOWS
:
import
sys
subprocess
.
Popen
([
sys
.
executable
,
cmd
])
else
:
subprocess
.
check_output
(
cmd
)
except
subprocess
.
CalledProcessError
as
e
:
print
(
e
.
output
)
else
:
...
...
@@ -69,6 +72,7 @@ class LessUtils(object):
""" Watches for changes in LESS files recursively from the
project's root and compiles the files
"""
import
pyinotify
wm
=
pyinotify
.
WatchManager
()
class
EventHandler
(
pyinotify
.
ProcessEvent
):
...
...
@@ -99,5 +103,6 @@ class Command(BaseCommand):
print
(
"
\n
%
s
\n
"
%
(
"="
*
30
))
print
(
"End of initial LESS compiles
\n
"
)
# after first run watch less files
LessUtils
.
start_watch
()
if
not
settings
.
WINDOWS
:
# after first run watch less files
LessUtils
.
start_watch
()
requirements/circlestack.txt
View file @
ce649c0d
...
...
@@ -97,7 +97,6 @@ pyasn1==0.4.2
pycparser==2.18
pycryptodomex==3.4.12
Pygments==2.0.2
pyinotify==0.9.5
PyNaCl==1.2.1
pyOpenSSL==17.5.0
pyotp==2.1.1
...
...
@@ -131,7 +130,6 @@ subprocess32==3.2.7
traitlets==4.3.2
unicodecsv==0.14.1
urllib3==1.22
uWSGI==2.0.13.1
warlock==1.3.0
wcwidth==0.1.7
WebOb==1.7.4
...
...
requirements/circlestack_linux.txt
0 → 100644
View file @
ce649c0d
-r circlestack.txt
pyinotify==0.9.5
\ No newline at end of file
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