Skip to content

django2: add django version 2 and packages needed by etesync [RFC]#9864

Closed
peter-stadler wants to merge 7 commits into
openwrt:masterfrom
peter-stadler:django2
Closed

django2: add django version 2 and packages needed by etesync [RFC]#9864
peter-stadler wants to merge 7 commits into
openwrt:masterfrom
peter-stadler:django2

Conversation

@peter-stadler
Copy link
Copy Markdown
Contributor

@peter-stadler peter-stadler commented Aug 29, 2019

Maintainer: Peter Stadler peter.stadler@student.uibk.ac.at
Compile tested: MIPS 74K, Asus RT-N16, master snapshot
Run tested: MIPS 74K, Asus RT-N16, master snapshot, open http://ro.ut.er.ip:8001/ in browser while running:

python3 /usr/bin/django-admin.pyc startproject mysite && \
cd mysite && \
echo 'STATIC_ROOT = os.path.join(BASE_DIR, "static/")' \
    >> mysite/settings.py && \
sed -i "s/ALLOWED_HOSTS = \[.*\]/ALLOWED_HOSTS = \[\"$(uci get network.lan.ipaddr)\"\]/" \
    mysite/settings.py && \
python3 ./manage.py collectstatic && \
python3 ./manage.py runserver 0.0.0.0:8001 && \
cd .. && rm -r mysite

Description:
The following five packages will allow to run etesync as django app:

  1. sqlparse: is a dependency for django2
  2. django2: is version 2.x of django for python3 and can superseed python3-django (version 1.x) if its other dependent packages are ported to use it, too.
  3. django2-cors-headers: is a dependency for django2-etesync-journal
  4. django2restframework: is a dependency for django2-etesync-journal
  5. drf-nested-routers: is a dependency for django2-etesync-journal

Se my other PR for etesync-server that contains django2-etesync-journal and a configuration for running it with uwsgi on nginx (etesync-uwsgi).

Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
…n3-django version 1.x)

Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
@peter-stadler peter-stadler changed the title django2: add django version 2 and packages needed by etesync django2: add django version 2 and packages needed by etesync [RFC] Aug 29, 2019
@jefferyto
Copy link
Copy Markdown
Member

Ping @commodo

@commodo
Copy link
Copy Markdown
Contributor

commodo commented Sep 2, 2019

i am planning to upgrade python-django to a newer version (like 2.2.4) these days/weeks;
i would not add a new django2 duplicate just for this new package (etesync);

the blocker for upgrading this sooner is seafile which needs re-validation with a newer django;

this also seems this is duplicating django-restframework

curios: would etesync work with Python3?
I would try to go in that direction with django, if possible;
there is some current effort to move to Python3 also here for OpenWrt.

Comment thread lang/python/sqlparse/Makefile Outdated
endef

$(eval $(call Py3Package,sqlparse))
$(eval $(call BuildPackage,sqlparse))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure here;
maybe let's rename this to python3-sqlparse or at least python-sqlparse

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, python3-sqlparse is better, I did change that.

All proposed packages are only for Python 3as the python/README.md says:

From 31 May 2019 onward, absolutely no new Python 2 packages will be accepted

Then, I would wait for the update of python-django without introducing a new package. (There would be also a fallback possibility as seafile is using the Python 2 version of django: We could use the 2.2.5 version of django only for python3-django. But, this is maybe too confusing. At least this confusion could not be longer than until "The Snap" off the Python 2 packages.)

And you are right, too, that the django2restframework will then be obsolete. I would remove it then.

@commodo
Copy link
Copy Markdown
Contributor

commodo commented Sep 2, 2019

curios: would etesync work with Python3?

my bad here: i am got confused about 2 ; it's django2 and not python2;

@peter-stadler
Copy link
Copy Markdown
Contributor Author

I see that the names django2… are confusing. As the python3-django will be version 2.2.x, I would rename the packages to django-… :-)

Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
@peter-stadler
Copy link
Copy Markdown
Contributor Author

Closing this PR as I split it up (the three new PRs are linked):

  1. sqlparse
  2. use python3-django instead of django2 as @commodo updated python3-django to version 2.x.
  3. django-cors-headers
  4. django2restframework is obsolete since 2. :-)
  5. drf-nested-routers

I will add a PR for the django-etesync-journal later and update the PR for the etesync-server, too.

@peter-stadler peter-stadler deleted the django2 branch February 4, 2020 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants