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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:53:50+00:00 2026-06-01T18:53:50+00:00

My UserProfile was working fine until I changed the model and form. I added

  • 0

My UserProfile was working fine until I changed the model and form. I added a DateField in model and updated my Forms.py and template. Also did a syncdb.

profile/models.py

class UserProfiles(models.Model):
    user = models.OneToOneField(User)
    #other fields here
    birthday = models.DateField()

profile/forms.py

class UserProfileForm(ModelForm):
    class Meta:
        model = UserProfiles
        fields = ('some_field', 'birthday', 'otherfields')

profile/views.py

def editprofile(request):
    return render_to_response('profile_edit.html', {'form':UserProfileForm()}, context_instance=RequestContext(request))

This is the error it is throwing.

Traceback:
File "C:\Python27\lib\site-packages\django\core\handlers\base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "E:\django-sample\proschools\..\proschools\profile\views.py" in generateprofile
  12.             userprofile = UserProfiles.objects.get(user=request.user)
File "C:\Python27\lib\site-packages\django\db\models\manager.py" in get
  132.         return self.get_query_set().get(*args, **kwargs)
File "C:\Python27\lib\site-packages\django\db\models\query.py" in get
  344.         num = len(clone)
File "C:\Python27\lib\site-packages\django\db\models\query.py" in __len__
  82.                 self._result_cache = list(self.iterator())
File "C:\Python27\lib\site-packages\django\db\models\query.py" in iterator
  273.         for row in compiler.results_iter():
File "C:\Python27\lib\site-packages\django\db\models\sql\compiler.py" in results_iter
  680.         for rows in self.execute_sql(MULTI):
File "C:\Python27\lib\site-packages\django\db\models\sql\compiler.py" in execute_sql
  735.         cursor.execute(sql, params)
File "C:\Python27\lib\site-packages\django\db\backends\util.py" in execute
  34.             return self.cursor.execute(sql, params)
File "C:\Python27\lib\site-packages\django\db\backends\mysql\base.py" in execute
  86.             return self.cursor.execute(query, args)
File "C:\Python27\lib\site-packages\MySQLdb\cursors.py" in execute
  174.             self.errorhandler(self, exc, value)
File "C:\Python27\lib\site-packages\MySQLdb\connections.py" in defaulterrorhandler
  36.     raise errorclass, errorvalue

Exception Type: OperationalError at /profile/
Exception Value: (1054, "Unknown column 'profile_userprofiles.birthday' in 'field list'")
  • 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-01T18:53:52+00:00Added an answer on June 1, 2026 at 6:53 pm

    If the table existed before you added the new column syncdb will not add new columns to it! syncdb does not alter existing tables. Consider using Django south or else add the column manually.

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

Sidebar

Related Questions

I'm currently working on a django project. I'm attempting to add a UserProfile model
I'm trying to test that a UserProfile model is created as a new User
I have these models: class UserProfile(models.Model): user = models.OneToOneField(User) #etc class Organization(models.Model): users =
I am working on integration of django application with facebook and i did almost
In my application I have an extended User model called UserProfile. This user can
If think my question is pretty obvious and almost every developer working with UserProfile
In a custom Form, how does one validate a Model's field's uniqueness (i.e., has
Currently I have a fully working Register form. However I now need add the
I've extended Django's contrib.auth.models user like: class UserProfile(models.Model): user = models.ForeignKey(User, related_name = 'profile')
I'm using django-registration for registration and login purpose. My Models and Forms.py are working

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.