Skip to content

Commit

Permalink
Fix stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
odinuge committed Jan 1, 2019
1 parent d82371d commit fec8b12
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 144 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ parts
*.DS_STORE
build/*
itdagene/files/uploads/
itdagene/files/static/lib/
itdagene/files/static/
itdagene/uploads/
env/
venv/
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ $ source venv/bin/activate
$ python manage.py runserver
```

## Python 3.7
Since celery [doesn't support python 3.7 yet](venv/lib/python3.7/site-packages/celery/backends), run `./fix-celery.sh` to fix it.


## Migrations

In order to setup a new dev environment you have to create a superuser. Every time there are new migrations, you have to apply them. If you don't, the `runserver` command will give you a warning.
Expand Down
9 changes: 9 additions & 0 deletions fix-celery.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

TARGET=venv/lib/python3.7/site-packages/celery/backends
cd $TARGET
if [ -e async.py ]; then
mv async.py asynchronous.py
sed -i 's/async/asynchronous/g' redis.py
sed -i 's/async/asynchronous/g' rpc.py
fi
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions itdagene/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth.views import LogoutView
from django.http import HttpResponsePermanentRedirect
from django.urls import include, re_path, reverse
from django.views.decorators.csrf import csrf_exempt
Expand All @@ -16,8 +17,7 @@
handler500 = error500

urlpatterns = [
# re_path(r'^logout/$', logout,
# {'next_page': inside}),
re_path(r"^logout/", LogoutView.as_view(next_page="/"), name="logout"),
re_path(r'^$', frontpage, name="itdagene.frontpage.public"),
re_path(r'^dashboard/$', inside, name="itdagene.frontpage.inside"),
re_path(r'^users/', include('itdagene.app.users.urls')),
Expand Down
Loading

0 comments on commit fec8b12

Please sign in to comment.