Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
8e78f73d
Commit
8e78f73d
authored
12 years ago
by
Calen Pennington
Browse files
Options
Downloads
Patches
Plain Diff
Adding a test environment with some debug stuff turned off
parent
21c20075
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
envs/test.py
+57
-0
57 additions, 0 deletions
envs/test.py
rakefile
+1
-1
1 addition, 1 deletion
rakefile
with
58 additions
and
1 deletion
envs/test.py
0 → 100644
+
57
−
0
View file @
8e78f73d
"""
This config file runs the simplest dev environment using sqlite, and db-based
sessions. Assumes structure:
/envroot/
/db # This is where it
'
ll write the database file
/mitx # The location of this repo
/log # Where we
'
re going to write log files
"""
from
common
import
*
LOGGING
=
logsettings
.
get_logger_config
(
PROJECT_ROOT
/
"
log
"
,
logging_env
=
"
dev
"
,
tracking_filename
=
"
tracking.log
"
,
debug
=
True
)
DATABASES
=
{
'
default
'
:
{
'
ENGINE
'
:
'
django.db.backends.sqlite3
'
,
'
NAME
'
:
PROJECT_ROOT
/
"
db
"
/
"
mitx.db
"
,
}
}
CACHES
=
{
# This is the cache used for most things. Askbot will not work without a
# functioning cache -- it relies on caching to load its settings in places.
# In staging/prod envs, the sessions also live here.
'
default
'
:
{
'
BACKEND
'
:
'
django.core.cache.backends.locmem.LocMemCache
'
,
'
LOCATION
'
:
'
mitx_loc_mem_cache
'
},
# The general cache is what you get if you use our util.cache. It's used for
# things like caching the course.xml file for different A/B test groups.
# We set it to be a DummyCache to force reloading of course.xml in dev.
# In staging environments, we would grab VERSION from data uploaded by the
# push process.
'
general
'
:
{
'
BACKEND
'
:
'
django.core.cache.backends.dummy.DummyCache
'
,
'
KEY_PREFIX
'
:
'
general
'
,
'
VERSION
'
:
4
,
}
}
# Dummy secret key for dev
SECRET_KEY
=
'
85920908f28904ed733fe576320db18cabd7b6cd
'
############################ FILE UPLOADS (ASKBOT) #############################
DEFAULT_FILE_STORAGE
=
'
django.core.files.storage.FileSystemStorage
'
MEDIA_ROOT
=
PROJECT_ROOT
/
"
uploads
"
MEDIA_URL
=
"
/static/uploads/
"
STATICFILES_DIRS
.
append
((
"
uploads
"
,
MEDIA_ROOT
))
FILE_UPLOAD_TEMP_DIR
=
PROJECT_ROOT
/
"
uploads
"
FILE_UPLOAD_HANDLERS
=
(
'
django.core.files.uploadhandler.MemoryFileUploadHandler
'
,
'
django.core.files.uploadhandler.TemporaryFileUploadHandler
'
,
)
This diff is collapsed.
Click to expand it.
rakefile
+
1
−
1
View file @
8e78f73d
...
...
@@ -29,7 +29,7 @@ CLOBBER.include('build')
CLEAN
.
include
(
"
#{
BUILD_DIR
}
/*.deb"
,
"
#{
BUILD_DIR
}
/util"
)
task
:test
do
sh
(
"django-admin.py test --settings=envs.
dev
--pythonpath=. $(ls djangoapps)"
)
sh
(
"django-admin.py test --settings=envs.
test
--pythonpath=. $(ls djangoapps)"
)
end
task
:package
do
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment