Book

122 views
Skip to first unread message

Kevin Tuo

unread,
Feb 1, 2024, 2:14:30 AM2/1/24
to django...@googlegroups.com
Hello, Please can I get a book for building a portfolio website with django?


Envoyé à partir de Outlook pour Android

Obam Olohu

unread,
Feb 3, 2024, 4:16:23 PM2/3/24
to django...@googlegroups.com
why don't you learn directly from a tutor?


On Thu, Feb 1, 2024 at 3:14 AM Kevin Tuo <tuok...@gmail.com> wrote:
Hello, Please can I get a book for building a portfolio website with django?


Envoyé à partir de Outlook pour Android

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/AS4PR09MB55764DA8881C3AB572B7468AFA7C2%40AS4PR09MB5576.eurprd09.prod.outlook.com.

BUHNYUY RONALD

unread,
Feb 3, 2024, 5:46:17 PM2/3/24
to django...@googlegroups.com
Greetings. Saying just a portfolio site, basically there will no Django book that will teach u that. U have to get a tutor and start from a base. I do offer some Django courses from beginner level to advanced

Kevin Tuo

unread,
Feb 3, 2024, 6:00:58 PM2/3/24
to django...@googlegroups.com
Good idea, Thanks!

Envoyé à partir de Outlook pour Android

From: django...@googlegroups.com <django...@googlegroups.com> on behalf of Obam Olohu <oloh...@gmail.com>
Sent: Saturday, February 3, 2024 4:15:02 PM
To: django...@googlegroups.com <django...@googlegroups.com>
Subject: Re: Book
 

Kevin Tuo

unread,
Feb 3, 2024, 6:00:59 PM2/3/24
to django...@googlegroups.com
Thanks for advice sir; I will do that!
Nice weekend!

Envoyé à partir de Outlook pour Android

From: django...@googlegroups.com <django...@googlegroups.com> on behalf of BUHNYUY RONALD <buhnyu...@gmail.com>
Sent: Saturday, February 3, 2024 5:17:16 PM

Janet Anastacia

unread,
Feb 8, 2024, 5:29:53 PM2/8/24
to django...@googlegroups.com
RE: DJANGO MODELS
i have created an application called expense in django which has two fields in the models.py file which looks like class Transactions(models.Model):
    income = models.IntegerField(null=False, blank=False)
    expense = models.IntegerField(null=False, blank=False)

want my application to allow users to enter their expense and income themselves and these fields must be provided, it should not be empty. But when i run the command python manage.py makemigrations i get the this: It is impossible to add a non-nullable field 'expense' to transactions without specifying a default. This is because the database needs something to populate existing rows.
Please select a fix: 1) Provide a one-off default now (will be set on all existing rows with a null value for this column) 2) Quit and manually define a default value in models.py. Select an option: Please select a valid option: Please select a valid option:
i have chosen option 2 but still got the same prompt. how do solve this.


Ruby

unread,
Feb 8, 2024, 7:50:47 PM2/8/24
to django...@googlegroups.com
You are getting this because the database needs to have a value for existing row(s), you can set default value or make the new field nullable
Either of these would work for you

Transactions(models.Model):
    income = models.IntegerField(null=True, blank=True)
    expense = models.IntegerField(null=True, blank=True)


Or


Transactions(models.Model):
    income = models.IntegerField(default=0)
    expense = models.IntegerField(default=0)

Reply all
Reply to author
Forward
0 new messages