Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More
More about your developer environment¶
How to change the location of your repositories¶
The following it not much tested. Read and follow at your own risk or together with your mentor.
Imagine that for some reason you want to trash your virtualenv and
create it anew. The longest waiting time when you installed your developer
environment was to download all the repositories from GitLab. You can avoid
downloading them again by moving your repositories to another location and to
inform getlino about it by saying getlino configure --repos-base
:
$ mv ~/lino/env/repositories ~/
$ getlino configure --repos-base ~/repositories
The getlino
command has a quite primitive user interface. But it is less
stupid that the first impression might leave. For example it knows that it has
been run before:
This is getlino version 24.3.0 running on Ubuntu 22.04.4 LTS (ubuntu jammy).
This will write to configuration file /home/luc/.getlino.conf
Basically you just answer ENTER to every question, or y when ENTER doesn’t continue. Sometimes you can skip a step by answering n, for example when it asks to “run sudo apt-get update -y;sudo apt-get upgrade -y;” and you know that you did that recently.
You will also see that the answer to the question about repos_base is set to what you specified at the command-line:
- repos_base (Base directory for shared code repositories) [~/repositories]:
At some moment you should see:
Clone repositories to /home/luc/work ? [y or n] Yes
No need to clone atelier : directory exists.
No need to clone etgen : directory exists.
No need to clone eid : directory exists.
No need to clone cd : directory exists.
No need to clone getlino : directory exists.
No need to clone lino : directory exists.
No need to clone xl : directory exists.
No need to clone welfare : directory exists.
No need to clone react : directory exists.
No need to clone openui5 : directory exists.
No need to clone book : directory exists.
No need to clone cg : directory exists.
No need to clone ug : directory exists.
No need to clone hg : directory exists.
No need to clone lf : directory exists.
No need to clone ss : directory exists.
No need to clone algus : directory exists.
No need to clone amici : directory exists.
No need to clone avanti : directory exists.
No need to clone cms : directory exists.
No need to clone care : directory exists.
No need to clone cosi : directory exists.
No need to clone mentori : directory exists.
No need to clone noi : directory exists.
No need to clone presto : directory exists.
No need to clone pronto : directory exists.
No need to clone tera : directory exists.
No need to clone shop : directory exists.
No need to clone vilma : directory exists.
No need to clone voga : directory exists.
No need to clone weleup : directory exists.
No need to clone welcht : directory exists.
How to switch to the development version of atelier¶
This section is not needed and not much tested. Read and follow at your own risk.
The atelier
package had been automatically installed together
with lino
. That is, you are using the PyPI version of
Atelier. That’s usually okay because Atelier is more or less
stable. But one day we might decide that you should rather switch to
the development version.
Doing this is theoretically easy. Uninstall the PyPI version and then install the development version:
$ pip uninstall atelier
$ cd ~/lino/env/repositories
$ git clone https://github.com/lino-framework/atelier.git
$ pip install -e atelier
How to send emails from your developer environment¶
The demo sites of a developer environment don’t send any emails to the outside world. The test suite uses different techniques to simulate sending emails. But even as a Lino developer you might want to really send emails. For example when you develop or debug some action that sends emails and you want to really send them out. Or maybe you run your own production site on your developer machine.
The related Django settings (for example EMAIL_HOST_USER
and
EMAIL_HOST_PASSWORD
) contain information that only you can give. And
you don’t want to accidentally publish them. This is why you want to store them
in your local settings module.
Note that not all demo projects use the local
settings module. Only those which have the following lines in their
settings.py
file:
try:
from lino_local.settings import *
except ImportError:
pass
The local settings module¶
Your local settings module has been created by getlino configure
in file ~/lino/lino_local/settings.py
.
If you want Lino to find it, you need to set PYTHONPATH
to
~/lino
. For example by adding the following line to your
.bashrc
file:
export PYTHONPATH=/home/joe/lino
On a production server or for sites created with getlino
startsite
you don’t need to set PYTHONPATH
because the
manage.py
script of these sites contains a line sys.path.insert(0,
'/usr/local/lino')
.
Using the console email backend¶
Rather than actually sending out emails, you might prefer to simply see them on
the console. You can achieve this by setting EMAIL_BACKEND
as
follows:
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
With that setting you can copy the console output to a file tmp.eml
and
then opene this file in Thunderbird.