Hi there,
On 2018-07-04 20:02, chaitanya.140180107...@gmail.com wrote:
I am beginner...
I want a Django project to import csv file and represent it in html page.
...please
I assume you have already followed the excellent Django tutorial at:
https://docs.djangoproject.com/en/2.0/intro/
So you understand the basics of how Django works with models, views,
templates etc.
As to your specific question. Assuming the CSV file is well defined, I
would probably write a model defining the fields in the CSV file and
then use the python CSV module
(https://docs.python.org/3/library/csv.html) for reading the CSV file
and filling out the fields in the model when the CSV file is uploaded.
Then you could present the contents of the CSV file the same way you
would write any other view and template, with the added benifit of
having the data from the CSV file stored in a saner way in a database.
Just how I think I would do it. Not sure if it fits your scenario.
Kind regards,
Kasper Laudrup
--
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/f7586e78-072a-0448-def9-44acea8896fc%40stacktrace.dk.
For more options, visit https://groups.google.com/d/optout.