-2

I want to run a ready python project in virtual environment. When I run the project I face no error. And when I write this in the terminal "py manage.py runserver" , I can see just a label of the project in the browser and forms are not being shown. I searched a lot, this project is almost complete and is working in other systems. I don't know what changes I should apply to the project.

4
  • Can you share a link with us for this almost-ready project? Commented Sep 27, 2022 at 9:23
  • It is a project from a compony and I am not allowed to share the code, unfortunately. Commented Sep 28, 2022 at 9:23
  • When I run the project in Terminal I can see some results in "Starting development server at 127.0.0.1:8000". There are 3 versions for the project, then after selecting one of them, just a label is available and django and .json forms are not shown in the browser. I searched for it a lot but did not find a solution. Commented Sep 28, 2022 at 9:26
  • Without sharing your code i can't help you, sorry. Commented Sep 28, 2022 at 11:19

2 Answers 2

0

By using this setting I could solve the problem.

STATIC_URL = '/static/'
# STATIC_ROOT = os.path.join(BASE_DIR, "static")
# STATIC_DIR = os.path.join(BASE_DIR, "static")
STATICFILES_DIRS = [
 os.path.join(BASE_DIR, "static"),
]
DEBUG = True
Sign up to request clarification or add additional context in comments.

Comments

0

I also faced the same problem.

Because I had not executed the python manage.py collectstatic command after installing django_jsonform, the form that should have been displayed by django_jsonform was not displayed.

After activating the virtualenv, run the python manage.py collectstatic command.

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.