<div class="spoler">
<a href="#" class="spoiler" data-spoiler-link="1" >{{ faqed.title }}</a>
<p class="spoiler-content" data-spoiler-link="1" >{{ faqed.text }}</p>
</div>
<div class="spoler">
<a href="#" class="spoiler" data-spoiler-link="2" >{{ faqed.title }}</a>
<p class="spoiler-content" data-spoiler-link="2" >{{ faqed.text }}</p>
</div>
def aboutViews(request):
aboutText = about.objects.get(title = "Главное для нас - постоянный клиент им может стать каждый")
aboutPost1 = about.objects.get(title ="Прозрачные условия")
aboutPost2 = about.objects.get(title ="Постоянство — основа партнерских отношений")
aboutPost3 = about.objects.get(title ="Оформить просто")
aboutPost4 = about.objects.get(title ="Оперативно")
aboutPost5 = about.objects.get(title ="")
return render(request, 'about/about.html', {'aboutText' : aboutText ,
'aboutPost1':aboutPost1 ,
'aboutPost2':aboutPost2 ,
'aboutPost3':aboutPost3 ,
'aboutPost4':aboutPost4 ,
'aboutPost5':aboutPost5 ,
})
def contact_Form(request):
form = contactForm(request.POST)
return render(request, 'about/about.htmk', {'fomr':form})
ObjectDoesNotExist at /profiles/
User has no profile.
Request Method: GET
Request URL: http://localhost:8000/profiles/
Django Version: 2.0.1
Exception Type: RelatedObjectDoesNotExist
Exception Value:
User has no profile.
Exception Location: C:\Phyton\lib\site-packages\django\db\models\fields\related_descriptors.py in __get__, line 389
Python Executable: C:\Phyton\python.exe
Python Version: 3.6.4
Python Path:
['E:\\work\\life',
'C:\\Phyton\\python36.zip',
'C:\\Phyton\\DLLs',
'C:\\Phyton\\lib',
'C:\\Phyton',
'C:\\Phyton\\lib\\site-packages']
Server time: Вт, 10 Апр 2018 16:44:40 +0000
Traceback Switch to copy-and-paste view
C:\Phyton\lib\site-packages\django\core\handlers\exception.py in inner
response = get_response(request) ...
▶ Local vars
C:\Phyton\lib\site-packages\django\core\handlers\base.py in _get_response
response = self.process_exception_by_middleware(e, request) ...
▶ Local vars
C:\Phyton\lib\site-packages\django\core\handlers\base.py in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs) ...
▶ Local vars
C:\Phyton\lib\site-packages\django\contrib\auth\decorators.py in _wrapped_view
return view_func(request, *args, **kwargs) ...
▶ Local vars
C:\Phyton\lib\contextlib.py in inner
return func(*args, **kwds) ...
▶ Local vars
E:\work\life\profiles\views.py in update_profile
profile_form = ProfileForm(instance=request.user.profile) ...
▶ Local vars
C:\Phyton\lib\site-packages\django\utils\functional.py in inner
return func(self._wrapped, *args) ...
▶ Local vars
C:\Phyton\lib\site-packages\django\db\models\fields\related_descriptors.py in __get__
self.related.get_accessor_name() ...
▶ Local vars