class HomeTests(TestCase): def setUp(self): self.board = Board.objects.create(name='Django', description='Django board.') url = reverse('home') self.response = self.client.get(url) def test_home_view_status_code(self): self.assertEquals(self.response.status_code, 200) def test_home_url_resolves_home_view(self): view = resolve('/') self.assertEquals(view.func, home) def test_home_view_contains_link_to_topics_page(self): board_topics_url = reverse('board_topics', kwargs={'pk': self.board.pk}) self.assertContains(self.response, 'href="{0}"'.format(board_topics_url))
Please when I run python manage.py test I gets
IndentationError : unident does not match any outer indentation level.
HI Umar kambala
Waaw thanks for that brotherly advice given. Am really really grateful. Will try to do just that. Thanks once again.
Plz another problem is that when I run python manage.py runserver everything works find but when I opens my browser I gets "no internet connection" what might be de problem? Thanks
--
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...@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/dfea6e65-cd35-062e-14b0-8abdd210f4a8%40stacktrace.dk.
For more options, visit https://groups.google.com/d/optout.
Am being using de django server which is 127.0.0.1 and never had any problem till today.
Thanks
the error states the issue: your computer is not connected to the internet.
--
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...@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/325da760-20bb-44d2-8a81-966d0ce43b0c%40googlegroups.com.
Thank Roger
--
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...@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/1531070000.25821.9.camel%40gammascience.co.uk.
I have been getting this error
ValueError at /signup/
The view accounts.views.signup didn't return an HttpResponse object. It returned None instead.
This are the codes
accounts/views.py
from django.contrib.auth import login as auth_login from django.contrib.auth.forms import UserCreationForm from django.shortcuts import render, redirect def signup(request): if request.method == 'POST': form = UserCreationForm(request.POST) if form.is_valid(): user = form.save() auth_login(request, user) return redirect('home') else: form = UserCreationForm() return render(request, 'signup.html', {'form': form})