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 8427221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:43:44+00:00 2026-06-10T04:43:44+00:00

When i added a form to just add the phone number everything worked properly.

  • 0

When i added a form to just add the phone number everything worked properly.

however when i added the field for full_name, i get this error:

ViewDoesNotExist at /phone/ Could not import accounts.views.add_phone. View does not exist in module accounts.views..

This is the code:

views.py

class PhoneForm(forms.Form):
    phone = forms.IntegerField()
    full_name = forms.Charfield()



def add_phone(request):

if request.method == 'POST':
    form = phone_name_form(request.POST)

    if form.is_valid():

        phone = form.cleaned_data['phone'] 
        #fullname = form.cleaned_data['fullname']

        user = request.user

        #store phone number to user profile
        user.get_profile().phone = phone
        user.get_profile().save()

        #store fullname in the "firstname" field for User
       # print "fullname"
        #print fullname

        return HttpResponseRedirect("/menu/")

else:
    form = phone_name_form() #an unbound form

return render_to_response("phone_form.html", {'form' : form}, context_instance=RequestContext(request))

phone_form.html

<form action="" method="post">{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Submit" />
</form>

urls.py

from django.conf.urls import patterns, include, url
from django.conf import settings


from django.contrib import admin 
admin.autodiscover()

urlpatterns = patterns('',
url(r'^signup/$', 'accounts.views.signup'),
url(r'^accounts/', include('registration.backends.simple.urls')),
url(r'^phone/$', 'accounts.views.add_phone'),
url(r'^users/', 'accounts.views.register_complete'),


url(r'^$', 'food.views.menu'),
url(r'^menu/$', 'food.views.menu'),
url(r'^menu/(?P<hour>\d+)/$', 'food.views.menu_hour'),
url(r'^menu/(?P<hour>\d+)/(?P<food>\w+)/$', 'cart.views.add_to_cart_view'),

url(r'^images/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
url(r'^cart/', include('cart.urls')),

url(r'^checkout/', 'cart.views.checkout'),


#url(r'^menu/12/$', 'food.views.menu_hour'),

# Examples:
# url(r'^$', 'foodchute.views.home', name='home'),
# url(r'^foodchute/', include('foodchute.foo.urls')),

# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),

)

  • 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-10T04:43:46+00:00Added an answer on June 10, 2026 at 4:43 am

    I misspelled “CharField”. i didn’t capitalize the “F”, and once i fixed that, it now works. That is such a strange bug….

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

Sidebar

Related Questions

I just have a form, and using this.Controls.Add in the form I have added
Whenever I POST a form, I display error messages. However, the way I add
I added datagridview on form. set property- scrollBar : Both dynamically I add data
I generated a new form using sean-gen (seam new-form) and added another field to
For this particular existing form there is an input to accept phone numbers. It
I have created the following form with qt designer. I added a Add Files
Yeah this is a pretty simple topic, but my form just isn't updating the
I just added an ElementHost to a windows Form(There are some other c# code
I have a client that wants to have a custom form added as a
In Delphi 2010, I have placed 2 radio groups onto a form then added

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.