Is it possible to use Django non-rel with a Nitrous.IO box without using virtualenv?
Using virtualenv, I can setup the version and apps needed to run Django non-rel. But Is there a better way?
I have a "bran" box with Django stack, and looking in Autoparts, there doesn't seem to be any Django packages listed. Let alone non-rel.
Note: Asked during Nitrous.IO Beta
Related
I want to implement a module-manager in Django where third-party modules can be installed through the django admin interface (without changing the code-base of the main project). Or it could also be a service that runs on top of django.
These modules should have the same capabilities as a django app. For example, defining models and views, making migrations, and interacting with other apps. Similar to how it works with the plugin-manager of Wordpress.
Is there a good way to do this? (and are there reasons why I should not?)
What is a Django app? According to Django Packages
Small components used to build projects. An app is anything that is installed by placing in settings.INSTALLED_APPS.
Generally speaking, here are the steps to have an app working in Django
Install the app
pip install app
Register the app in one's settings.py
INSTALLED_APPS = [
...
'app',
...
]
In some cases they'll require to sync the database. Such is the case with social-auth-app-django. Here you'd have to do as well
python manage.py migrate
In some other cases they require specific versions of Python, Django, ect, so that'd have to be taken in consideration too. Such is the case with Django REST framework which requires
Python 3.6+
Django 4.1, 4.0, 3.2, 3.1, 3.0
It's possible as well that apps are dependent on certain Python libraries. Then, one would have to install them too.
For a basic version of that, one wants to create a place to have a button to install an app as well as a model to store the app. The model will keeps track of specific variations with BooleanField.
More precisely, since we now know some apps require database sync, the app model will have requires_db_sync = BooleanField(default=False). Then, if that's true, when installing that app one will want to run at least steps 1, 2 and 3.
One will eventually want to do a thorough analysis of the existing apps and understand the different possible variations (dependencies, requiring DB sync, etc).
I work with WordPress too and this was a thought that came to my mind a few years ago. I didn't pursue it because for most apps I still had to go to the code and do various configurations.
To deal with that, WordPress plugins, like WPForms, come with pages where one does that configuration.
Since such Django app configuration pages for configuration don't yet exist, they'd have to be created as well.
Also, would be great to have a trusted agency with standards to validate an app as good to be in that system.
I'm following the guide to setup django-mongodb. But this line pip install git+https://github.com/django-nonrel/django#nonrel-1.5 always reverts my django to 1.5. Is there anyway that I can use lastest django?
That is because django-nonrelis a fork from the original Django project.
You can consider that as a different project.
django-nonrel was developed side by side with the original Django project until version 1.6, the last commit for nonrel is 2 years old.
To sum it up, if you want to use django-nonrel it is not recommended and you are limited to latest Django version it supports - 1.6.
The django-nonrel project is dead - If you want to use a NoSQL I will recommend not using Django.
There is't any official support for that, and I did not find any on-going projects (third-party) that exist anymore.
pip install git+https://github.com/django-nonrel/django#nonrel-1.6
The latest django-mongodb-engine is no longer operational. Using mongoengine alone will work only if your project does not use ANY contrib modules like, session, auth, user.
I recently came across another package called djongo. It is working fine on the latest version of Django.
Disclaimer: I have contributed to this package, but i am not trying to promote it anyway. I think it solves most of the Django MongoDB issues that have been around for ages and is extremely easy to use.
I have been developing a django application, and now i want to give to someone for testing but i want to keep the sourcecode hidden/compiled so they can't modify it, is there a way to package a django application and still use Apache for serving it? Or any other solution for packaging a django application.
Thanks
I'm totally new to Python and I've been learning how to use Django and it's admin functionality to work with my models. My question really is how, if I were to install Django CMS, would work with the admin?
My understanding it limited so I wanted to check as I'm struggling to know if it will still show the model's that I've been making in the same /admin/ url (as i read you login to the cms part via the /admin/ url).
Would installing the CMS overwrite anything current in my /admin/ view, or would the data management merely appear within the CMS control panel?
The Django CMS is a totally different environment. You can't install it on top of your current project. So if you want your models inside django cms you have to migrate them manually to the new enviroment. Maybe their are solutions for it but I'm not aware of them.
How to install two different versions of django. I went through many answer but none of them satisfying my need.
1.I want two install 1.5 or 1.6 without replacing 1.4
2.My application is currently live which was developed using 1.4.
3.But I want to use some python-django libraries to get new features in my application.
4.That library is compatible with django 1.5+.
5.I dont want to use virtual environment.
6.And I want to install in same directory/dist-packeges.
Is there any way two do so,,,,,,?
You can't have two versions in the same project. That's impossible: they would simply conflict - for example, what would happen when you did from django import template? How would the system know which version to use?
The only thing you could possibly do is have two separate projects, with their own versions of Django (and yes, using virtualenvs), each serving a part of the site.
Otherwise you will simply need to upgrade your existing project to Django 1.5+. It's not hard, Django is very good with backwards compatibility.
You have two options.
Django code is open to you So I will suggest to customize your current Django code with any library you want.
Or Create new app as utils and override current django feature into this new app and use this app as a django plugin.