2

I was wondering that if its possible to run custom django commands like startapp sampleapp from admin dashboard. I have a app registered in my project and i created the management and commands folder in that app and run want to know that how i pro-grammatically create the another app by going into django dashboard and in specific app. Something like trigger functionality like on button, when button click it execute the command which create the another djangoapp.

Your suggestions are appreciated.

4
  • 3
    Possible duplicate of stackoverflow.com/questions/12246665/… Commented Nov 28, 2019 at 9:10
  • Can you provide me any further guideline on about how to run python manage.py startapp sampleapp from custom commands. This article is useful but i am beginner so i need some more instructions on this. Commented Nov 28, 2019 at 9:31
  • Please provide relevant code for your admin and your management command. Commented Nov 28, 2019 at 9:35
  • Guess you can ovverride one of the admin templates: docs.djangoproject.com/en/2.2/ref/contrib/admin/… But the second part that is about creating a django app dynamically is a tricky one. One of the issues would be that you need to add the new app in the django.settings INSTALLED_APPS. But Django does not recommend to alter settings in runtime: docs.djangoproject.com/en/2.2/topics/settings/… Commented Nov 28, 2019 at 12:51

0

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.