Python ver=3.4
Django ver=1.9.2
In my project I am trying to integrate mongodb with above django version I have installed the mongoengine in my virtual environment and have made the necessary in settings.py file.
I am able to start the server but when I try to run the project in the browser it notifies me
A server error occurred. Please contact the administrator.
and in the terminal shows up.
Please tell me the correct way to integrate the mongodb if I am doing something wrong.
Okay so your issue lies in the version of mongoengine you are using. I am using the version 0.8.7 and it has mongoengine.django but the latest version on Github (0.10.6) has this deprecated.
Django support has been split from the main MongoEngine repository.
The legacy Django extension may be found bundled with the 0.9 release
of MongoEngine.
source -> http://mongoengine-odm.readthedocs.org/django.html
Related
I am working on a Django project needing Newspaper3K to retrieve some information over the internet. Trying to deploy my Django web app onto the free OpenShift Online 3.0 Starter, the build fails when it comes to installing the Newspaper3K and hence its dependency NLTK.
Please advise the correct steps to achieve this "Django with NLTK deploying to OpenShift 3" installation. Thanks!
It turned out to be blocked by the lxml package. The default version of pip fails to compile it. Thanks to the answer here
https://stackoverflow.com/a/46125643/8583561
I set the environment variable
UPGRADE_PIP_TO_LATEST=1
This should be added to the .s2i/environment file.
This enables the PIP to be updated to the latest and the build is completed without an issue.
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 installed oauth2app using pip and I added it to setting.py, when I run migrate the tables for oauth2app are not created in MySQL.
The last update of oauth2app on git was in 2014. So as i understand it didn't support new versions of django. However I found django-oauth-toolkit, that connect oauth2app with new version of Django. Try it, maybe it's helps you.
I am successfully able to get BQ data from one project to another from the advice in this answer. However this only works when deployed on my development/staging instance and not my local development server on Google App Engine.
My findings are that it works in production because you include:
libraries:
- name: pycrypto
version: "latest"
in app.yaml. However these libraries are not accessible from the dev server. I have tried installing everything locally (Pycrypto, oauth2client, openSSL) after digging through some docs and tracing the error but still cannot get it to work. I have tried installing through pip and manually doing the build/install from the raw files to no avail. Any advice on getting these queries to work on the local django server? Working on Ubuntu if that matters, perhaps it's looking in the wrong spot for the libraries?
If its just the libs that are mising follow this answer https://stackoverflow.com/a/11405769/3877822 to insatll pycrypto to the root of your project
As #Udi suggests in the comment below, the following command also
installs pycrypto and can be used in virtualenv as well:
easy_install
http://www.voidspace.org.uk/downloads/pycrypto26/pycrypto-2.6.win32-py2.7.exe
Notice to choose the relevant link for your setup from this list
We are currently installing the latest version of Django and Python on IIS6. We have followed the instructions on the following site:
http://code.djangoproject.com/wiki/DjangoOnWindowsWithIISAndSQLServer
We are receiving a 403 error when trying to access our Django application via the IIS server.
We have verified the python installation on IIS6 and it is working properly.
We have also verified the Django installation. Our application runs fine under the built-in Django server, but we are having difficulties getting it to run under IIS.
We presume we could be getting errors from "Linking Django to PyISAPIe" section of the instructions provided on the link above.
Thanks.
Did you create a separate Application Pool to run PyISAPI (i.e. not the DefaultAppPool)? If so, what user/group does the pool run under? It's possible that you need to assign that user the proper rights. For example, see this page:
http://support.asimo.nl/activekb/questions.php?questionid=6
UPDATE: Here's another link with more detailed steps to check that your user permissions are set correctly:
http://forum.dotnetpanel.com/forums/t/602.aspx