This site can’t be reached error

2022-04-08 Thread Treasure Kahitu
Hi all, I am new to django and need a bit of help. I am using VS Code and I used the following port http://127.0.0.1:8000/ to access my django webpage. When I first entered the port in my browser yesterday, it worked and read "The install worked successfully" Today I did a bit of coding in VS Cod

Re: NameError:

2022-04-08 Thread Antonis Christofides
Hi! In the line where the error occurs, Pharmacist has not been defined yet. Move your Pharmacist model before your Patients model. Regards, Antonis On 08/04/2022 20.49, tech george wrote: Hello, I've been struggling with the below error, what might be the problem? I have used the same Fo

NameError:

2022-04-08 Thread tech george
Hello, I've been struggling with the below error, what might be the problem? I have used the same ForeignKey in other models.. all works ok, except this. Please advise. *Models:* class CustomUser(AbstractUser): user_type_data = ((1, "AdminHOD"), (2, "Pharmacist"), (3, "Doctor"), (4, "Pharm

file upload to folder based on selected category on form

2022-04-08 Thread Trippy Samurai
Hello, In my website i am uploading the documents and has title, category(choice field) and file upload on my website, here the file upload stores normally on the admin but how can i store the file inside the seperate folder based on the selected category for ex if the file i am uploading belong