Install Django Apps via Admin Interface

93 views
Skip to first unread message

guettli

unread,
Sep 10, 2014, 1:09:52 AM9/10/14
to django...@googlegroups.com
How can I install Django apps via admin interface?


Avraham Serour

unread,
Sep 10, 2014, 5:08:44 AM9/10/14
to django...@googlegroups.com
you can't, you would need to write something yourself capable of doing this.

in any case why would you want to do that? adding an app to a project may involve not only installing the python package and adding the app to INSTALLED_APPS, but also adding configurations to settings.py, running syncdb/migrate and reloading the instance.



On Wed, Sep 10, 2014 at 8:09 AM, guettli <guettli...@thomas-guettler.de> wrote:
How can I install Django apps via admin interface?


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/24a228c0-90fb-4b15-8919-931506afd5f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thomas Güttler

unread,
Sep 12, 2014, 5:28:50 AM9/12/14
to django...@googlegroups.com


Am 10.09.2014 um 11:07 schrieb Avraham Serour:
> you can't, you would need to write something yourself capable of doing this.

that's sad.

> in any case why would you want to do that?

Convenience. It would be great if some admin plugin could do this: Connect to pypi and list all
available packages which can be installed into django ...

I see a lot of **not DRY** docs in django packages: Over and over again the same instructions: Add "foo" to
INSTALLED_APPS ....

> adding an app to a project may involve not only installing the python package
> and adding the app to INSTALLED_APPS, but also adding configurations to settings.py, running syncdb/migrate and
> reloading the instance.

I guess django experts have a good solution for this small technical problem.

Thomas


--
Thomas Güttler
http://thomas-guettler.de/

Jani Tiainen

unread,
Sep 12, 2014, 5:55:31 AM9/12/14
to django...@googlegroups.com
Hi,

It seems that you're confusing Django to to be something that it isn't.

Django is a web application framework. In short meaning that it is set of (Python) libraries
that are used to build web applications. Django app is usually reusable piece of code that brings
some (usually common) functionality within framework ecosystem.

But Django is not CMS like tool where you really install stuff just by clicking a button and it magically appears.
There exists few CMS solutions built on top of Django - I've never used them so I can't vouch for any of them.

In simplest case installing django app is really just by adding a module in INSTALLED_APPS in settings.py
but many times it's much more - data migrations, configuring external services, collecting static
files, deciding url routing. Maybe even installing system packages that requires root access.

And you would expect that to happen just through admin? Would you trust your users really to do all
that - basically giving full control what users installs to your system without discretion?

--

Jani Tiainen
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5412BC60.2080705%40tbz-pariv.de.

Collin Anderson

unread,
Sep 12, 2014, 12:23:52 PM9/12/14
to django...@googlegroups.com
And you would expect that to happen just through admin? Would you trust your users really to do all 
that - basically giving full control what users installs to your system without discretion? 

Installing apps via the admin would be useful when the user is the same person as the sysadmin.\

However as we mentioned, Django really isn't architected for this. I could see Django-CMS creating a sub architecture that would allow for this sort of thing. Basically, you would need to create some sort of package of code that would work without getting added to INSTALLED_APPS.

Andreas Kuhne

unread,
Sep 12, 2014, 1:53:57 PM9/12/14
to django...@googlegroups.com
I really can't see a usecase for something like this. The only time I want to install new packages to my django system is on my dev server while developing something. I would also want the change to be permanent, therefore writing it in my settings.py file. I often forget to add the package to INSTALLED_APPS, but I'd rather have that issue than having a user change it on my production system. I can't come up with one scenario where being able to add it in django admin would be good - specially in production.

Sure, the feature could be on only when the server is running in debug mode, but I wouldn't like to risk the possibility of it working on a production server. I'd rather see that changes like that are done manually. Also adding packages to our production server should go through a test phase, so that we know that nothing is broken before running it in our production system.

I would however like a command to be able to list all plugins (with short descriptions) via pip. That would be a great thing, when I am searching for a specific plugin. The grails community has something like that.

Regards,

Andréas

12 18:23 GMT+02:00 Collin Anderson <cmawe...@gmail.com>:

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.

Thomas Güttler

unread,
Sep 17, 2014, 10:30:22 AM9/17/14
to django...@googlegroups.com
It would be nice if such a sub architecture would be outside of django-cms, to make it more reusable.
Reply all
Reply to author
Forward
0 new messages