I get the following warning after creating content.
File "C:\bt\products\urls.py", line 2, in <module>
from . import views
File "C:\bt\products\views.py", line 29
messages.success(request, 'Your profile was updated.')
^
TabError: inconsistent use of tabs and spaces in indentation
views.py
def create(request):
form = ProductForm(request.POST or None)
if form.is_valid():
form.save()
messages.success(request, 'Your content was create.')
context = { 'form': form }
return render(request, "products/create.html", context)
urls.py
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='product-index'),
path('create/', views.create, name='product-create'),
path('<int:id>/', views.detail, name='detail'),
#path('<int:product_id>/', views.productDelete, name='delete'),
]
Could you help? Thank you.