Re: First steps in Django 1.11.5 and I have my first error

2017-09-23 Thread Gerardo Palazuelos Guerrero
Hi,
Another beginner here .

 I'm not sure what you did exactly so it caused your error.

But I'm following the django girls tutorial; I cannot completely express how 
good it was for me, it was my first tutorial.

I want to recommend you to check it out, it will guide you on how to run the 
app for the first time.

Regards,
Gerardo.

---
Gerardo Palazuelos
Enviado desde mi iPhone


> El 23/09/2017, a las 09:01, Diego Muiño Orallo  escribió:
> 
> Hello, this is my first app in Django and I have the next error:
> When I launch python manage.py runserver --settings=eventus.settings.local 
> apear this error:
> 
> Unhandled exception in thread started by  check_errors..wrapper at 0x110c72158>
> 
> Traceback (most recent call last):
> 
>   File 
> "/Users/dmuino/eventus/lib/python3.6/site-packages/django/utils/autoreload.py",
>  line 228, in wrapper
> 
> fn(*args, **kwargs)
> 
>   File 
> "/Users/dmuino/eventus/lib/python3.6/site-packages/django/core/management/commands/runserver.py",
>  line 117, in inner_run
> 
> autoreload.raise_last_exception()
> 
>   File 
> "/Users/dmuino/eventus/lib/python3.6/site-packages/django/utils/autoreload.py",
>  line 251, in raise_last_exception
> 
> six.reraise(*_exception)
> 
>   File 
> "/Users/dmuino/eventus/lib/python3.6/site-packages/django/utils/six.py", line 
> 685, in reraise
> 
> raise value.with_traceback(tb)
> 
>   File 
> "/Users/dmuino/eventus/lib/python3.6/site-packages/django/utils/autoreload.py",
>  line 228, in wrapper
> 
> fn(*args, **kwargs)
> 
>   File 
> "/Users/dmuino/eventus/lib/python3.6/site-packages/django/__init__.py", line 
> 27, in setup
> 
> apps.populate(settings.INSTALLED_APPS)
> 
>   File 
> "/Users/dmuino/eventus/lib/python3.6/site-packages/django/apps/registry.py", 
> line 85, in populate
> 
> app_config = AppConfig.create(entry)
> 
>   File 
> "/Users/dmuino/eventus/lib/python3.6/site-packages/django/apps/config.py", 
> line 120, in create
> 
> mod = import_module(mod_path)
> 
>   File "/Users/dmuino/eventus/lib/python3.6/importlib/__init__.py", line 126, 
> in import_module
> 
> return _bootstrap._gcd_import(name[level:], package, level)
> 
>   File "", line 978, in _gcd_import
> 
>   File "", line 961, in _find_and_load
> 
>   File "", line 948, in _find_and_load_unlocked
> 
> ModuleNotFoundError: No module named 'myapps'
> 
> 
> I separated my setting for different archives.
> My setting/base.py is:
> """
> Django settings for eventus project.
> 
> Generated by 'django-admin startproject' using Django 1.11.5.
> 
> For more information on this file, see
> https://docs.djangoproject.com/en/1.11/topics/settings/
> 
> For the full list of settings and their values, see
> https://docs.djangoproject.com/en/1.11/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/1.11/howto/deployment/checklist/
> 
> # SECURITY WARNING: keep the secret key used in production secret!
> SECRET_KEY = 'vmtu6=u+a-c_qle*+m(kwjpr$n^0ecb&5r0!#=l0vmvw_4j3tn'
> 
> # SECURITY WARNING: don't run with debug turned on in production!
> DEBUG = True
> 
> ALLOWED_HOSTS = []
> 
> 
> # Application definition
> 
> DJANGO_APPS = [
> 'django.contrib.admin',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
> ]
> 
> LOCAL_APPS = [
> 'myapps.events',
> ]
> 
> THIRD_PARTY_APPS = [
> ]
> 
> INSTALLED_APPS = DJANGO_APPS + LOCAL_APPS + THIRD_PARTY_APPS
> 
> 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 = 'eventus.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 = 'eventus.wsgi.application'
> 
> 
> # Password validation
> # 
> https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators
> 
> AUTH_PASSWORD_VALIDATORS = [
> {
> 'NAME': 
> 

First steps in Django 1.11.5 and I have my first error

2017-09-23 Thread Diego Muiño Orallo
Hello, this is my first app in Django and I have the next error:
When I launch python manage.py runserver --settings=eventus.settings.local 
apear this error:

Unhandled exception in thread started by .wrapper at 0x110c72158>

Traceback (most recent call last):

  File 
"/Users/dmuino/eventus/lib/python3.6/site-packages/django/utils/autoreload.py", 
line 228, in wrapper

fn(*args, **kwargs)

  File 
"/Users/dmuino/eventus/lib/python3.6/site-packages/django/core/management/commands/runserver.py",
 
line 117, in inner_run

autoreload.raise_last_exception()

  File 
"/Users/dmuino/eventus/lib/python3.6/site-packages/django/utils/autoreload.py", 
line 251, in raise_last_exception

six.reraise(*_exception)

  File 
"/Users/dmuino/eventus/lib/python3.6/site-packages/django/utils/six.py", 
line 685, in reraise

raise value.with_traceback(tb)

  File 
"/Users/dmuino/eventus/lib/python3.6/site-packages/django/utils/autoreload.py", 
line 228, in wrapper

fn(*args, **kwargs)

  File 
"/Users/dmuino/eventus/lib/python3.6/site-packages/django/__init__.py", 
line 27, in setup

apps.populate(settings.INSTALLED_APPS)

  File 
"/Users/dmuino/eventus/lib/python3.6/site-packages/django/apps/registry.py", 
line 85, in populate

app_config = AppConfig.create(entry)

  File 
"/Users/dmuino/eventus/lib/python3.6/site-packages/django/apps/config.py", 
line 120, in create

mod = import_module(mod_path)

  File "/Users/dmuino/eventus/lib/python3.6/importlib/__init__.py", line 
126, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

  File "", line 978, in _gcd_import

  File "", line 961, in _find_and_load

  File "", line 948, in _find_and_load_unlocked

ModuleNotFoundError: No module named 'myapps'

I separated my setting for different archives.
My setting/base.py is:
"""
Django settings for eventus project.

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

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

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/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/1.11/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'vmtu6=u+a-c_qle*+m(kwjpr$n^0ecb&5r0!#=l0vmvw_4j3tn'

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

ALLOWED_HOSTS = []


# Application definition

DJANGO_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]

LOCAL_APPS = [
'myapps.events',
]

THIRD_PARTY_APPS = [
]

INSTALLED_APPS = DJANGO_APPS + LOCAL_APPS + THIRD_PARTY_APPS

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 = 'eventus.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 = 'eventus.wsgi.application'


# Password validation
# 
https://docs.djangoproject.com/en/1.11/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/1.11/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


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

and my settings/local.py
from .base import *

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

DATABASES = {
'default': {
'ENGINE': 

RE: first steps with django

2013-03-24 Thread Babatunde Akinyanmi
I love this post

Sent from my Windows Phone
--
From: Jeffrey Black
Sent: 3/24/2013 4:22 PM
To: django-users@googlegroups.com
Cc: django-users@googlegroups.com
Subject: Re: first steps with django

Give this a look first.

http://www.jeffknupp.com/blog/2012/10/24/starting-a-django-14-project-the-right-way/

jb

On Mar 24, 2013, at 5:23 AM, My Wasteland <wasteland.t...@gmail.com> wrote:

Hi list,

I am a Django newbie. I have been going through the official tutorial on my
local machine. I have got some general questions:

1. Where should I develop my Django applications? Should I still do it on
my local machine and then transfer them somehow to a hosting provider I'm
with? Or should I develop it straight on a hosting provider's server
(hosting provider provides a one-click django installation).

2. If the development should be on the hosting provider's account (ssh
access), then could you clarify the following? Imagine want the home page
to be static (eg. www.example.com) then I want my django app - blog on
www.example.com/blog, then I'd start a new django app in public_html/blog
right?

If I'm confusing things, please correct me.

Thank you
Martin

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



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

-- 
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: first steps with django

2013-03-24 Thread John
On 24/03/13 15:26, Shawn Milochik wrote:
> On Sun, Mar 24, 2013 at 11:21 AM, Jeffrey Black  
> wrote:
>> Give this a look first.
>>
>> http://www.jeffknupp.com/blog/2012/10/24/starting-a-django-14-project-the-right-way/
>>
>> jb
> That's a good post. I give a hearty +1 to virtualenv, South, Fabric, and git.
>
Thank you. I will follow it.

-- 
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: first steps with django

2013-03-24 Thread Shawn Milochik
On Sun, Mar 24, 2013 at 11:21 AM, Jeffrey Black  wrote:
> Give this a look first.
>
> http://www.jeffknupp.com/blog/2012/10/24/starting-a-django-14-project-the-right-way/
>
> jb

That's a good post. I give a hearty +1 to virtualenv, South, Fabric, and git.

-- 
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: first steps with django

2013-03-24 Thread Jeffrey Black
Give this a look first.

http://www.jeffknupp.com/blog/2012/10/24/starting-a-django-14-project-the-right-way/

jb

On Mar 24, 2013, at 5:23 AM, My Wasteland  wrote:

> Hi list,
> 
> I am a Django newbie. I have been going through the official tutorial on my 
> local machine. I have got some general questions:
> 
> 1. Where should I develop my Django applications? Should I still do it on my 
> local machine and then transfer them somehow to a hosting provider I'm with? 
> Or should I develop it straight on a hosting provider's server (hosting 
> provider provides a one-click django installation). 
> 
> 2. If the development should be on the hosting provider's account (ssh 
> access), then could you clarify the following? Imagine want the home page to 
> be static (eg. www.example.com) then I want my django app - blog on 
> www.example.com/blog, then I'd start a new django app in public_html/blog 
> right?
> 
> If I'm confusing things, please correct me.
> 
> Thank you
> Martin
> -- 
> 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.
>  
>  

-- 
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: first steps with django

2013-03-24 Thread Shawn Milochik
You should develop locally, because you are guaranteed to make
mistakes that will crash the app and expose debug information you
don't want exposed  during development.

If your hosting provider provides a one-click installation, it will
probably set up its environment different than the one on your local
machine, making deployment more difficult. If you're using Webfaction,
for example, I suggest you make a "custom" app that just opens a port,
then when you deploy just serve your Django app via gunicorn on that
port.

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




first steps with django

2013-03-24 Thread My Wasteland
Hi list,

I am a Django newbie. I have been going through the official tutorial on my 
local machine. I have got some general questions:

1. Where should I develop my Django applications? Should I still do it on 
my local machine and then transfer them somehow to a hosting provider I'm 
with? Or should I develop it straight on a hosting provider's server 
(hosting provider provides a one-click django installation). 

2. If the development should be on the hosting provider's account (ssh 
access), then could you clarify the following? Imagine want the home page 
to be static (eg. www.example.com) then I want my django app - blog on 
www.example.com/blog, then I'd start a new django app in public_html/blog 
right?

If I'm confusing things, please correct me.

Thank you
Martin

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