1

I am using Django and Python for the "framework" of a website. What I am trying to do is create a database that stores user input. The main purpose here is to find out the most common inputs for analytics, etc.

I thought about just making a CSV file and inserting into it via Python. But having to open the file and write to it each time seems inefficient. Maybe I'm wrong.

Are there any best practices out there that could help achieve this?

Thanks

1
  • You know, you can store this data into your website's db, too. If you don't want to use your main db for that, you can create a separate database solely dedicated for analytics. See Django docs on Multiple databases Commented Mar 22, 2017 at 16:54

1 Answer 1

2

With Django you can create a model which gives you the abillity to use forms - which get displayed as a HTML form on your website.

All you now need to do is to save it. :)

To start: There's a good tutorial at the Django documentation especially this part (Django: Playing with the API) is interesting for you - but I recommend to start from the beginning of the tutorial first.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.