I’m relatively new to Django. I’ve know about it for years and played with it a little but never anything more than youtube tutorials. I finally have a project that I would like to make and put on the internet but I’m having issues asking the right questions on how to do it.
Here’s my project:
I want to take vehicle vin numbers and filter them for key character sets to query my database and return information about the vehicle. Ive made this work in python with a SQLite database. Now I have my Django project with all the info in its database. I can add delete modify the data via the admin panel. When it comes to the GET request and either calling my current python script and just using the Django database or making Django do the work I’m not sure where to go or how to do it.
Any help or guidance on the best way to do this or maybe a direction or documentation that will help me would be much appreciated.
Thanks in advance
I’m not sure, wether I do understand You in the right way, so:
- You have a Database with the relevant data?
- You have a Django application, that is launchable and showing your data in the admin panel?
- You can do CRUD operations within the databse via the admin panel?
This is, what i’ ve got from your post. But - if I’m right with my assumptions - what exactly is the question behind ? What Do you want to do next?
Yes to all of the above.
I also have a view with and input box and submit button for a user to use.
Ill give you an example.
So i want a user to be able to input a vin number: ISRMX001A323
From this vin number I have a python script that will filter out relitive information based on make and model year. so it will pull this info
ISR MX 23
From this information I query my database and return the make, model, year, accessory information and vendors that specialize in providing other products to that vehicle.
I would like to know how to call that script and return to the user what the script returns. I am open to other methods of doing this Im just not sure the best way to do it to begin with.
So as I was often misunderstood when starting to post questions in this forum I have to ask You, what you mean with “scripts” in this context.
Sounds like you have to build a template, where the user can make his specifications, take this specifications as POST data and build a queryset over your database with it. In the end, you send back the results TO the user…is it that what You intend to do ?
If so, there would be numerous ways to achieve this goal…
Yes this is my goal.
When I say script I just mean a python file separate from django that I can run in visual studio with the VIN number, that will give me the basic info i’m looking for
Hm, I don’t really know what you mean with ‘visual studio’…I know the application, but i can not put it in this workflow in a meaningful way…
So, if you will try to manage your task with django, you should maybe consider reading this docs:
And especially for your questions for a better understanding:
Writing your first Django app, part 1
I always hated in the beginning, when people gave me links to read…but after a while I realized, that it is the only way it works
If you have specific questions afterwards, I am sure, everybody here is glad to help you out
I appreciate the direction. I want to learn how to use Django more that solve my problem so this is what I’m looking for. Thank you for your help.