When you run makemigrations command, Django will compare your current model
module with the newest migration module. You should have a look at your
0002_signup_updated... file to find out what cause the problem.
On Thursday, January 28, 2016 at 3:21:16 AM UTC+8, ofeyofey wrote:
>
> Hi,
> I
On Wednesday, 27 January 2016 21:29:18 UTC, ofeyofey wrote:
>
> No problem. Thanks for your help.
> Maybe fields can't be added to a model with django.
> I will try dropping the table in the DB and see what happens.
> Thanks again,
>
Adding fields to models is quite literally what migrations are
Alas too late... I have dropped the table.
But this link http://www.djangobook.com/en/2.0/chapter10.html
to a Django Book for version 1.0 may hold some ideas under the section
about adding fields.
Thanks
On Wednesday, 27 January 2016 19:21:16 UTC, ofeyofey wrote:
>
> Hi,
> I forgot to add a
You should try running it as root.
On Thu, Jan 28, 2016 at 8:29 AM, ofeyofey wrote:
> No problem. Thanks for your help.
> Maybe fields can't be added to a model with django.
> I will try dropping the table in the DB and see what happens.
> Thanks again,
>
> On Wednesday,
No problem. Thanks for your help.
Maybe fields can't be added to a model with django.
I will try dropping the table in the DB and see what happens.
Thanks again,
On Wednesday, 27 January 2016 19:21:16 UTC, ofeyofey wrote:
>
> Hi,
> I forgot to add a field to a model and wish to add it now.
> I
i dont know why sorry..try default value
Τη Τετάρτη, 27 Ιανουαρίου 2016 - 9:21:16 μ.μ. UTC+2, ο χρήστης ofeyofey
έγραψε:
>
> Hi,
> I forgot to add a field to a model and wish to add it now.
> I added the line to models.py but makemigrations and migrate aren't
> working now.
> Is this possible
Ok I put the app name which is 'news' after the commands for makemigrations
and for migrate.
But I am still getting the same results.
On Wednesday, 27 January 2016 19:21:16 UTC, ofeyofey wrote:
>
> Hi,
> I forgot to add a field to a model and wish to add it now.
> I added the line to models.py
you add your app name after the run makemigration and migrate ?if your app
name is a blog then you run* makemigration blog *and *migrate blog*
Τη Τετάρτη, 27 Ιανουαρίου 2016 - 9:21:16 μ.μ. UTC+2, ο χρήστης ofeyofey
έγραψε:
>
> Hi,
> I forgot to add a field to a model and wish to add it now.
> I
Hi,
I changed the line to
updated = models.DateTimeField(auto_now_add = False, auto_now = True, null=
True)
But the same results,
[pi@Huawei-HG658c-instalacion src]$ python manage.py makemigrations
/home/pi/src/djangoTest/urls.py:20: RemovedInDjango110Warning: Support for
string view
work now ?
Τη Τετάρτη, 27 Ιανουαρίου 2016 - 9:21:16 μ.μ. UTC+2, ο χρήστης ofeyofey
έγραψε:
>
> Hi,
> I forgot to add a field to a model and wish to add it now.
> I added the line to models.py but makemigrations and migrate aren't
> working now.
> Is this possible in Django or do i need to go
Thanks for your reply.
The model.py contains,
class SignUp(models.Model):
email = models.EmailField()
full_name = models.CharField(max_length = 120, blank = True, null =
True)
timestamp = models.DateTimeField(auto_now_add = True, auto_now = False)
updated =
no the problem is your new field affect models rules...try the new field to
have null=True or default=somathing and then run on mynage.py makemigration
yourapp and after migrate yourapp
christos
Τη Τετάρτη, 27 Ιανουαρίου 2016 - 9:21:16 μ.μ. UTC+2, ο χρήστης ofeyofey
έγραψε:
>
> Hi,
> I forgot
What error did your get? what command did you use?
try
python manage.py makemigrations
python manage.py migrate
On Wed, Jan 27, 2016 at 11:21 AM, ofeyofey wrote:
> Hi,
> I forgot to add a field to a model and wish to add it now.
> I added the line to models.py but
Hi,
I forgot to add a field to a model and wish to add it now.
I added the line to models.py but makemigrations and migrate aren't working
now.
Is this possible in Django or do i need to go directly tp the sqlite DB and
do it using SQL?
Thanks
Currently following this tutorial
14 matches
Mail list logo