Re: ImportError at/ No module name

2016-10-01 Thread Aravind S

Check this post 



On Thursday, December 20, 2012 at 6:57:42 PM UTC+5:30, djangobie wrote:
>
> Hi, I have just started practicing a tutorial for buidling a  basic blog ( 
> http://www.djangorocks.com/tutorials/how-to-create-a-basic-blog-in-django/starting-your-application.html
>  )
>
> Did exactly the same (except, using 'djangopractice' as project name 
> instead of 'djangorocks')
> Actually It also did run twice, but than started showing ImportError.
>
> My files:
> 
> ***settings.py***
> 
> # Django settings for djangopractice project.
> #import os, django
> #DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__))
> #SITE_ROOT = os.path.dirname(os.path.realpath('__file__'))
>
> DEBUG = True
> TEMPLATE_DEBUG = DEBUG
>
> ADMINS = (
> # ('Your Name', 'your_...@example.com '),
> )
>
> MANAGERS = ADMINS
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 
> 'mysql', 'sqlite3' or 'oracle'.
> 'NAME': 'djangopractice',  # Or path to 
> database file if using sqlite3.
> 'USER': 'root',  # Not used with sqlite3.
> 'PASSWORD': '1290',  # Not used with sqlite3.
> 'HOST': '',  # Set to empty string for 
> localhost. Not used with sqlite3.
> 'PORT': '',  # Set to empty string for 
> default. Not used with sqlite3.
> }
> }
>
> # Local time zone for this installation. Choices can be found here:
> # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
> # although not all choices may be available on all operating systems.
> # In a Windows environment this must be set to your system time zone.
> TIME_ZONE = 'Asia/Karachi'
>
> # Language code for this installation. All choices can be found here:
> # http://www.i18nguy.com/unicode/language-identifiers.html
> LANGUAGE_CODE = 'en-us'
>
> SITE_ID = 1
>
> # If you set this to False, Django will make some optimizations so as not
> # to load the internationalization machinery.
> USE_I18N = True
>
> # If you set this to False, Django will not format dates, numbers and
> # calendars according to the current locale.
> USE_L10N = True
>
> # If you set this to False, Django will not use timezone-aware datetimes.
> USE_TZ = True
>
> # Absolute filesystem path to the directory that will hold user-uploaded 
> files.
> # Example: "/home/media/media.lawrence.com/media/"
> MEDIA_ROOT = ''
>
> # URL that handles the media served from MEDIA_ROOT. Make sure to use a
> # trailing slash.
> # Examples: "http://media.lawrence.com/media/;, "http://example.com/media/
> "
> MEDIA_URL = ''
>
> # Absolute path to the directory static files should be collected to.
> # Don't put anything in this directory yourself; store your static files
> # in apps' "static/" subdirectories and in STATICFILES_DIRS.
> # Example: "/home/media/media.lawrence.com/static/"
> STATIC_ROOT = ''
>
> # URL prefix for static files.
> # Example: "http://media.lawrence.com/static/;
> STATIC_URL = '/static/'
>
> # Additional locations of static files
> STATICFILES_DIRS = (
> # Put strings here, like "/home/html/static" or "C:/www/django/static".
> # Always use forward slashes, even on Windows.
> # Don't forget to use absolute paths, not relative paths.
> )
>
> # List of finder classes that know how to find static files in
> # various locations.
> STATICFILES_FINDERS = (
> 'django.contrib.staticfiles.finders.FileSystemFinder',
> 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
> #'django.contrib.staticfiles.finders.DefaultStorageFinder',
> )
>
> # Make this unique, and don't share it with anybody.
> SECRET_KEY = '@io!2+0*rw1o0tjq%t5zb8e$v(wf3p#yk_8#lb^%hrerzijwt1'
>
> # List of callables that know how to import templates from various sources.
> TEMPLATE_LOADERS = (
> 'django.template.loaders.filesystem.Loader',
> 'django.template.loaders.app_directories.Loader',
> # 'django.template.loaders.eggs.Loader',
> )
>
> MIDDLEWARE_CLASSES = (
> 'django.middleware.common.CommonMiddleware',
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.contrib.messages.middleware.MessageMiddleware',
> # Uncomment the next line for simple clickjacking protection:
> # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
> )
>
> ROOT_URLCONF = 'djangopractice.urls'
>
> # Python dotted path to the WSGI application used by Django's runserver.
> WSGI_APPLICATION = 'djangopractice.wsgi.application'
>
> TEMPLATE_DIRS = (
> "/home/username/djangosites/djangopractice/Templates"
> # Put strings here, like "/home/html/django_templates" or 
> "C:/www/django/templates".
> # Always use forward slashes, even on Windows.
> 

Re: ImportError at/ No module name

2015-11-07 Thread Scott Anderson
We just tripped across something similar here as well. The person doing the 
tutorial had flipped the 'startup' and 'put "blog" in the INSTALLED_APPS' 
steps of the tutorial. She commented out 'blog' from INSTALLED_APPS and 
startapp worked as intended.

-scott

On Sunday, August 11, 2013 at 8:11:11 PM UTC-4, Pranay Shah wrote:
>
> I just want to thank everyone. I had an error "no module name image" since 
> yesterday nite. I googled and found out that I need to install python image 
> library. I did that. I still continued getting error. Just then I came 
> across this post where someone was getting "no module... blog". I read it 
> and found out the prob. Initially I had an "image" view which I deleted 
> last nite as I was no longer gonna use it. But I didnt remove its mapping 
> form the urls.py. I commented the lines for image - views and it worked.
>
> Thank you all. Now I shall start working on the actual stuff which I was 
> supposed to work from last nite. Its actually my internship homework.
>
> Thank you once again. 
>
> On Thursday, 20 December 2012 05:27:42 UTC-8, djangobie wrote:
>>
>> Hi, I have just started practicing a tutorial for buidling a  basic blog 
>> ( 
>> http://www.djangorocks.com/tutorials/how-to-create-a-basic-blog-in-django/starting-your-application.html
>>  )
>>
>> Did exactly the same (except, using 'djangopractice' as project name 
>> instead of 'djangorocks')
>> Actually It also did run twice, but than started showing ImportError.
>>
>> My files:
>> 
>> ***settings.py***
>> 
>> # Django settings for djangopractice project.
>> #import os, django
>> #DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__))
>> #SITE_ROOT = os.path.dirname(os.path.realpath('__file__'))
>>
>> DEBUG = True
>> TEMPLATE_DEBUG = DEBUG
>>
>> ADMINS = (
>> # ('Your Name', 'your_...@example.com'),
>> )
>>
>> MANAGERS = ADMINS
>>
>> DATABASES = {
>> 'default': {
>> 'ENGINE': 'django.db.backends.mysql', # Add 
>> 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
>> 'NAME': 'djangopractice',  # Or path to 
>> database file if using sqlite3.
>> 'USER': 'root',  # Not used with sqlite3.
>> 'PASSWORD': '1290',  # Not used with sqlite3.
>> 'HOST': '',  # Set to empty string for 
>> localhost. Not used with sqlite3.
>> 'PORT': '',  # Set to empty string for 
>> default. Not used with sqlite3.
>> }
>> }
>>
>> # Local time zone for this installation. Choices can be found here:
>> # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
>> # although not all choices may be available on all operating systems.
>> # In a Windows environment this must be set to your system time zone.
>> TIME_ZONE = 'Asia/Karachi'
>>
>> # Language code for this installation. All choices can be found here:
>> # http://www.i18nguy.com/unicode/language-identifiers.html
>> LANGUAGE_CODE = 'en-us'
>>
>> SITE_ID = 1
>>
>> # If you set this to False, Django will make some optimizations so as not
>> # to load the internationalization machinery.
>> USE_I18N = True
>>
>> # If you set this to False, Django will not format dates, numbers and
>> # calendars according to the current locale.
>> USE_L10N = True
>>
>> # If you set this to False, Django will not use timezone-aware datetimes.
>> USE_TZ = True
>>
>> # Absolute filesystem path to the directory that will hold user-uploaded 
>> files.
>> # Example: "/home/media/media.lawrence.com/media/"
>> MEDIA_ROOT = ''
>>
>> # URL that handles the media served from MEDIA_ROOT. Make sure to use a
>> # trailing slash.
>> # Examples: "http://media.lawrence.com/media/;, "
>> http://example.com/media/;
>> MEDIA_URL = ''
>>
>> # Absolute path to the directory static files should be collected to.
>> # Don't put anything in this directory yourself; store your static files
>> # in apps' "static/" subdirectories and in STATICFILES_DIRS.
>> # Example: "/home/media/media.lawrence.com/static/"
>> STATIC_ROOT = ''
>>
>> # URL prefix for static files.
>> # Example: "http://media.lawrence.com/static/;
>> STATIC_URL = '/static/'
>>
>> # Additional locations of static files
>> STATICFILES_DIRS = (
>> # Put strings here, like "/home/html/static" or 
>> "C:/www/django/static".
>> # Always use forward slashes, even on Windows.
>> # Don't forget to use absolute paths, not relative paths.
>> )
>>
>> # List of finder classes that know how to find static files in
>> # various locations.
>> STATICFILES_FINDERS = (
>> 'django.contrib.staticfiles.finders.FileSystemFinder',
>> 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
>> #'django.contrib.staticfiles.finders.DefaultStorageFinder',
>> )
>>
>> # Make this unique, and don't share it with anybody.
>> SECRET_KEY = '@io!2+0*rw1o0tjq%t5zb8e$v(wf3p#yk_8#lb^%hrerzijwt1'
>>
>> # List of callables that know how to import templates from various 
>> 

Re: ImportError at/ No module name

2013-08-11 Thread Pranay Shah
I just want to thank everyone. I had an error "no module name image" since 
yesterday nite. I googled and found out that I need to install python image 
library. I did that. I still continued getting error. Just then I came 
across this post where someone was getting "no module... blog". I read it 
and found out the prob. Initially I had an "image" view which I deleted 
last nite as I was no longer gonna use it. But I didnt remove its mapping 
form the urls.py. I commented the lines for image - views and it worked.

Thank you all. Now I shall start working on the actual stuff which I was 
supposed to work from last nite. Its actually my internship homework.

Thank you once again. 

On Thursday, 20 December 2012 05:27:42 UTC-8, djangobie wrote:
>
> Hi, I have just started practicing a tutorial for buidling a  basic blog ( 
> http://www.djangorocks.com/tutorials/how-to-create-a-basic-blog-in-django/starting-your-application.html
>  )
>
> Did exactly the same (except, using 'djangopractice' as project name 
> instead of 'djangorocks')
> Actually It also did run twice, but than started showing ImportError.
>
> My files:
> 
> ***settings.py***
> 
> # Django settings for djangopractice project.
> #import os, django
> #DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__))
> #SITE_ROOT = os.path.dirname(os.path.realpath('__file__'))
>
> DEBUG = True
> TEMPLATE_DEBUG = DEBUG
>
> ADMINS = (
> # ('Your Name', 'your_...@example.com '),
> )
>
> MANAGERS = ADMINS
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 
> 'mysql', 'sqlite3' or 'oracle'.
> 'NAME': 'djangopractice',  # Or path to 
> database file if using sqlite3.
> 'USER': 'root',  # Not used with sqlite3.
> 'PASSWORD': '1290',  # Not used with sqlite3.
> 'HOST': '',  # Set to empty string for 
> localhost. Not used with sqlite3.
> 'PORT': '',  # Set to empty string for 
> default. Not used with sqlite3.
> }
> }
>
> # Local time zone for this installation. Choices can be found here:
> # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
> # although not all choices may be available on all operating systems.
> # In a Windows environment this must be set to your system time zone.
> TIME_ZONE = 'Asia/Karachi'
>
> # Language code for this installation. All choices can be found here:
> # http://www.i18nguy.com/unicode/language-identifiers.html
> LANGUAGE_CODE = 'en-us'
>
> SITE_ID = 1
>
> # If you set this to False, Django will make some optimizations so as not
> # to load the internationalization machinery.
> USE_I18N = True
>
> # If you set this to False, Django will not format dates, numbers and
> # calendars according to the current locale.
> USE_L10N = True
>
> # If you set this to False, Django will not use timezone-aware datetimes.
> USE_TZ = True
>
> # Absolute filesystem path to the directory that will hold user-uploaded 
> files.
> # Example: "/home/media/media.lawrence.com/media/"
> MEDIA_ROOT = ''
>
> # URL that handles the media served from MEDIA_ROOT. Make sure to use a
> # trailing slash.
> # Examples: "http://media.lawrence.com/media/;, "http://example.com/media/
> "
> MEDIA_URL = ''
>
> # Absolute path to the directory static files should be collected to.
> # Don't put anything in this directory yourself; store your static files
> # in apps' "static/" subdirectories and in STATICFILES_DIRS.
> # Example: "/home/media/media.lawrence.com/static/"
> STATIC_ROOT = ''
>
> # URL prefix for static files.
> # Example: "http://media.lawrence.com/static/;
> STATIC_URL = '/static/'
>
> # Additional locations of static files
> STATICFILES_DIRS = (
> # Put strings here, like "/home/html/static" or "C:/www/django/static".
> # Always use forward slashes, even on Windows.
> # Don't forget to use absolute paths, not relative paths.
> )
>
> # List of finder classes that know how to find static files in
> # various locations.
> STATICFILES_FINDERS = (
> 'django.contrib.staticfiles.finders.FileSystemFinder',
> 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
> #'django.contrib.staticfiles.finders.DefaultStorageFinder',
> )
>
> # Make this unique, and don't share it with anybody.
> SECRET_KEY = '@io!2+0*rw1o0tjq%t5zb8e$v(wf3p#yk_8#lb^%hrerzijwt1'
>
> # List of callables that know how to import templates from various sources.
> TEMPLATE_LOADERS = (
> 'django.template.loaders.filesystem.Loader',
> 'django.template.loaders.app_directories.Loader',
> # 'django.template.loaders.eggs.Loader',
> )
>
> MIDDLEWARE_CLASSES = (
> 'django.middleware.common.CommonMiddleware',
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 

Re: ImportError at/ No module name

2013-05-23 Thread Rainman Tai
Hi donarb,
Thx a lot. I got the same problem and it's fixed now.


On Tuesday, December 25, 2012 10:16:23 AM UTC-8, donarb wrote:
>
> On Tuesday, December 25, 2012 4:29:22 AM UTC-8, djangobie wrote:
>>
>> I appreciate your response.
>> The __init__.py is there in the app folder (yes, I created the app via 
>> manage.py).
>> It ran perfectly on initial attempts, but with new code added, I got 
>> stuck. My so far conclusion (though, not helping at all) is may be I have 
>> set some kind 'circular loop' here, while loading (importing) modules, 
>> that's why I have pasted all the code from almost all the files.
>>
>> In your urls.py, remove the 'djangopractice' from the view paths. Most 
> likely, the tutorial was written using 1.3. so for the first path, it 
> should be:
>
> url(r'^$', 'blog.views.index'),
>
>
>

-- 
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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: ImportError at/ No module name

2012-12-25 Thread donarb
On Tuesday, December 25, 2012 4:29:22 AM UTC-8, djangobie wrote:
>
> I appreciate your response.
> The __init__.py is there in the app folder (yes, I created the app via 
> manage.py).
> It ran perfectly on initial attempts, but with new code added, I got 
> stuck. My so far conclusion (though, not helping at all) is may be I have 
> set some kind 'circular loop' here, while loading (importing) modules, 
> that's why I have pasted all the code from almost all the files.
>
> In your urls.py, remove the 'djangopractice' from the view paths. Most 
likely, the tutorial was written using 1.3. so for the first path, it 
should be:

url(r'^$', 'blog.views.index'),


-- 
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/-/bW_4NPBNTJ8J.
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: ImportError at/ No module name

2012-12-25 Thread djangobie
I appreciate your response.
The __init__.py is there in the app folder (yes, I created the app via 
manage.py).
It ran perfectly on initial attempts, but with new code added, I got stuck. 
My so far conclusion (though, not helping at all) is may be I have set some 
kind 'circular loop' here, while loading (importing) modules, that's why I 
have pasted all the code from almost all the files.

Thanks

On Tuesday, December 25, 2012 11:11:12 AM UTC+5, Ryan Blunden wrote:
>
> Did this fix the problem for you?
>
> Did you create the application using `python manage.py startapp blog`? If 
> so, that would've created the blog 
> applicationas
>  a Python module. The __init__.py is required so Python knows to treat 
> the directory containing the __int__.py as a 
> module
> .
>
> You can also run `python manage.py validate` when debugging these sort of 
> issues instead of running the local server as a faster feedback loop.
>
> Let us know how you go.
>
> Cheers,
> Ryan
>
> On Thursday, December 20, 2012 5:27:42 AM UTC-8, djangobie wrote:
>>
>> Hi, I have just started practicing a tutorial for buidling a  basic blog 
>> ( 
>> http://www.djangorocks.com/tutorials/how-to-create-a-basic-blog-in-django/starting-your-application.html
>>  )
>>
>> Did exactly the same (except, using 'djangopractice' as project name 
>> instead of 'djangorocks')
>> Actually It also did run twice, but than started showing ImportError.
>>
>> My files:
>> 
>> ***settings.py***
>> 
>> # Django settings for djangopractice project.
>> #import os, django
>> #DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__))
>> #SITE_ROOT = os.path.dirname(os.path.realpath('__file__'))
>>
>> DEBUG = True
>> TEMPLATE_DEBUG = DEBUG
>>
>> ADMINS = (
>> # ('Your Name', 'your_...@example.com'),
>> )
>>
>> MANAGERS = ADMINS
>>
>> DATABASES = {
>> 'default': {
>> 'ENGINE': 'django.db.backends.mysql', # Add 
>> 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
>> 'NAME': 'djangopractice',  # Or path to 
>> database file if using sqlite3.
>> 'USER': 'root',  # Not used with sqlite3.
>> 'PASSWORD': '1290',  # Not used with sqlite3.
>> 'HOST': '',  # Set to empty string for 
>> localhost. Not used with sqlite3.
>> 'PORT': '',  # Set to empty string for 
>> default. Not used with sqlite3.
>> }
>> }
>>
>> # Local time zone for this installation. Choices can be found here:
>> # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
>> # although not all choices may be available on all operating systems.
>> # In a Windows environment this must be set to your system time zone.
>> TIME_ZONE = 'Asia/Karachi'
>>
>> # Language code for this installation. All choices can be found here:
>> # http://www.i18nguy.com/unicode/language-identifiers.html
>> LANGUAGE_CODE = 'en-us'
>>
>> SITE_ID = 1
>>
>> # If you set this to False, Django will make some optimizations so as not
>> # to load the internationalization machinery.
>> USE_I18N = True
>>
>> # If you set this to False, Django will not format dates, numbers and
>> # calendars according to the current locale.
>> USE_L10N = True
>>
>> # If you set this to False, Django will not use timezone-aware datetimes.
>> USE_TZ = True
>>
>> # Absolute filesystem path to the directory that will hold user-uploaded 
>> files.
>> # Example: "/home/media/media.lawrence.com/media/"
>> MEDIA_ROOT = ''
>>
>> # URL that handles the media served from MEDIA_ROOT. Make sure to use a
>> # trailing slash.
>> # Examples: "http://media.lawrence.com/media/;, "
>> http://example.com/media/;
>> MEDIA_URL = ''
>>
>> # Absolute path to the directory static files should be collected to.
>> # Don't put anything in this directory yourself; store your static files
>> # in apps' "static/" subdirectories and in STATICFILES_DIRS.
>> # Example: "/home/media/media.lawrence.com/static/"
>> STATIC_ROOT = ''
>>
>> # URL prefix for static files.
>> # Example: "http://media.lawrence.com/static/;
>> STATIC_URL = '/static/'
>>
>> # Additional locations of static files
>> STATICFILES_DIRS = (
>> # Put strings here, like "/home/html/static" or 
>> "C:/www/django/static".
>> # Always use forward slashes, even on Windows.
>> # Don't forget to use absolute paths, not relative paths.
>> )
>>
>> # List of finder classes that know how to find static files in
>> # various locations.
>> STATICFILES_FINDERS = (
>> 'django.contrib.staticfiles.finders.FileSystemFinder',
>> 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
>> #'django.contrib.staticfiles.finders.DefaultStorageFinder',
>> )
>>
>> # Make this unique, and don't share it with anybody.
>> SECRET_KEY = '@io!2+0*rw1o0tjq%t5zb8e$v(wf3p#yk_8#lb^%hrerzijwt1'

Re: ImportError at/ No module name

2012-12-24 Thread Ryan Blunden
Did this fix the problem for you?

Did you create the application using `python manage.py startapp blog`? If 
so, that would've created the blog 
applicationas
 a Python module. The __init__.py is required so Python knows to treat 
the directory containing the __int__.py as a 
module
.

You can also run `python manage.py validate` when debugging these sort of 
issues instead of running the local server as a faster feedback loop.

Let us know how you go.

Cheers,
Ryan

On Thursday, December 20, 2012 5:27:42 AM UTC-8, djangobie wrote:
>
> Hi, I have just started practicing a tutorial for buidling a  basic blog ( 
> http://www.djangorocks.com/tutorials/how-to-create-a-basic-blog-in-django/starting-your-application.html
>  )
>
> Did exactly the same (except, using 'djangopractice' as project name 
> instead of 'djangorocks')
> Actually It also did run twice, but than started showing ImportError.
>
> My files:
> 
> ***settings.py***
> 
> # Django settings for djangopractice project.
> #import os, django
> #DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__))
> #SITE_ROOT = os.path.dirname(os.path.realpath('__file__'))
>
> DEBUG = True
> TEMPLATE_DEBUG = DEBUG
>
> ADMINS = (
> # ('Your Name', 'your_...@example.com '),
> )
>
> MANAGERS = ADMINS
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 
> 'mysql', 'sqlite3' or 'oracle'.
> 'NAME': 'djangopractice',  # Or path to 
> database file if using sqlite3.
> 'USER': 'root',  # Not used with sqlite3.
> 'PASSWORD': '1290',  # Not used with sqlite3.
> 'HOST': '',  # Set to empty string for 
> localhost. Not used with sqlite3.
> 'PORT': '',  # Set to empty string for 
> default. Not used with sqlite3.
> }
> }
>
> # Local time zone for this installation. Choices can be found here:
> # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
> # although not all choices may be available on all operating systems.
> # In a Windows environment this must be set to your system time zone.
> TIME_ZONE = 'Asia/Karachi'
>
> # Language code for this installation. All choices can be found here:
> # http://www.i18nguy.com/unicode/language-identifiers.html
> LANGUAGE_CODE = 'en-us'
>
> SITE_ID = 1
>
> # If you set this to False, Django will make some optimizations so as not
> # to load the internationalization machinery.
> USE_I18N = True
>
> # If you set this to False, Django will not format dates, numbers and
> # calendars according to the current locale.
> USE_L10N = True
>
> # If you set this to False, Django will not use timezone-aware datetimes.
> USE_TZ = True
>
> # Absolute filesystem path to the directory that will hold user-uploaded 
> files.
> # Example: "/home/media/media.lawrence.com/media/"
> MEDIA_ROOT = ''
>
> # URL that handles the media served from MEDIA_ROOT. Make sure to use a
> # trailing slash.
> # Examples: "http://media.lawrence.com/media/;, "http://example.com/media/
> "
> MEDIA_URL = ''
>
> # Absolute path to the directory static files should be collected to.
> # Don't put anything in this directory yourself; store your static files
> # in apps' "static/" subdirectories and in STATICFILES_DIRS.
> # Example: "/home/media/media.lawrence.com/static/"
> STATIC_ROOT = ''
>
> # URL prefix for static files.
> # Example: "http://media.lawrence.com/static/;
> STATIC_URL = '/static/'
>
> # Additional locations of static files
> STATICFILES_DIRS = (
> # Put strings here, like "/home/html/static" or "C:/www/django/static".
> # Always use forward slashes, even on Windows.
> # Don't forget to use absolute paths, not relative paths.
> )
>
> # List of finder classes that know how to find static files in
> # various locations.
> STATICFILES_FINDERS = (
> 'django.contrib.staticfiles.finders.FileSystemFinder',
> 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
> #'django.contrib.staticfiles.finders.DefaultStorageFinder',
> )
>
> # Make this unique, and don't share it with anybody.
> SECRET_KEY = '@io!2+0*rw1o0tjq%t5zb8e$v(wf3p#yk_8#lb^%hrerzijwt1'
>
> # List of callables that know how to import templates from various sources.
> TEMPLATE_LOADERS = (
> 'django.template.loaders.filesystem.Loader',
> 'django.template.loaders.app_directories.Loader',
> # 'django.template.loaders.eggs.Loader',
> )
>
> MIDDLEWARE_CLASSES = (
> 'django.middleware.common.CommonMiddleware',
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.contrib.messages.middleware.MessageMiddleware',
> # Uncomment the next line for 

Re: ImportError at/ No module name

2012-12-24 Thread Peter of the Norse
The error is pretty clear: It can't find 
/home/username/djangosites/djangopractice/blog/__init__.py Make sure that file 
exists. Try running `manage.py shell` and `import blog`. Also, make sure that 
the files are readable by your web server, e.g. apache.

On Dec 20, 2012, at 9:55 PM, djangobie wrote:
> ImportError at /
> 
> No module named blog
> Request Method:   GET
> Request URL:  http://localhost:8000/
> Django Version:   1.4.3
> Exception Type:   ImportError
> Exception Value:  
> No module named blog
> Exception Location:   
> /usr/local/lib/python2.7/dist-packages/django/utils/importlib.py in 
> import_module, line 35
> Python Executable:/usr/bin/python
> Python Version:   2.7.3
> Python Path:  
> ['/home/username/djangosites/djangopractice',
>  '/usr/lib/python2.7',
>  '/usr/lib/python2.7/plat-linux2',
>  '/usr/lib/python2.7/lib-tk',
>  '/usr/lib/python2.7/lib-old',
>  '/usr/lib/python2.7/lib-dynload',
>  '/usr/local/lib/python2.7/dist-packages',
>  '/usr/lib/python2.7/dist-packages',
>  '/usr/lib/python2.7/dist-packages/PIL',
>  '/usr/lib/python2.7/dist-packages/gst-0.10',
>  '/usr/lib/python2.7/dist-packages/gtk-2.0',
>  '/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
>  '/usr/lib/python2.7/dist-packages/ubuntuone-client',
>  '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel',
>  '/usr/lib/python2.7/dist-packages/ubuntuone-couch',
>  '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol']

Peter of the Norse
rahmc...@radio1190.org



-- 
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: ImportError at/ No module name

2012-12-20 Thread djangobie
I appreciate your response, but it cannot be the case, as my app is present 
in top level dir along with manage.py and project file container i.e. 
'djangopratice': 

*my dir structure is:*
--
djangopractice-
 --djangopractice-
   - __init__.py
   - settings.py
   - urls.py
   - wsgi.py

 --blog-
   - models.py
   - views.py
   - admin.py
   - __init__.py
   - test.py

 --Templates-
  - base.html
  - index.html
  - view_category.html
  - view_posts.html
-


P.S I tried it before posting the question.
Thanks

On Thursday, December 20, 2012 7:22:05 PM UTC+5, sandy wrote:
>
> Make installed apps as : 
>
> INSTALLED_APPS = ( 
>  'django.contrib.auth', 
>  'django.contrib.contenttypes', 
>  'django.contrib.sessions', 
>  'django.contrib.sites', 
>  'django.contrib.messages', 
>  'django.contrib.staticfiles', 
>  'django.contrib.admin', 
>  'django.contrib.admindocs', 
>  'djangopractice.blog', 
> ) 
>
> Hope this helps. 
>
> -- 
> 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/-/IicftNFB6WIJ.
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: ImportError at/ No module name

2012-12-20 Thread djangobie
Can someone kindly look into this.

On Thursday, December 20, 2012 6:27:42 PM UTC+5, djangobie wrote:
>
> Hi, I have just started practicing a tutorial for buidling a  basic blog ( 
> http://www.djangorocks.com/tutorials/how-to-create-a-basic-blog-in-django/starting-your-application.html
>  )
>
> Did exactly the same (except, using 'djangopractice' as project name 
> instead of 'djangorocks')
> Actually It also did run twice, but than started showing ImportError.
>
> My files:
> 
> ***settings.py***
> 
> # Django settings for djangopractice project.
> #import os, django
> #DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__))
> #SITE_ROOT = os.path.dirname(os.path.realpath('__file__'))
>
> DEBUG = True
> TEMPLATE_DEBUG = DEBUG
>
> ADMINS = (
> # ('Your Name', 'your_em...@example.com'),
> )
>
> MANAGERS = ADMINS
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 
> 'mysql', 'sqlite3' or 'oracle'.
> 'NAME': 'djangopractice',  # Or path to 
> database file if using sqlite3.
> 'USER': 'root',  # Not used with sqlite3.
> 'PASSWORD': '1290',  # Not used with sqlite3.
> 'HOST': '',  # Set to empty string for 
> localhost. Not used with sqlite3.
> 'PORT': '',  # Set to empty string for 
> default. Not used with sqlite3.
> }
> }
>
> # Local time zone for this installation. Choices can be found here:
> # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
> # although not all choices may be available on all operating systems.
> # In a Windows environment this must be set to your system time zone.
> TIME_ZONE = 'Asia/Karachi'
>
> # Language code for this installation. All choices can be found here:
> # http://www.i18nguy.com/unicode/language-identifiers.html
> LANGUAGE_CODE = 'en-us'
>
> SITE_ID = 1
>
> # If you set this to False, Django will make some optimizations so as not
> # to load the internationalization machinery.
> USE_I18N = True
>
> # If you set this to False, Django will not format dates, numbers and
> # calendars according to the current locale.
> USE_L10N = True
>
> # If you set this to False, Django will not use timezone-aware datetimes.
> USE_TZ = True
>
> # Absolute filesystem path to the directory that will hold user-uploaded 
> files.
> # Example: "/home/media/media.lawrence.com/media/"
> MEDIA_ROOT = ''
>
> # URL that handles the media served from MEDIA_ROOT. Make sure to use a
> # trailing slash.
> # Examples: "http://media.lawrence.com/media/;, "http://example.com/media/
> "
> MEDIA_URL = ''
>
> # Absolute path to the directory static files should be collected to.
> # Don't put anything in this directory yourself; store your static files
> # in apps' "static/" subdirectories and in STATICFILES_DIRS.
> # Example: "/home/media/media.lawrence.com/static/"
> STATIC_ROOT = ''
>
> # URL prefix for static files.
> # Example: "http://media.lawrence.com/static/;
> STATIC_URL = '/static/'
>
> # Additional locations of static files
> STATICFILES_DIRS = (
> # Put strings here, like "/home/html/static" or "C:/www/django/static".
> # Always use forward slashes, even on Windows.
> # Don't forget to use absolute paths, not relative paths.
> )
>
> # List of finder classes that know how to find static files in
> # various locations.
> STATICFILES_FINDERS = (
> 'django.contrib.staticfiles.finders.FileSystemFinder',
> 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
> #'django.contrib.staticfiles.finders.DefaultStorageFinder',
> )
>
> # Make this unique, and don't share it with anybody.
> SECRET_KEY = '@io!2+0*rw1o0tjq%t5zb8e$v(wf3p#yk_8#lb^%hrerzijwt1'
>
> # List of callables that know how to import templates from various sources.
> TEMPLATE_LOADERS = (
> 'django.template.loaders.filesystem.Loader',
> 'django.template.loaders.app_directories.Loader',
> # 'django.template.loaders.eggs.Loader',
> )
>
> MIDDLEWARE_CLASSES = (
> 'django.middleware.common.CommonMiddleware',
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.contrib.messages.middleware.MessageMiddleware',
> # Uncomment the next line for simple clickjacking protection:
> # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
> )
>
> ROOT_URLCONF = 'djangopractice.urls'
>
> # Python dotted path to the WSGI application used by Django's runserver.
> WSGI_APPLICATION = 'djangopractice.wsgi.application'
>
> TEMPLATE_DIRS = (
> "/home/username/djangosites/djangopractice/Templates"
> # Put strings here, like "/home/html/django_templates" or 
> "C:/www/django/templates".
> # Always use forward slashes, even on Windows.
> # Don't forget to use absolute paths, not relative paths.
> )
>
> 

Re: ImportError at/ No module name

2012-12-20 Thread Sandeep kaur
Make installed apps as :

INSTALLED_APPS = (
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.admin',
 'django.contrib.admindocs',
 'djangopractice.blog',
)

Hope this helps.

--
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.



ImportError at/ No module name

2012-12-20 Thread djangobie
Hi, I have just started practicing a tutorial for buidling a  basic blog ( 
http://www.djangorocks.com/tutorials/how-to-create-a-basic-blog-in-django/starting-your-application.html
 )

Did exactly the same (except, using 'djangopractice' as project name 
instead of 'djangorocks')
Actually It also did run twice, but than started showing ImportError.

My files:

***settings.py***

# Django settings for djangopractice project.
#import os, django
#DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__))
#SITE_ROOT = os.path.dirname(os.path.realpath('__file__'))

DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (
# ('Your Name', 'your_em...@example.com'),
)

MANAGERS = ADMINS

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 
'mysql', 'sqlite3' or 'oracle'.
'NAME': 'djangopractice',  # Or path to 
database file if using sqlite3.
'USER': 'root',  # Not used with sqlite3.
'PASSWORD': '1290',  # Not used with sqlite3.
'HOST': '',  # Set to empty string for 
localhost. Not used with sqlite3.
'PORT': '',  # Set to empty string for default. 
Not used with sqlite3.
}
}

# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# In a Windows environment this must be set to your system time zone.
TIME_ZONE = 'Asia/Karachi'

# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'

SITE_ID = 1

# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True

# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale.
USE_L10N = True

# If you set this to False, Django will not use timezone-aware datetimes.
USE_TZ = True

# Absolute filesystem path to the directory that will hold user-uploaded 
files.
# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT = ''

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/;, "http://example.com/media/;
MEDIA_URL = ''

# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = ''

# URL prefix for static files.
# Example: "http://media.lawrence.com/static/;
STATIC_URL = '/static/'

# Additional locations of static files
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)

# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
#'django.contrib.staticfiles.finders.DefaultStorageFinder',
)

# Make this unique, and don't share it with anybody.
SECRET_KEY = '@io!2+0*rw1o0tjq%t5zb8e$v(wf3p#yk_8#lb^%hrerzijwt1'

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)

MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
# Uncomment the next line for simple clickjacking protection:
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

ROOT_URLCONF = 'djangopractice.urls'

# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'djangopractice.wsgi.application'

TEMPLATE_DIRS = (
"/home/username/djangosites/djangopractice/Templates"
# Put strings here, like "/home/html/django_templates" or 
"C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'django.contrib.admindocs',
'blog',
)

# A sample logging configuration. The only tangible logging
# 

ImportError at/ No module name

2012-12-20 Thread Nabeel Ahmed
Hi, I have just started practicing a tutorial for buidling a  basic blog ( 
http://www.djangorocks.com/tutorials/how-to-create-a-basic-blog-in-django/starting-your-application.html
 )

Did exactly the same (except, using 'djangopractice' as project name 
instead of 'djangorocks')
Actually It also did run twice, but than started showing ImportError.

My files:

***settings.py***

# Django settings for djangopractice project.
#import os, django
#DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__))
#SITE_ROOT = os.path.dirname(os.path.realpath('__file__'))

DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (
# ('Your Name', 'your_em...@example.com'),
)

MANAGERS = ADMINS

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 
'mysql', 'sqlite3' or 'oracle'.
'NAME': 'djangopractice',  # Or path to 
database file if using sqlite3.
'USER': 'root',  # Not used with sqlite3.
'PASSWORD': '1290',  # Not used with sqlite3.
'HOST': '',  # Set to empty string for 
localhost. Not used with sqlite3.
'PORT': '',  # Set to empty string for default. 
Not used with sqlite3.
}
}

# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# In a Windows environment this must be set to your system time zone.
TIME_ZONE = 'Asia/Karachi'

# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'

SITE_ID = 1

# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True

# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale.
USE_L10N = True

# If you set this to False, Django will not use timezone-aware datetimes.
USE_TZ = True

# Absolute filesystem path to the directory that will hold user-uploaded 
files.
# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT = ''

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/;, "http://example.com/media/;
MEDIA_URL = ''

# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = ''

# URL prefix for static files.
# Example: "http://media.lawrence.com/static/;
STATIC_URL = '/static/'

# Additional locations of static files
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)

# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
#'django.contrib.staticfiles.finders.DefaultStorageFinder',
)

# Make this unique, and don't share it with anybody.
SECRET_KEY = '@io!2+0*rw1o0tjq%t5zb8e$v(wf3p#yk_8#lb^%hrerzijwt1'

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)

MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
# Uncomment the next line for simple clickjacking protection:
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

ROOT_URLCONF = 'djangopractice.urls'

# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'djangopractice.wsgi.application'

TEMPLATE_DIRS = (
"/home/nabeel/djangosites/djangopractice/Templates"
# Put strings here, like "/home/html/django_templates" or 
"C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'django.contrib.admindocs',
'blog',
)

# A sample logging configuration. The only tangible logging
#