Skip to content

Day 53 - 56: Django registration_form.html possibly missing action #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ericchou1 opened this issue Jun 7, 2019 · 4 comments
Closed
Assignees

Comments

@ericchou1
Copy link
Contributor

ericchou1 commented Jun 7, 2019

Hi, I could be wrong, but it 'seems' to me that the registration_form.html downloaded and unzip from repository was missing the view in the action? Maybe some default function in django_registration.backends.activation.urls?

This was the default registration_form.html:

<h2>Sign up today!</h2>
<form class="pure-form pure-form-stacked" method="post" action=".">
  {% csrf_token %}

I followed the instruction video to set up urls.py under mysite, which directs to django_registration.backends.activation.urls; not sure where that urls.py have associated functions in another views.py file somewhere.

I will rewatch the videos again to make sure I did not miss anything. Thanks!

@ericchou1 ericchou1 changed the title Day 53 - 56: Django registration_form.html missing action Day 53 - 56: Django registration_form.html possibly missing action Jun 7, 2019
@ericchou1
Copy link
Contributor Author

I understand the part about blank or '.' action goes to the view (https://stackoverflow.com/questions/42195432/django-registration-registration-form). The project urls.py and templates were followed exactly by the steps in the video to the best of my ability:

mysite/urls.py

urlpatterns = [
    path('', include('quotes.urls')),
    path('my-backend/', admin.site.urls),
    path(r'accounts/', include('django_registration.backends.activation.urls')),
    path(r'accounts/', include('django.contrib.auth.urls')),
]

tree structure under mysite/templates/:

(venv) :templates $ tree .
.
├── base.html
├── django_registration
│   ├── activation_complete.html
│   ├── activation_email_body.txt
│   ├── activation_email_subject.txt
│   ├── activation_failed.html
│   ├── registration_closed.html
│   ├── registration_complete.html
│   └── registration_form.html
└── registration
    ├── login.html
    ├── logout.html
    ├── password_change_done.html
    ├── password_change_form.html
    ├── password_reset_complete.html
    ├── password_reset_confirm.html
    ├── password_reset_done.html
    ├── password_reset_email.html
    ├── password_reset_email.txt
    └── password_reset_form.html

2 directories, 18 files

Maybe this is better redirected to Slack?

@bbelderbos bbelderbos self-assigned this Jun 8, 2019
@bbelderbos
Copy link
Collaborator

Yep discussing on Slack and will document solution here ...

@ericchou1
Copy link
Contributor Author

Seems to be something I missed since @bbelderbos was able to follow the same steps again without error.

@mikeckennedy
Copy link
Member

Thank you guys!

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

No branches or pull requests

3 participants