center-for-threat-informed-defense / tram

TRAM is an open-source platform designed to advance research into automating the mapping of cyber threat intelligence reports to MITRE ATT&CK®.
https://ctid.mitre-engenuity.org/our-work/tram/
Apache License 2.0
422 stars 90 forks source link

DJANGO_DEBUG not available for running TRAM as developer. #196

Closed hoangcuongnguyen2001 closed 9 months ago

hoangcuongnguyen2001 commented 10 months ago

I am looking to run TRAM as developer to contribute to this project; however when I tried to run TRAM in localhost with DJANGO_DEBUG, my PowerShell and Anaconda could not recognize DJANGO_DEBUG as a part of my command: image I have tried to remove DJANGO_DEBUG, but it forced me to set settings for allowed hosts as well. So could you tell me what should I do to run TRAM in my local server?

victorjomi6 commented 10 months ago

Hmm... try this:

I think this should work. Cheers.

mehaase commented 10 months ago

That DJANGO_DEBUG=1 syntax is for Bash. The goal is to set that variable in the TRAM process environment. I think in Powershell you want to do this:

$env:DJANGO_DEBUG = 1
tram runserver
hoangcuongnguyen2001 commented 10 months ago

Thank you @mehaase for your answer, I was able to run the website in debug mode now! I think as you said, it would be better for me to run the program with WSL and Bash. So I just have another question, for every single time we want to run TRAM in debug mode, do we need to follow all steps, or we just need to run the Machine Learning model and then run the application server?

mehaase commented 10 months ago

After initial setup, you only need to do steps 11-13 to start TRAM again.