Re: django.core.exceptions.ImproperlyConfigured: The included URLconf 'simplesocial.urls' does not appear to have any patterns in it

2020-07-07 Thread Evolution2020 evo
check your URL's and views first are they configured well

On Tuesday, July 7, 2020 at 3:37:37 PM UTC+3, Zabihullah Danish wrote:
>
> *Dear Friends greetings*
> since couple of days i am having the error see in attached file while i am 
> running *python manage.py runserver *getting the attached error code and 
> searched many time in google and still couldn't solved the problem please 
> help me. 
>
> [image: django error.PNG]
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f299f2a5-f465-480f-bbf6-2c4220de0ac7o%40googlegroups.com.


django.core.exceptions.ImproperlyConfigured: The included URLconf 'simplesocial.urls' does not appear to have any patterns in it

2020-07-07 Thread Exactly musty
Show your URLs.py and your imports

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8d93836b-2113-4bf4-8238-089e79ad4546o%40googlegroups.com.


Re: Getting the except django.core.exceptions.ImproperlyConfigured while querying DB

2020-05-20 Thread Hella Nick
此处有语法错误: path('display_data/', views.display_data, name=
'display_data'),
正确的写法为:path(r'^display_data//$', views.display_data, name=
'display_data/'),

请记住,一定要加 /

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHfGPEe6TDiKM_p4W_%2BpsJtp3c3-yV5%3DtFouXXwKqoHORWqPng%40mail.gmail.com.


Re: Getting the except django.core.exceptions.ImproperlyConfigured while querying DB

2020-05-20 Thread Hella Nick
如果您确定数据库中有数据的话,那么就是您该视图的url设计错误。Django数据库查询的get方法查询不到数据会报错。希望可以帮助到您。

ratnadeep ray  于2020年5月20日周三 下午4:16写道:

> I am trying to fetch a few rows from the DB using the following code in my
> views.py:
>
> from django.http import HttpResponsefrom django.shortcuts import renderfrom 
> fusioncharts.models import QRC_DB
> def display_data(request,component):
> query_results = QRC_DB.objects.get(component_name__contains=component)
> return HttpResponse("You're looking at the component %s." % component)
>
> For the above, I am getting the following exception:
>
> django.core.exceptions.ImproperlyConfigured: The included URLconf 
> 'Piechart_Excel.urls' does not appear to have any patterns in it. If you see 
> valid patterns in the file then the issue is probably caused by a circular 
> import.
>
> However whenever I am *removing/commenting out* the below line, the above 
> exception disappears:
>
> query_results = QRC_DB.objects.get(component_name__contains=component)
>
>
> Can anyone say what can be going wrong here?
>
> urls.py file under app is as follows:
>
> from django.urls import path from fusioncharts import views urlpatterns 
> urlpatterns
>> = [
>> path('push-data/', views.push_data, name='push-data'),
>> path('home/', views.home, name='home'),
>> path('display_data/', views.display_data, name=
>> 'display_data'),
>> ]
>
> The url under the main project is as follows:
>
> from django.contrib import adminfrom django.urls import path,include
>>
>> urlpatterns urlpatterns = [
>> path('admin/', admin.site.urls),
>> path('', include('fusioncharts.urls'))
>> ]
>
> So please advise what's going wrong.
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/0acc7888-9e25-43fd-8a50-64fe43086190%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/0acc7888-9e25-43fd-8a50-64fe43086190%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHfGPEd6_f3W7fCiS-aSvkC5X%2BbTNRiUFXFTV_qjECAZyfGrNQ%40mail.gmail.com.


Getting the except django.core.exceptions.ImproperlyConfigured while querying DB

2020-05-20 Thread ratnadeep ray
I am trying to fetch a few rows from the DB using the following code in my 
views.py:

from django.http import HttpResponsefrom django.shortcuts import renderfrom 
fusioncharts.models import QRC_DB
def display_data(request,component):
query_results = QRC_DB.objects.get(component_name__contains=component)
return HttpResponse("You're looking at the component %s." % component)

For the above, I am getting the following exception:

django.core.exceptions.ImproperlyConfigured: The included URLconf 
'Piechart_Excel.urls' does not appear to have any patterns in it. If you see 
valid patterns in the file then the issue is probably caused by a circular 
import.

However whenever I am *removing/commenting out* the below line, the above 
exception disappears:

query_results = QRC_DB.objects.get(component_name__contains=component)


Can anyone say what can be going wrong here? 

urls.py file under app is as follows: 

from django.urls import path from fusioncharts import views urlpatterns 
urlpatterns 
> = [
> path('push-data/', views.push_data, name='push-data'),
> path('home/', views.home, name='home'),
> path('display_data/', views.display_data, name=
> 'display_data'),
> ]

The url under the main project is as follows: 

from django.contrib import adminfrom django.urls import path,include
>
> urlpatterns urlpatterns = [
> path('admin/', admin.site.urls),
> path('', include('fusioncharts.urls'))
> ]

So please advise what's going wrong. 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0acc7888-9e25-43fd-8a50-64fe43086190%40googlegroups.com.


Re: django.core.exceptions.ImproperlyConfigured: error is coming

2020-05-08 Thread Jorge Gimeno
On Fri, May 8, 2020 at 2:00 AM ratnadeep ray  wrote:

> I am new to Django and hence don't have much idea about it. I am trying to
> create an app having the following contents in my view.py file:
>
> from django.shortcuts import render
>> from fusioncharts.models import City
>> def pie_chart(request):
>> labels = []
>> data = []
>> queryset = City.objects.order_by('-population')[:3]
>> for city in queryset:
>> labels.append(city.name)
>> data.append(city.population)
>> return render(request, 'pie_chart.html', {
>> 'labels': labels,
>> 'data': data,
>> })
>
>
> The content of my urls.py file inside the app is as follows:
>
> from django.urls import path
>> from fusioncharts import views
>> urlpatterns = [
>> path('pie-chart/', views.pie_chart, name='pie-chart'),
>> ]
>
>
> and the content of my urls.py file inside the main project folder is as
> follows:
>
> from django.contrib import admin
>> from django.urls import path
>> urlpatterns = [
>> path('admin/', admin.site.urls),
>> path('', include('fusioncharts.urls'))
>> ]
>
>
> In the settings.py file, I have added the following:
>
> ROOT_URLCONF = 'Piechart.urls'
>
>
> and under the TEMPLATES, added the following:
>
> 'DIRS': ['Piechart/fusioncharts/templates'],
>
>
> Now while running my app, I am getting the following error:
>
> *django.core.exceptions.ImproperlyConfigured: The included URLconf
>> 'Piechart.urls' does not appear to have any patterns in it. If you see
>> valid patterns in the file then the issue is probably caused by a circular
>> import.*
>
>
> Can anyone please say what's going wrong?
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/8afd3990-d71b-4783-a478-0b18bf05389f%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/8afd3990-d71b-4783-a478-0b18bf05389f%40googlegroups.com?utm_medium=email_source=footer>
> .
>

ROOT_URLCONF is meant to tell Django where the root urls.py is.  It is
generated by manage.py startproject to point to the urls.py it creates in
settings.py.  In your case, it should point to '.urls', where
 is your main project folder.

Then, I would use an include in the root urls.py to add the pie-chart
route, similar to what you did for fusioncharts.

-Jore

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANfN%3DK8ca%3DNPXowoODi%2B35zgCA2DxgwhWcvMCT6XxLM-axo%2B8g%40mail.gmail.com.


django.core.exceptions.ImproperlyConfigured: error is coming

2020-05-08 Thread ratnadeep ray
I am new to Django and hence don't have much idea about it. I am trying to 
create an app having the following contents in my view.py file:

from django.shortcuts import render
> from fusioncharts.models import City
> def pie_chart(request):
> labels = []
> data = []
> queryset = City.objects.order_by('-population')[:3]
> for city in queryset:
> labels.append(city.name)
> data.append(city.population)
> return render(request, 'pie_chart.html', {
> 'labels': labels,
> 'data': data,
> })


The content of my urls.py file inside the app is as follows:

from django.urls import path
> from fusioncharts import views
> urlpatterns = [
> path('pie-chart/', views.pie_chart, name='pie-chart'),
> ]


and the content of my urls.py file inside the main project folder is as 
follows:

from django.contrib import admin
> from django.urls import path
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('', include('fusioncharts.urls'))
> ]


In the settings.py file, I have added the following:

ROOT_URLCONF = 'Piechart.urls'


and under the TEMPLATES, added the following:

'DIRS': ['Piechart/fusioncharts/templates'], 


Now while running my app, I am getting the following error:

*django.core.exceptions.ImproperlyConfigured: The included URLconf 
> 'Piechart.urls' does not appear to have any patterns in it. If you see 
> valid patterns in the file then the issue is probably caused by a circular 
> import.*


Can anyone please say what's going wrong?

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8afd3990-d71b-4783-a478-0b18bf05389f%40googlegroups.com.


django.core.exceptions.ImproperlyConfigured DJANGO_SETTINGS_MODULE

2019-09-18 Thread Brad S


I am trying to get a new server up and running and I am make a n00b error 
somewhere.


django.core.exceptions.ImproperlyConfigured: Requested setting MIDDLEWARE, but 
settings are not configured. You must either define the environment variable 
DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
unable to load app 0 (mountpoint='') (callable not found or import error)


$ cat nerds/settings.py 
"""
Django settings for nerds project.

Generated by 'django-admin startproject' using Django 2.2.5.

For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""

import os

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'ui2+3#j-67et^^76$b^h4pw3c7qbxdc5rj0xuqcq)=0=2'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ["nerds.tech","www.nerds.tech"]


# Application definition

INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'support.apps.SupportConfig',
]

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'nerds.urls'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]

WSGI_APPLICATION = 'nerds.wsgi.application'


# Database
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'nerds.db'),
}
}


# Password validation
# https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 
'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 
'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 
'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 
'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]


# Internationalization
# https://docs.djangoproject.com/en/2.2/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'EST'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.2/howto/static-files/

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, "static/")
#DJANGO_SETTINGS_MODULE="nerds.settings"



$ cat ../uwsgi.ini 
[uwsgi]
module = wsgi:application
#module = wsgi
master = true
chdir = /home/www/nerds.tech/nerds
wsgi-file = /home/www/nerds.tech/nerds/nerds/wsgi.py
#wsgi-file = nerds/nerds/wsgi.py
uid = www-data
gid = www-data
vacuum = true
chmod-socket = 660
socket = /tmp/uwsgi.sock
#plugins = python
die-on-term = true
virtualenv = /home/www/nerds.tech/venv
#pythonpath = /home/www/nerds.tech/venv/lib/python3.5/dist-packages
pythonpath = /home/www/nerds.tech/venv/lib/python3.5/site-packages
pythonpath = /home/www/nerds.tech/venv/lib/python3.5
#pythonpath = ./nerds
pythonpath = /home/www/nerds.tech/nerds
module = django.core.handlers.wsgi:WSGIHandler()
logto = /var/log/nginx/uwsgi.log






$ cat nerds/wsgi.py 
"""
WSGI config for nerds project.

It exposes the WSGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""

import os
from django.core.wsgi import get_wsgi_application

#os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'nerds.settings')

os.environ['DJANGO_SETTINGS_MODULE'] = 'nerds.settings'


#os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'nerds.settings')

application = get_wsgi_applica

Error- django.core.exceptions.ImproperlyConfigured

2019-02-13 Thread Aayush Aggarwal
Hi all,

I am using django-warrant(https://github.com/MetaMetricsInc/django-warrant) 
as my Authentication backend and using the django_warrant.UserObj as the 
User Model.When i try to run "python manage.py makemigrations" . I got this 
"django.core.exceptions.ImproperlyConfigured" error.
I have created a new project and startapp django_warrant and copied the 
code to the directory.I am looking use this UserObj as a reference in 
another app.

Any hacks or idea.?Is there any alternative.?

Thanks
Aayush Aggarwal
Here is Traceback:

(warrant3.6) ~/Desktop/workspace4/project$ python manage.py makemigrations 
django_warrant
Traceback (most recent call last):
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/apps/config.py",
 
line 165, in get_model
return self.models[model_name.lower()]
KeyError: 'userobj'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/contrib/auth/__init__.py",
 
line 193, in get_user_model
return django_apps.get_model(settings.AUTH_USER_MODEL, 
require_ready=False)
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/apps/registry.py",
 
line 202, in get_model
return app_config.get_model(model_name, require_ready=require_ready)
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/apps/config.py",
 
line 168, in get_model
"App '%s' doesn't have a '%s' model." % (self.label, model_name))
LookupError: App 'django_warrant' doesn't have a 'UserObj' model.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "manage.py", line 15, in 
execute_from_command_line(sys.argv)
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/core/management/__init__.py",
 
line 371, in execute_from_command_line
utility.execute()
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/core/management/__init__.py",
 
line 347, in execute
django.setup()
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/__init__.py",
 
line 24, in setup
apps.populate(settings.INSTALLED_APPS)
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/apps/registry.py",
 
line 120, in populate
app_config.ready()
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/contrib/admin/apps.py",
 
line 23, in ready
self.module.autodiscover()
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/contrib/admin/__init__.py",
 
line 26, in autodiscover
autodiscover_modules('admin', register_to=site)
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/utils/module_loading.py",
 
line 47, in autodiscover_modules
import_module('%s.%s' % (app_config.name, module_to_search))
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/importlib/__init__.py", 
line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 994, in _gcd_import
  File "", line 971, in _find_and_load
  File "", line 955, in _find_and_load_unlocked
  File "", line 665, in _load_unlocked
  File "", line 678, in exec_module
  File "", line 219, in 
_call_with_frames_removed
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/contrib/auth/admin.py",
 
line 6, in 
from django.contrib.auth.forms import (
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/contrib/auth/forms.py",
 
line 20, in 
UserModel = get_user_model()
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/contrib/auth/__init__.py",
 
line 198, in get_user_model
"AUTH_USER_MODEL refers to model '%s' that has not been installed" % 
settings.AUTH_USER_MODEL
django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to 
model 'django_warrant.UserObj' that has not been installed

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f7bb2291-5311-41fe-bef5-f4521f8ec9f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django.core.exceptions.ImproperlyConfigured: Requested setting AUTH_USER_MODEL, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call sett

2018-12-07 Thread Sidnei Pereira
Take a look on this article.

https://automationpanda.com/2017/09/14/django-projects-in-pycharm-community-edition/

Em quinta-feira, 6 de dezembro de 2018 15:18:22 UTC-2, Parker Bernard 
escreveu:
>
> how do i open my django in my pycharm or python
>
>
> On Thu, Dec 6, 2018, 3:40 PM Sidnei Pereira   wrote:
>
>> It seems you are trying to execute de `views.py` module directly. As you 
>> are running Django you should run it's webserver through `manage.py` so 
>> Django you setup everything it is expected and the process starts to listen 
>> to port: So:
>>
>> python manage.py runserver
>>
>> It will run the server by default in the localhost and port 8000. To test 
>> your `view` open the browser and type the correspondent URL (
>> http://localhost:8000/this_view_url/) for that view.
>>
>> Actually I strongly recommend you to go through the "Getting started with 
>> Django" (https://www.djangoproject.com/start/)
>>
>> *P.S.: Looks like you are using PyCham IDE and there you hit play/run 
>> button to start the application but before it needs to be correctly setup. 
>> It may vary from professional to community version, but you Basically have 
>> to add a run configuration (next to the play button on the top right). In 
>> pro version just choose "Django server" on the template's list, usually the 
>> default values are good to go. The community one does not have the "Django 
>> Server" on the list so choose "Python" and type the runserver command as 
>> explained before.
>>
>> Em quarta-feira, 5 de dezembro de 2018 10:28:01 UTC-2, Tushar Khairnar 
>> escreveu:
>>>
>>> C:\Python\python.exe "D:/Python/django reset 
>>> framework/secondtestdjrstapi/users/views.py"
>>> Traceback (most recent call last):
>>>   File "D:/Python/django reset 
>>> framework/secondtestdjrstapi/users/views.py", line 2, in 
>>> from rest_framework.authtoken.models import Token
>>>   File "C:\Python\lib\site-packages\rest_framework\authtoken\models.py", 
>>> line 11, in 
>>> class Token(models.Model):
>>>   File "C:\Python\lib\site-packages\rest_framework\authtoken\models.py", 
>>> line 17, in Token
>>> settings.AUTH_USER_MODEL, related_name='auth_token',
>>>   File "C:\Python\lib\site-packages\django\conf\__init__.py", line 57, 
>>> in __getattr__
>>> self._setup(name)
>>>   File "C:\Python\lib\site-packages\django\conf\__init__.py", line 42, 
>>> in _setup
>>> % (desc, ENVIRONMENT_VARIABLE))
>>> django.core.exceptions.ImproperlyConfigured: Requested setting 
>>> AUTH_USER_MODEL, but settings are not configured. You must either define 
>>> the environment variable DJANGO_SETTINGS_MODULE or call 
>>> settings.configure() before accessing settings.
>>>
>> -- 
>> 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 https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/f0597428-5b2b-41a3-93cc-1fd326b1f828%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/f0597428-5b2b-41a3-93cc-1fd326b1f828%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7630b8e9-cc99-492f-b5b0-ce2631a71a59%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django.core.exceptions.ImproperlyConfigured: Requested setting AUTH_USER_MODEL, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call sett

2018-12-06 Thread Parker Bernard
how do i open my django in my pycharm or python


On Thu, Dec 6, 2018, 3:40 PM Sidnei Pereira  It seems you are trying to execute de `views.py` module directly. As you
> are running Django you should run it's webserver through `manage.py` so
> Django you setup everything it is expected and the process starts to listen
> to port: So:
>
> python manage.py runserver
>
> It will run the server by default in the localhost and port 8000. To test
> your `view` open the browser and type the correspondent URL (
> http://localhost:8000/this_view_url/) for that view.
>
> Actually I strongly recommend you to go through the "Getting started with
> Django" (https://www.djangoproject.com/start/)
>
> *P.S.: Looks like you are using PyCham IDE and there you hit play/run
> button to start the application but before it needs to be correctly setup.
> It may vary from professional to community version, but you Basically have
> to add a run configuration (next to the play button on the top right). In
> pro version just choose "Django server" on the template's list, usually the
> default values are good to go. The community one does not have the "Django
> Server" on the list so choose "Python" and type the runserver command as
> explained before.
>
> Em quarta-feira, 5 de dezembro de 2018 10:28:01 UTC-2, Tushar Khairnar
> escreveu:
>>
>> C:\Python\python.exe "D:/Python/django reset
>> framework/secondtestdjrstapi/users/views.py"
>> Traceback (most recent call last):
>>   File "D:/Python/django reset
>> framework/secondtestdjrstapi/users/views.py", line 2, in 
>> from rest_framework.authtoken.models import Token
>>   File "C:\Python\lib\site-packages\rest_framework\authtoken\models.py",
>> line 11, in 
>> class Token(models.Model):
>>   File "C:\Python\lib\site-packages\rest_framework\authtoken\models.py",
>> line 17, in Token
>> settings.AUTH_USER_MODEL, related_name='auth_token',
>>   File "C:\Python\lib\site-packages\django\conf\__init__.py", line 57, in
>> __getattr__
>> self._setup(name)
>>   File "C:\Python\lib\site-packages\django\conf\__init__.py", line 42, in
>> _setup
>> % (desc, ENVIRONMENT_VARIABLE))
>> django.core.exceptions.ImproperlyConfigured: Requested setting
>> AUTH_USER_MODEL, but settings are not configured. You must either define
>> the environment variable DJANGO_SETTINGS_MODULE or call
>> settings.configure() before accessing settings.
>>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f0597428-5b2b-41a3-93cc-1fd326b1f828%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/f0597428-5b2b-41a3-93cc-1fd326b1f828%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFDnJVVwvt1y6NTvoVccWD8B59JHjLFt0%3Dy8b0tAYbhBGa517w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: django.core.exceptions.ImproperlyConfigured: Requested setting AUTH_USER_MODEL, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call sett

2018-12-06 Thread Sidnei Pereira
It seems you are trying to execute de `views.py` module directly. As you 
are running Django you should run it's webserver through `manage.py` so 
Django you setup everything it is expected and the process starts to listen 
to port: So:

python manage.py runserver

It will run the server by default in the localhost and port 8000. To test 
your `view` open the browser and type the correspondent URL 
(http://localhost:8000/this_view_url/) for that view.

Actually I strongly recommend you to go through the "Getting started with 
Django" (https://www.djangoproject.com/start/)

*P.S.: Looks like you are using PyCham IDE and there you hit play/run 
button to start the application but before it needs to be correctly setup. 
It may vary from professional to community version, but you Basically have 
to add a run configuration (next to the play button on the top right). In 
pro version just choose "Django server" on the template's list, usually the 
default values are good to go. The community one does not have the "Django 
Server" on the list so choose "Python" and type the runserver command as 
explained before.

Em quarta-feira, 5 de dezembro de 2018 10:28:01 UTC-2, Tushar Khairnar 
escreveu:
>
> C:\Python\python.exe "D:/Python/django reset 
> framework/secondtestdjrstapi/users/views.py"
> Traceback (most recent call last):
>   File "D:/Python/django reset 
> framework/secondtestdjrstapi/users/views.py", line 2, in 
> from rest_framework.authtoken.models import Token
>   File "C:\Python\lib\site-packages\rest_framework\authtoken\models.py", 
> line 11, in 
> class Token(models.Model):
>   File "C:\Python\lib\site-packages\rest_framework\authtoken\models.py", 
> line 17, in Token
> settings.AUTH_USER_MODEL, related_name='auth_token',
>   File "C:\Python\lib\site-packages\django\conf\__init__.py", line 57, in 
> __getattr__
> self._setup(name)
>   File "C:\Python\lib\site-packages\django\conf\__init__.py", line 42, in 
> _setup
> % (desc, ENVIRONMENT_VARIABLE))
> django.core.exceptions.ImproperlyConfigured: Requested setting 
> AUTH_USER_MODEL, but settings are not configured. You must either define 
> the environment variable DJANGO_SETTINGS_MODULE or call 
> settings.configure() before accessing settings.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f0597428-5b2b-41a3-93cc-1fd326b1f828%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django.core.exceptions.ImproperlyConfigured: Requested setting AUTH_USER_MODEL, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call sett

2018-12-05 Thread Ryan Nowakowski
I'm not quite sure what you're trying to do. Are you trying to run views.py?

On December 5, 2018 6:21:06 AM CST, Tushar Khairnar  
wrote:
>C:\Python\python.exe "D:/Python/django reset 
>framework/secondtestdjrstapi/users/views.py"
>Traceback (most recent call last):
>  File "D:/Python/django reset 
>framework/secondtestdjrstapi/users/views.py", line 2, in 
>from rest_framework.authtoken.models import Token
>File "C:\Python\lib\site-packages\rest_framework\authtoken\models.py", 
>line 11, in 
>class Token(models.Model):
>File "C:\Python\lib\site-packages\rest_framework\authtoken\models.py", 
>line 17, in Token
>settings.AUTH_USER_MODEL, related_name='auth_token',
>File "C:\Python\lib\site-packages\django\conf\__init__.py", line 57, in
>
>__getattr__
>self._setup(name)
>File "C:\Python\lib\site-packages\django\conf\__init__.py", line 42, in
>
>_setup
>% (desc, ENVIRONMENT_VARIABLE))
>django.core.exceptions.ImproperlyConfigured: Requested setting 
>AUTH_USER_MODEL, but settings are not configured. You must either
>define 
>the environment variable DJANGO_SETTINGS_MODULE or call 
>settings.configure() before accessing settings.
>
>-- 
>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+unsubscr...@googlegroups.com.
>To post to this group, send email to django-users@googlegroups.com.
>Visit this group at https://groups.google.com/group/django-users.
>To view this discussion on the web visit
>https://groups.google.com/d/msgid/django-users/36636e92-854d-4a77-9493-b60836799509%40googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/28D4A2BE-35AC-45F0-8A28-B3AA46495AC4%40fattuba.com.
For more options, visit https://groups.google.com/d/optout.


django.core.exceptions.ImproperlyConfigured: Requested setting AUTH_USER_MODEL, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings

2018-12-05 Thread Tushar Khairnar
C:\Python\python.exe "D:/Python/django reset 
framework/secondtestdjrstapi/users/views.py"
Traceback (most recent call last):
  File "D:/Python/django reset 
framework/secondtestdjrstapi/users/views.py", line 2, in 
from rest_framework.authtoken.models import Token
  File "C:\Python\lib\site-packages\rest_framework\authtoken\models.py", 
line 11, in 
class Token(models.Model):
  File "C:\Python\lib\site-packages\rest_framework\authtoken\models.py", 
line 17, in Token
settings.AUTH_USER_MODEL, related_name='auth_token',
  File "C:\Python\lib\site-packages\django\conf\__init__.py", line 57, in 
__getattr__
self._setup(name)
  File "C:\Python\lib\site-packages\django\conf\__init__.py", line 42, in 
_setup
% (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting 
AUTH_USER_MODEL, but settings are not configured. You must either define 
the environment variable DJANGO_SETTINGS_MODULE or call 
settings.configure() before accessing settings.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/36636e92-854d-4a77-9493-b60836799509%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django.core.exceptions.ImproperlyConfigured:

2017-10-02 Thread ADEWALE ADISA
are u sure u are running the command from the root of your project where
the folder "website" and file manage.py is ?
try to cd to your project root, then run
python manage.py runserver
On Oct 2, 2017 6:51 AM, "harsh sharma" <harshsharma199...@gmail.com> wrote:

> i am getting this error whenever i m trying to run django-admin runserver
>
> django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG, but
> settings are not configured. You must eit
> her define the environment variable DJANGO_SETTINGS_MODULE or call
> settings.configure() before accessing settings.
>
> my wsgi file
>
> import os
> from django.conf import settings
> from django.core.wsgi import get_wsgi_application
>
> settings.configure(DEBUG=True)
> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "website.settings")
>
> application = get_wsgi_application()
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/568cdb67-2a6f-4e3b-9ba8-842d0c721e7a%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/568cdb67-2a6f-4e3b-9ba8-842d0c721e7a%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMGzuy-fCGft6__LEfU1JaieorsLCJZE---PRNQkCVBKBRdUBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


django.core.exceptions.ImproperlyConfigured:

2017-10-01 Thread harsh sharma
i am getting this error whenever i m trying to run django-admin runserver

django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG, but 
settings are not configured. You must eit
her define the environment variable DJANGO_SETTINGS_MODULE or call 
settings.configure() before accessing settings.

my wsgi file

import os
from django.conf import settings
from django.core.wsgi import get_wsgi_application

settings.configure(DEBUG=True)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "website.settings")

application = get_wsgi_application()

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/568cdb67-2a6f-4e3b-9ba8-842d0c721e7a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

2012-11-20 Thread Tom Evans
On Tue, Nov 20, 2012 at 2:14 PM, Cj Taylor  wrote:
> Correct, Sergiy.  As I fiddle with this nightly, the core of my issue seems
> to be that mysqldb is not yet python3 ready and django 1.5 is calling for
> it.  I changed my database settings in settings.py to
> 'django.db.backends.mysql' which in return calls for mysqldb when I do:
>
> python manage.py syncdb
>
>
> I suppose at this point I'm just seeking anyone who has tried to run django
> 1.5 and has MySQL actually working.  If so, how?
>

I guess this is the meaning of 'experimental support'. Patches are
probably welcome, or you could use sqlite or postgres.

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

2012-11-20 Thread Cj Taylor
Correct, Sergiy.  As I fiddle with this nightly, the core of my issue seems 
to be that mysqldb is not yet python3 ready and django 1.5 is calling for 
it.  I changed my database settings in settings.py to '
django.db.backends.mysql' which in return calls for mysqldb when I do:

python manage.py syncdb


I suppose at this point I'm just seeking anyone who has tried to run django 
1.5 and has MySQL actually working.  If so, how?

On Tuesday, November 20, 2012 2:08:37 AM UTC-5, Sergiy Khohlov wrote:
>
> Which version of django ? 
>  Is this one version has python 3.x support ? 
>
> 2012/11/20 Cj Taylor : 
> > ok, so what needs to happen here?  Do I need to recode 
> > /usr/local/lib/python3.2/dist-packages/django/db/backends/mysql/base.py 
> to 
> > use this new module? 
> > 
> > 
> > On Sunday, November 18, 2012 4:57:02 PM UTC-5, iñigo medina wrote: 
> >> 
> >> 
> >> On Sat, 17 Nov 2012, Cj Taylor wrote: 
> >> 
> >> > That package installs into my python directory but not python3.  I'm 
> >> > currently trying to get Django 1.5 to work with python3.  Are there 
> >> > other 
> >> > ways currently to get mysql to work with django and the python3 
> >> > environment? 
> >> 
> >> Check out pymysql: 
> >> https://github.com/petehunt/PyMySQL/ 
> >> 
> >> i� 
> >> 
> >> > 
> >> > Try this : 
> >> > 
> >> >> sudo apt-get install python-mysqldb 
> >> >> 
> >> >> -- 
> >> >> Sandeep Kaur 
> >> >> E-Mail: mkaur...@gmail.com  
> >> >> Blog: sandymadaan.wordpress.com 
> >> >> 
> >> > 
> >> > -- 
> >> > You received this message because you are subscribed to the Google 
> >> > Groups "Django users" group. 
> >> > To view this discussion on the web visit 
> >> > https://groups.google.com/d/msg/django-users/-/VfrRmTUUQrgJ. 
> >> > To post to this group, send email to django...@googlegroups.com. 
> >> > To unsubscribe from this group, send email to 
> >> > django-users...@googlegroups.com. 
> >> > For more options, visit this group at 
> >> > http://groups.google.com/group/django-users?hl=en. 
> >> > 
> >> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Django users" group. 
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msg/django-users/-/25S322O0_YkJ. 
> > 
> > To post to this group, send email to 
> > django...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> > django-users...@googlegroups.com . 
> > For more options, visit this group at 
> > http://groups.google.com/group/django-users?hl=en. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/rwaVmDBLz_8J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

2012-11-19 Thread Sergiy Khohlov
 Which version of django ?
 Is this one version has python 3.x support ?

2012/11/20 Cj Taylor :
> ok, so what needs to happen here?  Do I need to recode
> /usr/local/lib/python3.2/dist-packages/django/db/backends/mysql/base.py to
> use this new module?
>
>
> On Sunday, November 18, 2012 4:57:02 PM UTC-5, iñigo medina wrote:
>>
>>
>> On Sat, 17 Nov 2012, Cj Taylor wrote:
>>
>> > That package installs into my python directory but not python3.  I'm
>> > currently trying to get Django 1.5 to work with python3.  Are there
>> > other
>> > ways currently to get mysql to work with django and the python3
>> > environment?
>>
>> Check out pymysql:
>> https://github.com/petehunt/PyMySQL/
>>
>> i�
>>
>> >
>> > Try this :
>> >
>> >> sudo apt-get install python-mysqldb
>> >>
>> >> --
>> >> Sandeep Kaur
>> >> E-Mail: mkaur...@gmail.com 
>> >> Blog: sandymadaan.wordpress.com
>> >>
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Django users" group.
>> > To view this discussion on the web visit
>> > https://groups.google.com/d/msg/django-users/-/VfrRmTUUQrgJ.
>> > To post to this group, send email to django...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > django-users...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/django-users?hl=en.
>> >
>> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/25S322O0_YkJ.
>
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

2012-11-19 Thread Cj Taylor
ok, so what needs to happen here?  Do I need to recode 
/usr/local/lib/python3.2/dist-packages/django/db/backends/mysql/base.py 
to use this new module?

On Sunday, November 18, 2012 4:57:02 PM UTC-5, iñigo medina wrote:
>
>
> On Sat, 17 Nov 2012, Cj Taylor wrote: 
>
> > That package installs into my python directory but not python3.  I'm 
> > currently trying to get Django 1.5 to work with python3.  Are there 
> other 
> > ways currently to get mysql to work with django and the python3 
> environment? 
>
> Check out pymysql: 
> https://github.com/petehunt/PyMySQL/ 
>
> i� 
>
> > 
> > Try this : 
> > 
> >> sudo apt-get install python-mysqldb 
> >> 
> >> -- 
> >> Sandeep Kaur 
> >> E-Mail: mkaur...@gmail.com  
> >> Blog: sandymadaan.wordpress.com 
> >> 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "Django users" group. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msg/django-users/-/VfrRmTUUQrgJ. 
> > To post to this group, send email to 
> > django...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> django-users...@googlegroups.com . 
> > For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en. 
> > 
> >

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/25S322O0_YkJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

2012-11-18 Thread I単igo Medina


On Sat, 17 Nov 2012, Cj Taylor wrote:


That package installs into my python directory but not python3.  I'm
currently trying to get Django 1.5 to work with python3.  Are there other
ways currently to get mysql to work with django and the python3 environment?


Check out pymysql:
https://github.com/petehunt/PyMySQL/

iń



Try this :


sudo apt-get install python-mysqldb

--
Sandeep Kaur
E-Mail: mkaur...@gmail.com 
Blog: sandymadaan.wordpress.com



--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/VfrRmTUUQrgJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

2012-11-18 Thread I単igo Medina


On Sat, 17 Nov 2012, Cj Taylor wrote:


That package installs into my python directory but not python3.  I'm
currently trying to get Django 1.5 to work with python3.  Are there other
ways currently to get mysql to work with django and the python3 environment?


Check out pymysql:
https://github.com/petehunt/PyMySQL/

iń



Try this :


sudo apt-get install python-mysqldb

--
Sandeep Kaur
E-Mail: mkaur...@gmail.com 
Blog: sandymadaan.wordpress.com



--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/VfrRmTUUQrgJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

2012-11-18 Thread I単igo Medina


On Sat, 17 Nov 2012, Cj Taylor wrote:


That package installs into my python directory but not python3.  I'm
currently trying to get Django 1.5 to work with python3.  Are there other
ways currently to get mysql to work with django and the python3 environment?


Check out pymysql:
https://github.com/petehunt/PyMySQL/

iń



Try this :


sudo apt-get install python-mysqldb

--
Sandeep Kaur
E-Mail: mkaur...@gmail.com 
Blog: sandymadaan.wordpress.com



--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/VfrRmTUUQrgJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

2012-11-18 Thread Sandeep kaur
On Sun, Nov 18, 2012 at 4:11 AM, Cj Taylor  wrote:
> That package installs into my python directory but not python3.  I'm
> currently trying to get Django 1.5 to work with python3.  Are there other
> ways currently to get mysql to work with django and the python3 environment?

See if this helps :
https://github.com/vsajip/MySQL-for-Python-3

-- 
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

2012-11-17 Thread Cj Taylor
That package installs into my python directory but not python3.  I'm 
currently trying to get Django 1.5 to work with python3.  Are there other 
ways currently to get mysql to work with django and the python3 environment?

Try this : 

> sudo apt-get install python-mysqldb 
>
> -- 
> Sandeep Kaur 
> E-Mail: mkaur...@gmail.com  
> Blog: sandymadaan.wordpress.com 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/VfrRmTUUQrgJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

2012-11-17 Thread Sandeep kaur
On Fri, Nov 16, 2012 at 10:59 AM, Cj Taylor <c...@cjcode.com> wrote:
> Hello all,
>   I'm new to Django and somewhat Python (a PHP refugee).  I have been
> learning Python 3.0 so decided to give 1.5 a run.  I tried to run the
> command below and mysqldb is missing.  I noticed on
> http://mysql-python.blogspot.com/ that mysqldb won't be ready for 3.0 until
> the 1.3 release.  So I guess the question is if there's any kind of
> workaround at the moment?
>

> raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
> django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module:
> No module named MySQLdb
>
Try this :
sudo apt-get install python-mysqldb

-- 
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

2012-11-15 Thread Cj Taylor
Hello all,
  I'm new to Django and somewhat Python (a PHP refugee).  I have been 
learning Python 3.0 so decided to give 1.5 a run.  I tried to run the 
command below and mysqldb is missing.  I noticed on 
http://mysql-python.blogspot.com/ that mysqldb won't be ready for 3.0 until 
the 1.3 release.  So I guess the question is if there's any kind of 
workaround at the moment? 

Thanks,
  CJ

~/www$ python3 manage.py syncdb
Traceback (most recent call last):
  File 
"/usr/local/lib/python3.2/dist-packages/django/db/backends/mysql/base.py", 
line 14, in 
import MySQLdb as Database
ImportError: No module named MySQLdb

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "manage.py", line 10, in 
execute_from_command_line(sys.argv)
  File 
"/usr/local/lib/python3.2/dist-packages/django/core/management/__init__.py", 
line 451, in execute_from_command_line
utility.execute()
  File 
"/usr/local/lib/python3.2/dist-packages/django/core/management/__init__.py", 
line 390, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/usr/local/lib/python3.2/dist-packages/django/core/management/__init__.py", 
line 270, in fetch_command
klass = load_command_class(app_name, subcommand)
  File 
"/usr/local/lib/python3.2/dist-packages/django/core/management/__init__.py", 
line 76, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/usr/local/lib/python3.2/dist-packages/django/utils/importlib.py", 
line 35, in import_module
__import__(name)
  File 
"/usr/local/lib/python3.2/dist-packages/django/core/management/commands/syncdb.py",
 
line 8, in 
from django.core.management.sql import custom_sql_for_model, 
emit_post_sync_signal
  File 
"/usr/local/lib/python3.2/dist-packages/django/core/management/sql.py", 
line 9, in 
from django.db import models
  File "/usr/local/lib/python3.2/dist-packages/django/db/__init__.py", line 
40, in 
backend = load_backend(connection.settings_dict['ENGINE'])
  File "/usr/local/lib/python3.2/dist-packages/django/db/__init__.py", line 
34, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
  File "/usr/local/lib/python3.2/dist-packages/django/db/utils.py", line 
85, in __getitem__
backend = load_backend(db['ENGINE'])
  File "/usr/local/lib/python3.2/dist-packages/django/db/utils.py", line 
26, in load_backend
return import_module('.base', backend_name)
  File "/usr/local/lib/python3.2/dist-packages/django/utils/importlib.py", 
line 35, in import_module
__import__(name)
  File 
"/usr/local/lib/python3.2/dist-packages/django/db/backends/mysql/base.py", 
line 17, in 
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: 
No module named MySQLdb

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/TAWAb2UBHzsJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.