Commit Graph

38 Commits

Author SHA1 Message Date
Tim Orling
314d29deda requirements.txt: bump to Django 3.2 LTS
Upgrade to the latest Django 3.2.x LTS for
extended support up until April 2024.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2022-01-13 20:59:31 -08:00
Tim Orling
08d7f96e10 requirements.txt: update all to latest
Since we are on a "modern" version of Python in
Debian buster container (3.7) and a modern version
of Django (3.1.x) we should be able to run with
the latest of all dependencies.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2022-01-13 20:59:22 -08:00
Tim Orling
49b41802e4 requirements.txt: bump to Django 3.1
Another incremental upgrade towards 3.2 LTS

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2022-01-13 20:59:02 -08:00
Tim Orling
a027959343 Updates for Django 3.0
* Update requirements.txt versions
  - Mostly update to latest pre-Django 3.1 versions
* Fix deprecated axes.backends.AxesModelBackend
  - settings.py
  - docker/settings.py
* Fix template syntax 'staticfiles' -> 'static'
  - base.html
* Add migrations for layerbranch classicrecipe

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2022-01-13 20:58:52 -08:00
Tim Orling
094c89bc70 requirements.txt: bump to Django 3.0
Incremental upgrade towards 3.2 LTS version.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2022-01-13 20:58:40 -08:00
Paul Eggleton
848ca10920 requirements.txt: set proper version restriction for Django
Without a comma, pip3 will currently install Django 4.0 which does not
work.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.microsoft.com>
2021-10-20 10:02:46 +13:00
Amber Elliot
6c2f153784 requirements.txt: Updating Django requirement to the 2.2 LTS release.
Signed-off-by: Amber Elliot <amber.n.elliot@intel.com>
Signed-off-by: Paul Eggleton <bluelightning@bluelightning.org>
2020-06-30 05:37:09 +12:00
Paul Eggleton
8e3cbb7038 requirements.txt: bump Django version to fix CVE-2019-19844
Fixes a vulnerability in the password reset process due to
insufficiently stringent validation of unicode email addresses.

https://www.djangoproject.com/weblog/2019/dec/18/security-releases/
https://nvd.nist.gov/vuln/detail/CVE-2019-19844

(The existing version specification would have selected the fixed
version of Django already for new installs, but bumping the minimum
ensures that it will be installed for upgrades with
./dockersetup.py -u as well.)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-12-20 10:29:11 +13:00
Paul Eggleton
50fc6780e0 requirements.txt: bump a couple more versions
Update pytz and beautifulsoup4.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-10-29 10:22:59 +13:00
Paul Eggleton
69578c31e4 requirements.txt: update to fix CVE-2019-16865
Update Pillow version to incorporate a fix for a denial-of-service
vulnerability (which should not affect this application however, as it
does not use Pillow to process external images):

  https://nvd.nist.gov/vuln/detail/CVE-2019-16865

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-10-29 10:22:50 +13:00
Paul Eggleton
003c816417 requirements.txt: update
* Bump a few versions where we can
* Drop anyjson - this used to be a dependency of kombu but not anymore,
  and nothing else needs it.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-10-02 14:27:58 +13:00
Paul Eggleton
8a4dd12ae3 requirements.txt: update pillow
This is the only dependency we can update right now; the rest will cause
problems given that the layer index needs python 2 support still.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-07-17 11:31:04 +12:00
Paul Eggleton
190a97fda4 requirements.txt: update
Update to latest versions; as per last update we skip django-reversion
and django-axes. (Now however I've realised that django-axes > 4.5.4
probably isn't found within the container because in my development
setup, pip == pip3 whereas in the container pip is the Python 2 version.
For now let's stick with something that we can still use with the layer
index that still requires Python 2).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-07-17 11:31:04 +12:00
Paul Eggleton
f527692c7c Replace custom pagination with django-bootstrap-pagination
Simplify things a bit. We lose the digg-style pagination but the new
behaviour is good enough and improves maintainability.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-07-17 11:31:04 +12:00
Paul Eggleton
2ee1613363 requirements.txt: update versions
Update to the latest versions, with the exception of django-reversion
which I suspect will trigger some regressions; plus django-axes which
for some reason pip did not want to fetch 5.x versions of within the
container.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-07-17 11:31:04 +12:00
Amber Elliot
ecd584f609 requirements.txt: Require secure version of Django.
Change minimum required version of Django to 1.11.11.

Signed-off-by: Amber Elliot <amber.n.elliot@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-07-17 11:31:01 +12:00
Amber Elliot
0f3b3e42a6 Upgrade django-registration to version 3.0.
This involves changing how registration templates are referenced
and how the activation email is sent on user's email address change.

Signed-off-by: Amber Elliot <amber.n.elliot@intel.com>
2019-07-17 11:30:56 +12:00
Paul Eggleton
61dd9527ba requirements.txt: bump versions
Upgrade everything with the exception of django-registration 3.0 and
django-reversion 3.0.x which both require some work to migrate to.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-11-19 16:44:42 +13:00
Paul Eggleton
476348a598 requirements.txt: update GitPython dependencies
Upgrade GitPython and trim out old dependencies: gitdb and smmap are no
longer needed by current GitPython, gitdb2 and smmap2 have replaced
them.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-11-06 13:58:07 +13:00
Paul Eggleton
dff454815f Use django-axes to lockout after multiple failed logins
Repeated failed login attempts should trigger lockout to prevent
brute-forcing and user enumeration - django-axes does this using account
and IP-based lockout.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-11-06 13:58:03 +13:00
Paul Eggleton
631116a1c4 Replace nvd3 with Chart.js
nvd3 and its python/django wrappers appear to be no longer actively
maintained, and at least the wrappers were a bit clunky to use. Looking
around for a suitable replacement, Chart.js seems capable, has no
additional dependencies and is fairly simple to use. As a bonus we get
to drop a few Python dependencies from our list.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-11-06 10:33:39 +13:00
Paul Eggleton
49981aebf6 Add site-wide notice support
Add the ability to show a notice at the top of every page; this provides
the ability for admins to display a message to visitors in the case of
infrastructure or index data issues. Notices can have an expiry date and
can be disabled and re-enabled if needed. A subset of HTML can be used
for formatting the text, URLs will be made into clickable links, and
four "levels" are supported (info, success, warning and error).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-07-09 13:50:15 +02:00
Paul Eggleton
227b9c65af rrs_upstream_email: rework
* Use maintenance plans to get layerbranches
* Use from/to/subject and admin contact from maintenance plan
* Use an actual template to render the email (and drop tabulate
  dependency)
* Improve grammar in the email text
* Use a single line to represent the most recent commit

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Aníbal Limón
12d6909a70 requirements: Add tabular.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Paul Eggleton
97bb82225a requirements.txt: fix some conflicting requirements
pip (strangely only in the python 2 version when I test it here) reports
that some of the versions in requirements.txt were incompatible:

django-nvd3 0.9.7 has requirement python-nvd3==0.14.2, but you'll have
python-nvd3 0.15.0 which is incompatible.
django-registration 2.4.1 has requirement confusable-homoglyphs~=3.0,
but you'll have confusable-homoglyphs 2.0.2 which is incompatible.
python-nvd3 0.14.2 has requirement python-slugify==1.1.4, but you'll
have python-slugify 1.2.5 which is incompatible.

I'm not particularly keen on downgrading these but it seems like we
don't have much choice. Luckily looking over the changelogs it doesn't
seem like that will cause us any problems though.

Thanks to Yi Zhao <yi.zhao@windriver.com> for pointing this out.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:52:51 +12:00
Paul Eggleton
b4cfb049d9 requirements.txt: bump Django and other dependency versions
Since Django 1.8 is now out of support, and we've cleaned up the issues,
bump the Django requirement to 1.11 and update other dependencies at the
same time.

Fixes [YOCTO #12696] (requires preceding commits)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-01 10:10:21 +12:00
Paul Eggleton
611c96883c requirements.txt: use the most recent Django 1.8 version
Use <1.9 to always get the most recent 1.8 point release.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-03-26 08:29:27 +13:00
Paul Eggleton
1aeb5bbb57 requirements.txt: update some dependency versions
Use latest tested versions (though we pin djangorestframework at 3.6.4
since that is the last version that supports Django 1.8), and add new
resulting dependencies.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-02-20 16:45:54 +13:00
Paul Eggleton
64a34a98c0 requirements.txt: add missing dependencies
These are dependencies of items already listed in requirements.txt, so
nothing new.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-02-20 16:45:54 +13:00
Diana Thayer
2e671480c7 Asynchronous email notifications, task execution
This patch adds asynchronous task execution using a Celery backend
and RabbitMQ task queue, so that the layer submission process to
proceed even in the event that sending the notification email fails,
and establishing an asynchronous execution mechanism that we can use
in the future e.g. for triggering parse operations from the web UI.
This pertains to bug 11197:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=11197

It updates the README to reflect the installation and configuration
of a basic RabbitMQ setup, adds a 'tasks.py' file to contain task
definitions, updates the 'edit_layer_view' function to send
emails to administrators about new and updated layers asynchronously,
modifies the 'settings.py' to include a default configuration
for a RabbitMQ connection, and updates the Dockerfile to start a Celery
worker alongside the Gunicorn daemon.

Fixes [YOCTO #11197].

Signed-off-by: Diana Thayer <garbados@gmail.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-09-01 16:59:43 +12:00
Paul Eggleton
072c7d6656 requirements.txt: update to latest tested Django version
I neglected to update this at the time I updated the README recently.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-01-16 13:08:18 +13:00
Paul Eggleton
f268a3cfdb Update to Django 1.8
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-09-20 20:37:45 +12:00
Paul Eggleton
211e2fa3a5 Drop south migrations
These cannot be used with Django 1.8 and thus we need to remove them.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-09-20 20:37:45 +12:00
Paul Eggleton
82c632ca2d Upgrade to Django 1.6+
I'd like to be upgrading to 1.8 but that causes problems with South, and
we're not quite ready to dispense with our existing migrations yet.

Part of the implementation for [YOCTO #9620].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-12 11:33:08 +12:00
Alex Franco
8da2194bb6 requirements.txt: added GitPython
As it is needed for layerindex anyway

[YOCTO #7575]

Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
2015-10-07 11:34:34 +01:00
Alexandru DAMIAN
1d84f282de adding CORS policy for the API
We add the corsheaders application in order to
enable the CORS policy for the read-only REST API.

This is needed to allow AJAX queries to the layerindex
application from a browser environment.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-09-24 11:32:34 +01:00
Alexandru DAMIAN
1c9d6be527 expose REST API for layerindex
This patch enables a read-only REST API for the layerindex
application using Django REST Framework.

The objects of types Branch, LayerBranch and LayerItem are
exposed to queries so that the layerindex application can
function as a Layer Source in Toaster.

The library dependencies are documented in the requirements.txt
file.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-09-24 11:32:34 +01:00
Alexandru DAMIAN
99b9b014db adding environment description for virtualenv
General practice influenced by heroku.com is to create
a requirements.txt documenting the python library dependencies
for the project. This allows a user to easy setup a running
environment for the project using virtualenv and pip.

Extending .gitignore to ignore venv (reserved for virtualenv
use) and vim swap files.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-09-24 11:32:34 +01:00