# Learning django



## balanga (Mar 24, 2021)

Before I embark on trying to learn django, could anyone tell if I should be able to follow the following on FreeBSD?









						Django
					

The web framework for perfectionists with deadlines.




					docs.djangoproject.com
				




I note that running `python -m django --version` gives me:-



> python: Command not found.



so how do get '*python*' to invoke python3.7?


----------



## aragats (Mar 24, 2021)

balanga said:


> so how do get '*python*' to invoke python3.7?


That's a good question. However, I'd suggest renaming this thread correspondingly if you want people pay attention to the issue.
I don't know (never needed) the "official" way, but the easiest one is:
	
	



```
ln -s `which python3.7` ~/bin/python
```


----------



## kpedersen (Mar 24, 2021)

I recall the django tutorial bring very good but quite odd. It is really detailed, even going through writing automated tests and CI. However it never actually progresses from using a development server which it unhelpfully warns "should not be used in production". It gives very vague details on running on existing servers.

Recently I came across a Python web app compatible (WSGI) web server written in pure Python (reducing dependencies nicely).









						GitHub - Pylons/waitress: Waitress - A WSGI server for Python 3
					

Waitress - A WSGI server for Python 3. Contribute to Pylons/waitress development by creating an account on GitHub.




					github.com
				




You might find it useful? Django apps should run on it and it is suitable for production.


----------



## balanga (Mar 24, 2021)

I'm trying to learn django because I want to try and install Mailman3 on FreeBSD.


----------



## tuxador (Mar 24, 2021)

I strongly advice using virtual environments to install python packages.
Pipenv is my preferred utility for creating and managing virtual environments.


----------



## Oldno7 (May 2, 2021)

balanga said:


> I'm trying to learn django because I want to try and install Mailman3 on FreeBSD.


You don't need to "learn django" for that. To install and run a succesfully mailman3 in FreeBSD you can follow the tips and advises that you can find in, for example, another thread on these forums: https://forums.FreeBSD.org/threads/mailman-3.61050/post-488128


----------



## balanga (May 2, 2021)

Many thanks for pointing this out, I didn't realise that anyone had managed to get mailman3 working on FreeBSD. I had tried several times but never got very far. Will give it a go now.


----------



## Oldno7 (May 7, 2021)

balanga said:


> Many thanks for pointing this out, I didn't realise that anyone had managed to get mailman3 working on FreeBSD. I had tried several times but never got very far. Will give it a go now.


I did. And I am not alone . If you find that thread a bit overwhelming (I tried to explain a step to step procedure, but obviously focused in my servers needs), ask there and I will try to help.


----------



## balanga (May 7, 2021)

Actually it might be an idea to simply post the install procedure in the Howto Forum with a title of *Installation instructions for mailman3* and leave the other thread for help. 

Just my opinion...


----------



## Oldno7 (May 8, 2021)

balanga said:


> Actually it might be an idea to simply post the install procedure in the Howto Forum with a title of *Installation instructions for mailman3* and leave the other thread for help.
> 
> Just my opinion...


I would have done it if someone had confirmed it has been replicated, but apart of one message saying "I will catch up later" there and yours here, there has not been any feedback. I'm not convinced it will be of enough interest or if my case would (a jailed apache 24 server with a bunch of mailman2 lists migrated to mailman3 succesfully running) apply to anyone apart me.


----------

