Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialV K
5,237 PointsIs there a way to reset my file directories?
My file directory is completely screwed up. The init.py file can't be moved from the __pycache folder under the learning_site folder. Also my db.squlite3 file is sitting in my template folder instead of the courses folder, which makes it impossible to run my program now.
I've tried dragging and dropping files to their proper folders, but they just refuse to be moved into their spots.
Here is a screenshot of my workspace. I can't get anything to work now. I really do not understand why the files can't be rearranged into their proper folders.
Kenneth Love can you give me a hand here?
3 Answers
Tatiana Vasilevskaya
Python Web Development Techdegree Graduate 28,600 PointsYou could try using console to move files as you need
Kenneth Love
Treehouse Guest TeacherThe workspace fork looks fine. Why do you need to move the __init__
file from in __pycache__
? The one that's there now is the compiled version, which you shouldn't need to modify or keep track of anyway. Also, according to that fork, your db.sqlite3
isn't in templates
, it's where it should be.
V K
5,237 PointsKenneth Love Thanks for responding.
Why does my workspace look so different than yours?
Also, while running my runserver, I received this traceback error
File "/usr/local/pyenv/versions/3.5.0/lib/python3.5/site-packages/django/apps/config.py", line 202, in import_models
self.models_module = import_module(models_module_name)
File "/usr/local/pyenv/versions/3.5.0/lib/python3.5/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 662, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/home/treehouse/workspace/learning_site/courses/models.py", line 13, in <module>
class Step(models.Model):
File "/home/treehouse/workspace/learning_site/courses/models.py", line 14, in Step
title = models.Charfield(max_length=255)
Kenneth Love
Treehouse Guest TeacherAn ImportError
is because the file you're trying to import has error in it.
And you have Charfield
while I have CharField
V K
5,237 PointsThanks! Sorry about that.