Django admin login

Hi dear Mr.Whitesell .
I hope you are fine .
I have done what you told me in this quotation as yoy can see in code below .

class SpecialFoodAdmin(admin.ModelAdmin):
     def save(self, *args, **kwargs):
          if self.lunchName != "pasta":
               super().save(*args, *kwargs)

But when I create an object with the lunch name of pasta, it still saves that object that is not what I want . Is it possible to give me a guidance to how to solve it ?
Thanks .
Kind regards .

(Not the ModelAdmin)

See Models | Django documentation | Django

1 Like

Thanks it has been ok now .

Hi dear Mr.Whitesell.
I hope you are fine .
My restaurant project has just finished now.
I want to ask is there anyway to upload my project without using git ?
Because I only want to upload my django project in the earliest time .
Thanks .
Kind regards.

“Upload” to where? For what purpose?

Upload to a web hosting
For only having the link of that project in the internet to show to those people that I want (only for this purpose)

Ok, so it sounds like you’re actually trying to deploy your project.

Deploying a Django project is considerably more than just uploading files to a server somewhere.

See Deploying Django | Django documentation | Django and Deployment checklist | Django documentation | Django for the information you will need.

Dear Mr.Whitesell I have seen this page before but I do not want to deploy by git .
Do you know any easier ways to deploy my project?

Where do you see git being referenced in either page as being part of the deployment?