Fixed settings_local.py database path not being absolute.

Review Request #7684 — Created Oct. 9, 2015 and submitted

Information

Review Board
master
037259a...

Reviewers

When running rb-vm-env on Vagrant, would get relative database path in settings_local.py, which would cause some errors. Such as:
"Testing a SFTP-backed bzr repository ... ERROR:root:Could not load siteconfig: no such table: django_site"

Added an import and a path variable to settings_local.py.tmpl
Edited a string that prepare-dev.py wrote into the template.

Performed Review Board unit tests

$cd /src/reviewboard
$./reviewboard/manage.py test

Ran prepare-dev.py to check if it would create settings_local.py correctly.

Description From Last Updated

Setting SITE_ROOT isn't correct (SITE_ROOT is when you want Review Board to appear in a subdirectory of a webserver, for …

daviddavid

We should use __file__ here, rather than SITE_ROOT.

daviddavid

Please add one more blank line in here (there should be two blank lines between the imports and the first …

daviddavid
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        contrib/internal/prepare-dev.py
    
    Ignored Files:
        contrib/conf/settings_local.py.tmpl
        reviewboard/<fdopen>
        contrib/.DS_Store
        reviewboard/scmtools/testdata/hg_repo/.hg/cache/branchheads
        .DS_Store
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        contrib/internal/prepare-dev.py
    
    Ignored Files:
        contrib/conf/settings_local.py.tmpl
        reviewboard/<fdopen>
        contrib/.DS_Store
        reviewboard/scmtools/testdata/hg_repo/.hg/cache/branchheads
        .DS_Store
    
    
  2. 
      
PH
david
  1. You've ended up adding a bunch of extra junk to git (.DS_Store, <fdopen>, etc.). Please remove these from your change.

  2. contrib/conf/settings_local.py.tmpl (Diff revision 1)
     
     
    Show all issues

    Setting SITE_ROOT isn't correct (SITE_ROOT is when you want Review Board to appear in a subdirectory of a webserver, for example, it would be set to "/reviewboard/" if you wanted to access your installation at http://repos.company.com/reviewboard/)

  3. contrib/internal/prepare-dev.py (Diff revision 1)
     
     
    Show all issues

    We should use __file__ here, rather than SITE_ROOT.

  4. 
      
PH
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        contrib/internal/prepare-dev.py
    
    Ignored Files:
        contrib/conf/settings_local.py.tmpl
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        contrib/internal/prepare-dev.py
    
    Ignored Files:
        contrib/conf/settings_local.py.tmpl
    
    
  2. 
      
david
  1. Looking pretty good! Just one more trivial thing.

  2. contrib/conf/settings_local.py.tmpl (Diff revision 2)
     
     
    Show all issues

    Please add one more blank line in here (there should be two blank lines between the imports and the first thing in the file).

  3. 
      
PH
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        contrib/internal/prepare-dev.py
    
    Ignored Files:
        contrib/conf/settings_local.py.tmpl
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        contrib/internal/prepare-dev.py
    
    Ignored Files:
        contrib/conf/settings_local.py.tmpl
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
PH
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.5.x (f3ed3f8)
Loading...