rockstor / rockstor-doc

Rockstor documentation
http://rockstor.com/docs
Other
25 stars 30 forks source link

Add missing settings env in code testing #414

Closed phillxnet closed 1 year ago

phillxnet commented 1 year ago

In the following section https://rockstor.com/docs/contribute/contribute.html#code-test we have a missing:

export DJANGO_SETTINGS_MODULE=settings

line. Not a problem if folks have already set this previously while following another of the developer sections, but it would be nice to have this in for completeness and to avoid folks running the tests as the first thing they try, and having an issue regarding not settings having been defined. This way each section can stand alone and there is not harm in re-defining repeatedly.

FroggyFlox commented 1 year ago

Sorry about missing that one, @phillxnet, I should have paid more attention :-\

phillxnet commented 1 year ago

@FroggyFlox I missed it in review actually. But I worked through in turn so had already defined it. Hence missing it the first go around. Easily done and easily fixed also. I was just referencing the docs to do some tests and ran into it. Hence the issue. Folks will likely do similar so I think it best we have each section as able to stand in isolation also. We might want to move to defining settings via the command line option to django-admin. Not entirely sure if that will work in all cases given our Poetry setup. And it's nice to have it discreet anyway as then we split out each of the elements onto their own line.

FroggyFlox commented 1 year ago

@phillxnet , Once we move to poetry 1.2.0+, we might want to have a look at: https://github.com/mpeteuil/poetry-dotenv-plugin. That plugin seems to have emerged from https://github.com/python-poetry/poetry/issues/337.

phillxnet commented 1 year ago

@FroggyFlox Cheers, that's nice. And I totally agree. The more self contained we can get the better.