8👍
There may be Python errors in your registration
models. Try starting a shell and importing them, instantiating them, etc.
30👍
Since this page ranks nicely in Google, it seems like a good place for a general answer that might help. Sometimes the folder name in svn/git is different than the folder name in settings.py — a trap for the unwary.
So, if INSTALLED_APPS
references your stuff as mywhatever.someapp then it is likely you want settings.py to be in the “mywhatever” folder, with a subfolder “someapp” that contains an __init__.py
file.
- [Django]-Curious about get_form_kwargs in FormView
- [Django]-How can I check the size of a collection within a Django template?
- [Django]-How to create SaaS application with Python and Django
15👍
You mention sys.path so you might have tried this, however this was my problem and I’m sure some people reading this have it too.
open the command prompt and enter (with the trailing slash):
export PYTHONPATH=pathto/myproject/
then enter:
export DJANGO_SETTINGS_MODULE=settings
This allows me to edit the settings.py file to list the INSTALLED_APPS like this:
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'myapp',
'registration',
)
instead of:
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'myproject.myapp',
'myproject.registration',
)
- [Django]-Django string to date format
- [Django]-Django Rest Framework POST Update if existing or create
- [Django]-How to override css in Django Admin?
11👍
I was simply missing a comma after the ‘registration’ entry in the settings.py file. Once I added the comma after ‘registration’,
Syncdb worked for me.
- [Django]-Django Calendar Widget?
- [Django]-How can I skip a migration with Django migrate command?
- [Django]-Django – is not a registered namespace
- [Django]-How should I set my DATABASE_URL?
- [Django]-Allow null in foreign key to user. Django
- [Django]-Django and App Engine
5👍
Fixed! I had the same problem, I was trying to register submodules, like:
project
organization
categories
In my settings file I added
> INSTALLED_APPS = (
> 'django.contrib.admin',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.sites',
> ...
> 'organization.categories', )
When you generate a module in the folder categories you have a init.pyc I copied this file into “organization” folder, then I execute the following commands:
sudo python manage.py makemigrations
sudo ./manage.py syncdb
And it works file!
- [Django]-Django – signals. Simple examples to start
- [Django]-ImproperlyConfiguredError about app_name when using namespace in include()
- [Django]-Switching from MySQL to Cassandra – Pros/Cons?
4👍
I had this problem. I had saved the app in the project folder (as in, the same folder as manage.py), but referenced to “projectname.appname” instead of just “appname” in INSTALLED_APPS in settings.py.
- [Django]-Celery discover tasks in files with other filenames
- [Django]-What is a Django "app" supposed to mean?
- [Django]-How do I pass template context information when using HttpResponseRedirect in Django?
2👍
I had this on SX with virtualenv too, after installing with PIP as per the docs.
I did another install using easy_install and after that, it all worked.
easy_install -Z django-registration
- [Django]-Adding attributes into Django Model's Meta class
- [Django]-Changing a project name in django
- [Django]-Test sending email without email server
2👍
I’ve faced this problem until a figured out that the enviroment was not activated.
Check if your Virtualenv is activated. If not, run in the shell
source .<enviroment name>/bin/activate
- [Django]-"Models aren't loaded yet" error while populating in Django 1.8 or later
- [Django]-How to group models in django admin?
- [Django]-Django, Turbo Gears, Web2Py, which is better for what?
1👍
Make sure you have an entry in installed_apps, And you have the minimum 4 files in your apps. init.py, urls.py, models.py, and views.py
- [Django]-Auto register Django auth models using custom admin site
- [Django]-How do you Require Login for Media Files in Django
- [Django]-How to check current user's permissions from a Group in Django?
0👍
My first guess would be you haven’t added 'registration'
into installed apps
in the settings.py
file.
Perhaps you are using a different settings.py
(Or localsettings.py
) on the server.
- [Django]-Using Django auth UserAdmin for a custom user model
- [Django]-Django ModelForm has no model class specified
- [Django]-Performing a getattr() style lookup in a django template
0👍
Just try this
1) Put down the registration app inside your project as an app
and do the syncdb
do the below for finding out the exact cause of error
1.go to you project directory
2.python manage.py dbshell
3.in shell
4.import registration
5.if you get error here which means your registration module is not
there on the python path (or) some problem in finding that one.
if it works then some other problem like improper compilation .............
- [Django]-Django user impersonation by admin
- [Django]-Django bulk create ignore duplicates
- [Django]-Celery missed heartbeat (on_node_lost)
0👍
If this happens to you on Windows and while using virtualenv, it’s possibly because of virtualenv.
Install that package on the local (non virtualenv) environment and it should work.
I had the same problem with django-crispy-forms.
- [Django]-Rounding off decimals in Django
- [Django]-How to render .rst files in a markdown or html format?
- [Django]-Where should django manager code live?
0👍
When I’ve installed django-registration to my virtual env, I’ve had the same error.
Don’t know how it worked exactly, but when I’ve installed this lib to the main Python directory (not virtual env) the error has disappeared.
Maybe It will help to someone.
- [Django]-How do I migrate a model out of one django app and into a new one?
- [Django]-Non-primary foreign keys in Django
- [Django]-DRF: custom ordering on related serializers
0👍
I had the same issue, was following old course, it creates a folder that has ‘-‘ in its name and puts all the modules in it.
the name was like "portfolio-project"
but I change it to "portfolio_project", solved the problem with importing
import portfolio_project.jobs.views
not
import jobs.views
- [Django]-Django and postgresql schemas
- [Django]-Django User model, adding function
- [Django]-How can I avoid "Using selector: EpollSelector" log message in Django?
-1👍
I ran into this problem because I was messing up with my virtualenv.
I had two windows open:
- Running the server
- Running my commands
I had successfully installed the Django-registration package into my venv on my Windows computer:
$ . venv/Scripts/activate
$ pip install Django-registration-redux==2.0
But my server was not in the venv, so it could not find the package.
Stopped the server, entered venv in that window, then restarted the server and all is good.
- [Django]-Auto-create primary key used when not defining a primary key type warning in Django
- [Django]-MySQL vs PostgreSQL? Which should I choose for my Django project?
- [Django]-Is get_or_create() thread safe