Adds setup view
This commit is contained in:
parent
e9397eaedd
commit
c31ec7dbd5
5 changed files with 50 additions and 0 deletions
|
@ -113,6 +113,7 @@ from .reading import ReadingStatus
|
|||
from .report import Report
|
||||
from .rss_feed import RssFeed
|
||||
from .search import Search
|
||||
from .setup import CreateAdmin
|
||||
from .status import CreateStatus, EditStatus, DeleteStatus, update_progress
|
||||
from .status import edit_readthrough
|
||||
from .updates import get_notification_count, get_unread_status_string
|
||||
|
|
18
bookwyrm/views/setup.py
Normal file
18
bookwyrm/views/setup.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
""" Installation wizard 🧙 """
|
||||
from django.template.response import TemplateResponse
|
||||
from django.utils.decorators import method_decorator
|
||||
from django.views import View
|
||||
|
||||
from bookwyrm import emailing, forms, models
|
||||
|
||||
|
||||
# pylint: disable= no-self-use
|
||||
class CreateAdmin(View):
|
||||
"""manage things like the instance name"""
|
||||
|
||||
def get(self, request):
|
||||
"""Create admin user"""
|
||||
data = {
|
||||
"register_form": forms.RegisterForm()
|
||||
}
|
||||
return TemplateResponse(request, "setup/admin.html", data)
|
Loading…
Add table
Add a link
Reference in a new issue