[Django] #29674: Error with ForeignKey model, after add this model

3 views
Skip to first unread message

Django

unread,
Aug 15, 2018, 7:28:37 AM8/15/18
to django-...@googlegroups.com
#29674: Error with ForeignKey model, after add this model
-----------------------------------------+------------------------
Reporter: Rixkz | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 2.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
When i config model file and do some migration, so if first time I do
created model with CharField, TextField (it’s dosen’t matter what models
you’ve created) and “ForeignKey”, it’s fine if I had create my model by
this order and do some makemigrations and migrate it’s work well.
When I’ve created model CharField and TextField (without ForeignKey model)
and do migrations it will pass BUT!! If I need to put models “ForeignKey”
to my model class I can pass with makemigrations step but it’s error on
migrate command output the error is ValueError: invalid literal for int()
with base 10: 'auth.User'

--
Ticket URL: <https://code.djangoproject.com/ticket/29674>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 15, 2018, 7:32:18 AM8/15/18
to django-...@googlegroups.com
#29674: Error with ForeignKey model, after add this model
-------------------------------+--------------------------------------

Reporter: Rixkz | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 2.1
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Rixkz):

* Attachment "bug.txt" added.

Django

unread,
Aug 15, 2018, 8:16:39 AM8/15/18
to django-...@googlegroups.com
#29674: Error with ForeignKey model, after add this model
-------------------------------+--------------------------------------

Reporter: Rixkz | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 2.1
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by Zach Bresser):

Can you post your models.py?

--
Ticket URL: <https://code.djangoproject.com/ticket/29674#comment:1>

Django

unread,
Aug 15, 2018, 10:42:39 AM8/15/18
to django-...@googlegroups.com
#29674: Error with ForeignKey model, after add this model
----------------------------+--------------------------------------
Reporter: Rixkz | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 2.1
Severity: Normal | Resolution: needsinfo

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------------------------
Changes (by Tim Graham):

* status: new => closed
* resolution: => needsinfo
* component: Uncategorized => Migrations


Comment:

As Zach said, we need specific steps to reproduce, perhaps even a sample
app with migrations that reproduces the issue. It's impossible to tell
from the report how to reproduce the problem to determine if it's a bug in
Django or a mistake in your project.

--
Ticket URL: <https://code.djangoproject.com/ticket/29674#comment:2>

Reply all
Reply to author
Forward
0 new messages