Once post ur forms.py file. Check views and url files. There are errrors
On Tue 11 Dec, 2018 7:55 pm Tosin Ayoola <tosinayoola0@gmail.com wrote:
--getting this error when i click on a new link i just added please can anyone help out below is my codes, views, url##urlfrom django.urls import path
from . import views
urlpatterns = [
path('', views.index, name = 'index'),
path('dailytask', views.dailyactivities, name = 'dailyactivities'),
]## views
from django.shortcuts import render, redirect
from . import models
from . forms import DailyTaskForm
def index(request):
return render(request, 'index.html')
def dailyactivities(request):
tasks = DailyTaskForm(request.method == 'POST' or None)
if request.method == 'POST' and tasks.is_valid()\
and tasks.cleaned_data():
tasks.save()
return render(request, 'index')
return redirect(request, 'dailychoresform.html')
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHLKn70uUYa4j5Bd-6fv8UeuitLx0W4JefAi7Hid84%2BP1SzMLg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMsYeuF4ZZBjUcxRpgt0NAjs3okSouh_nZxotPZaRNXDCQF_4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment