Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8351663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:42:18+00:00 2026-06-09T08:42:18+00:00

I keep getting the following error message when trying to access the personal website

  • 0

I keep getting the following error message when trying to access the personal website I’m trying to build:

TypeError: render_page() takes exactly 2 arguments (1 given) 

I don’t even know how, as I’m using render_to_response() instead of calling render_page() directly, so I assume this kind of thing would be taken care of?

views.py:

from django.http import HttpResponse,Http404
from django.template import Template,Context
from django.template.loader import get_template
from django.shortcuts import *

navs = {"About Me":"/aboutme/","Teaching":"/teaching/","CV":"/cv/","Online":"/epresence/",
"Links":"/links/","Main":"/main/"}
def render_page(request,page):
    if page == "epresence":
        return epresence(request)
    elif page == "links":
        return links(request)
    elif page == "teaching":
        return teaching(request)
    else:
        return other(request,page)
def epresence(request):
    pagetitle = "My Online Presence"
    sites = {...}
    navitems = globals().get("navs")
    return render_to_response("epresence.html",locals())
def links(request):
    pagetitle = "Links"
    navitems = globals().get("navs")
    friends = {...
}
    idols = {...
}
    resources = {...}
    return render_to_response("links.html",locals())
def teaching(request):
    pagetitle = "Teaching"
    navitems = globals().get("navs")
    teach = [...]
    learn = [...]
    return render_to_response("teaching.html",locals())
def other(request,page):
    pages = {"about":"About Me","me":"About Me","cv":"CV","home":"Home","main":"Home",}
    patetitle = pages.get(page)
    navitems = globals().get("navs")
    return render_to_response("main.html",locals())

urls.py:

from django.conf.urls import patterns, include, url
from personalsite.views import *
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    url(r'^.*$',render_page),
)

Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T08:42:19+00:00Added an answer on June 9, 2026 at 8:42 am

    I’ve no idea what “I’m using render_to_response() instead of calling render_page() directly” means. You’re calling render_page from your urlconf – however, you’re not passing it any of the URL, because you’re not using a group in the regex.

    You should be capturing the parameter like this:

    url(r'^(?P<page>.*)$',render_page),
    

    (Note however this is a fairly strange thing to want to do. The whole point of the URLconf is to match against specific URLs and dispatch to specific view functions: so that you match epresence in the urlconf and get it to call the epresence function directly. Also, you should look into context processors to pass your navs dict to every template.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I keep getting the following error when trying to build the masstransit source from
I keep getting the following error message when trying to UPDATE one of my
I keep getting the following error message ERROR 1064 (42000): You have an error
I keep getting the following error when trying to run a login script I
I'm trying to get http://www.gelens.org/code/gevent-websocket/ running and keep getting the following error. socket_id=1 already
I keep getting the following error when trying to parse some html using BeautifulSoup:
I am trying to set SignalR up, but I keep getting the following error
Following Hartl's RailTutorial for Rails(3.2). I keep getting this error message or oddly a
What is wrong with the statement below? I keep getting the following error message....
I keep getting the following error message when I run my code in debug.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.