How to import a class from a python file in django?
Question: I'm currently using django and putting python code in my views.py to run them
on my webpages. There is an excerpt of code that requires a certain class from
a python file to work sort of like a package but it is just a python file I
was given to use in order to execute a certain piece of code. How would I be
able to reference the class from my python file in the django views.py file? I
have tried putting the python file in my site packages folder in my Anaconda3
folder and have tried just using from [name of python file] import [class
name] in the views.py file but it does not seem to recognize that the file
exists in the site packages folder. I also tried putting the python file in
the django personal folder and using from personal import [name of file] but
that doesn't work either


Answer: You can simply put the `mypythonfile.py` in the same directory of your
`views.py` file. And `from mypythonfile import mystuff` in your views.py

