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

  • Home
  • SEARCH
  • 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 6546779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:45:01+00:00 2026-05-25T11:45:01+00:00

Consider the following model: class FPModel(models.Model): # The user who created author = models.ForeignKey(auth.models.User,

  • 0

Consider the following model:

class FPModel(models.Model):
    # The user who created
    author = models.ForeignKey(auth.models.User, null=False)
    # The user who last edited
    editor = models.ForeignKey(auth.models.User, null=True)
    # Create Time
    created_at = models.DateTimeField(auto_now_add=True)
    # Modify Time
    edited_at = models.DateTimeField(auto_now=True)

    class Meta:
        abstract = True

I will be auto-populating the author and editor fields from django admin.

When I sync the database I am getting the following error:

(pinax-env)gautam@Aspirebuntu:$
 python manage.py syncdb
Error: One or more models did not validate:
FP.fpmodel: Accessor for field 'author' clashes with related field 'User.fpmodel_set'. Add a related_name argument to the definition for 'author'.
FP.fpmodel: Accessor for field 'editor' clashes with related field 'User.fpmodel_set'. Add a related_name argument to the definition for 'editor'.

I am using django 1.2.5 and pinax 0.7.2.

What should I do to solve this?

  • 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-05-25T11:45:01+00:00Added an answer on May 25, 2026 at 11:45 am

    I found the answer from the docs, specifically here and here.

    I have to use

    author = models.ForeignKey(auth.models.User , null = False ,related_name="%(class)s_related_author" ) # The user who created 
    editor = models.ForeignKey(auth.models.User , null = True,related_name="%(class)s_related_editor" ) # The user who last edited
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider the following django model from django.db import models from django.contrib import auth class
Consider the following Django models: class Host(models.Model): # This is the hostname only name
Consider the following models: class Person(models.Model): name = models.CharField(max_length=128) class Group(models.Model): name = models.CharField(max_length=128)
The problem is best explained by example, consider the following two models: class Topping(models.Model):
Let's consider the following model: class Item(models.Model): pass class TagType(models.Model): tag_name = models.CharField() tag_value_type
Consider the following example: class Base(models.Model): myfield = models.CharField() class Derived(Base): pass Now, the
Consider the following models and form: class Pizza(models.Model): name = models.CharField(max_length=50) class Topping(models.Model): name
Situation Consider I've got the following class structure: // a user model class UserModel
consider the following model: class Tweet(db.Model): text = db.StringProperty created_at = db.DateTimeProperty() class Company(db.Model):
Let's consider the following table models for sqlalchemy in python. class Worker(Base): id Column(Integer,

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.