django ImportError: No module named plugins - django

i need some help.
I searched in internet but i didn't find any response. I'n new in python nad django :) that causes that i'm here.
Maybe i start at the beginning, i have some project django on heroku hosting, and i have repository on git. I check and i don't have ftp connection to heroku :/ and i have only repository on git. In this repository is requirement.txt file but there no information about version of modules.
I want to prepare enviroment on my ubuntu, i downloaded my existing django project and i started server by command
python manage.py server
I was informed by python that i need to install some of module, and library of python etc. Everything went ok until apperad info
ImportError: No module named plugins
There is no name of plugins this showed just plugins. I installed some module like django-plugins ( i think that module have a folder i dist-package like djangoplugins ). It did not help :/, than i created new folder in dist-package ( in python library folder ) "plugins" and i copied content form djangoplugins . This did not help :/. again showed me "ImportError: No module named plugins". i don't have any idea , whats i need to install, i installed every plugins i found in internet and it didn't help.
Maybe you had this problem ? i know that django can be 1.6 version.]
=====================================
PROBLEM SOLVED
I have wrong version of django and django-cms.

Related

Issues with poetry when deploying Django app to Render

I am following the “Getting Started With Django on Render” tutorial (https://render.com/docs/deploy-django#update-your-app-for-render) and all was going well until I got to “Configure Django for PostgreSQL”. I have everything copied correctly but I am getting errors now when I run python manage.py runserver this is the error:
File "/Users/user/Desktop/First_Program/Portfolio_Projects/Charter_Django_App/Charter_Django_App/config/settings.py", line 14, in <module>
import dj_database_url
ModuleNotFoundError: No module named 'dj_database_url'
even though when I run poetry show it clearly says it is installed
asgiref 3.5.2 ASGI specs, helper code, and adapters
brotli 1.0.9 Python bindings for the Brotli compression library
dj-database-url 1.0.0 Use Database URLs in your Django Application.
dj-email-url 1.0.6 Use an URL to configure email backend settings in your Django Application.
django 3.2.16 A high-level Python Web framework that encourages rapid development and clean, pragmatic design.
django-cache-url 3.4.2 Use Cache URLs in your Django application.
environs 9.5.0 simplified environment variable parsing
gunicorn 20.1.0 WSGI HTTP Server for UNIX
marshmallow 3.19.0 A lightweight library for converting complex datatypes to and from native Python datatypes.
packaging 22.0 Core utilities for Python packages
psycopg2-binary 2.9.5 psycopg2 - Python-PostgreSQL Database Adapter
python-dotenv 0.21.0 Read key-value pairs from a .env file and set them as environment variables
pytz 2022.6 World timezone definitions, modern and historical
setuptools 65.6.3 Easily download, build, install, upgrade, and uninstall Python packages
sqlparse 0.4.3 A non-validating SQL parser.
whitenoise 6.2.0 Radically simplified static file serving for WSGI applications
And also shows in poetry.lock file.
If anybody knows why this is happening and can please give me some insight. I followed the tutorial to the T but am new to using poetry.
I am also a bit confused as to where I store the environment variables such as SECRET_KEY as the tutorial is not very descriptive at that point. I am used to using pip install environs[django] then running
env = Env() env.read_env()
And reading from the .env file
Thank you x1000 in advance to anybody that may help me get my application running
I'm guessing the error is from you're virtualenv either you're not activating it or the packages are not installed in the virtualenv.
if you are using vscode try Ctrl + Shift + p and search for Python: select interpreter make sure the interpreter vscode is using is you're venv if click on it and go to myvenv/Scripts/ there you can see a file python.exe choose it.
It's hard to be sure as you didn't post that many things to begin with. But if you managed your virtual environment through poetry, then you should run :
poetry run python manage.py runserver
(instead of python manage.py runserver)
(As for environment variables, I've been advised to try python-dotenv. I haven't had the chance to test it yet, but it seems easier than most things. I'm not sure if that will help you with render.yaml though...)

Django openid (google-app-engine) error: No module named django_openid_auth

I'd like my users to be able to log in to my django project using their google accounts login (instead of having to sign up and create a new one). I found this : http://learnedstuffs.wordpress.com/2012/05/22/django-google-account-authentication/
But it doesn't work for me. After deploying my project in to Google apps engine it shows an error: ImportError: No module named django_openid_auth. I've checked many times - i did install django-openid-auth (by virtualenv). I'm new to django and I have no idea what I'm doing wrong.
Can anybody please help me with it? Thanks!
I found the solution: Packages installed in system or virtualenv environments won't get uploaded to GAE production servers. Packages should be in GAE project folder.

How can I get started developing with Django on Cloud9?

So Cloud9 looks really cool, and you can create python files in it, but I can't figure out how to get it to run a Django project. I imported one from my github account into the IDE, but it says I need to install Django (a django.core import error) so I need to help getting going. Any Ideas? Any skeleton projects on the web that I missed that will do this?
After some research and looking for an answer on different blogs and sites I finally found a solution:
Create a new workspace
Execute easy_install django to install Django
Create new Django project python ./../bin/django-admin.py startproject myproject
Start dev server python ./myproject/manage.py runserver $IP:$PORT
Access http://projectname.username.c9.io
Voilà!!!
I hope this helps
Just write commands in shell as it is:
sudo pip install -r requirements.txt (you should have there django)
than
python manage.py runserver $IP:$PORT
you will have app on https://projectname-username.c9.io
You may also have to add the proper path: <workspace_name>-<username>.c9users.io to the ALLOWED_HOSTS list in django_project/settings.py file, as suggested by the error message returned by django server. Tested on Django 2.0

No module named filterspecs

In eclipse,when i create new project, i got an error like,
Error creating Django project
settings.py file not created
Stdout:
Stderr:
If i synchronize present project and runserver, iam getting Error: No module named filterspecs.But i haven't used filterspecs in my project. Already filterspecs.py installed in usr/local/lib/python2.7/dist-packages/django/contrib/admin.
Kindly advise to rectify the error.
You may be using django.contrib.admin.filterspecs to create custom filters for your admin pages, such as outlined here:
Custom Filter in Django Admin on Django 1.3 or below
Unfortunatelly, you will have to rewrite these using the new list_filter module functionality.
See the manual here:
https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_filter
This happened to me as well, even though my code wasn't directly using any filterspecs.
Run python manage.py runserver --traceback to see exactly where the error is coming from.
This module was removed in Django 1.4, but other external modules you have listed in your settings.py might still be using it, so make sure you upgrade everything in your INSTALLED_APPS list. In my case, I was using an outdated version of FeinCMS, but after I upgraded it, the error went away.
Obviously, your system is lacking filterspecs module which is required by the project. Install it by typing sudo pip install filterspecs in the console (if you are on linux)

Django: Setting up apps on a server

Trying to upload my django app on my obunto slice. The problem I'm facing right now there are a couple of packages I'm using. Which I installed in site packages on my machine. Now when I put them online on the server their sadly not working. Any ideas how to make them work.
p.s I get a error on import
Python must have a way to find these packages. Did you use standard installation procedures for them (i.e. setup.py install) or copy them in an accessible directory? If you didn't use setup.py install, check your PYTHONPATH environment variable. It should contain the directory where your packages are stored. If it doesn't, you can create it.
This is a Python issue really, not a Django issue.
To get more help paste the import error you're getting, as well as the directory structure of where you installed this package.