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 trial

General Discussion

Charles Seymour
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Charles Seymour
PHP Development Techdegree Graduate 53,314 Points

Update workspace environment?

I accidentally chose the "static" environment instead of "python" when setting up the workspace for my Django project. Is it possible to update the environment? When I click the gear next to the workspace it only gives me the option to change the name of the workspace.

2 Answers

Greg Kaleka
Greg Kaleka
39,021 Points

I'm not sure there's a way to do that, but are you running into any problems? I just tested it, and the Static environment has Python installed. Heck, it even has Django installed. If you find there's anything you don't have installed, you can install it yourself in the console with pip (also installed)! It's a pretty cool resource that Treehouse has provided - essentially a fully functioning virtual machine that you can play with.

If you do find you're running into problems (again, I'm not sure what the actual difference is), you can download the entire workspace with File -> Download Workspace, and then start a new one with the Python environment and choose File -> Upload File and bring your files back in. You can also copy/paste the code. It's just text after all.

Happy coding :sparkles:

Cheers :beers:

-Greg

Charles Seymour
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Charles Seymour
PHP Development Techdegree Graduate 53,314 Points

Thanks for the quick reply. The problem I was getting is that I would run the server using

python manage.py runserver 0.0.0.0:8000

but when I clicked the eyeball icon to preview the workspace, it didn't give me a drop down menu of port numbers like it has with previous projects. Instead, it immediately opened a page with the url http://port-80-s5zr9p2uzu.treehouse-app.com/ and my directory structure displayed on the screen. I took your second suggestion of starting a new workspace in the Python environment and uploading my files, and all seems to be well now. Thanks!

Greg Kaleka
Greg Kaleka
39,021 Points

Ah ok yeah that would be a problem! Glad you got it to work.

Just as an aside, you could have run python manage.py runserver 0.0.0.0:80, and it probably would have worked (looks like port 80 is being used by default).