Re: How to make https work fine under django server?

2015-09-05 Thread vincent . j . xin
I find there are some configuration about using Django with Apache and 
mod_wsgi in Django document. So, I install apache-2.4.7 and mod_wsgi. 
But the thing is that I'm confused about how it can work. Should I start a 
server on mod_wsgi? Is that possible to support https?


-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/51d6f097-6120-4cb8-8b12-4961d83936b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Would defining MultiValueDictKeyError in django.core.exceptions be a good idea?

2015-09-05 Thread Aditya Sarode
Hi,

MultiValueDictKeyError has to be imported from django.utils.datastructures 
now.
As a user, it was difficult to find the exact location of 
MultiValueDictKeyError. Importing it from django.core.exceptions would be 
easier from the user's perspective. I was curious to know if there was any 
specific reason for declaring it in django.utils.datastructures.py

Thank You,
Aditya

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/56ae3159-9de9-491f-82ae-5c19e5f3f5d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Would defining MultiValueDictKeyError in django.core.exceptions be a good idea?

2015-09-05 Thread Tim Graham
The docs mention, "This is a subclass of Python's standard ``KeyError``, so 
you can stick to catching ``KeyError``." Does this work for you?

On Saturday, September 5, 2015 at 8:24:29 AM UTC-4, Aditya Sarode wrote:
>
> Hi,
>
> MultiValueDictKeyError has to be imported from django.utils.datastructures 
> now.
> As a user, it was difficult to find the exact location of 
> MultiValueDictKeyError. Importing it from django.core.exceptions would be 
> easier from the user's perspective. I was curious to know if there was any 
> specific reason for declaring it in django.utils.datastructures.py
>
> Thank You,
> Aditya
>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/66621371-41e1-4446-b3a7-66c41813f7ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to create a side menu with the urls of each step

2015-09-05 Thread Leandro Severino
Hello,

   I have a formwizard (formtools) 
https://django-formtools.readthedocs.org/en/latest/index.html with 7 steps.
   OK, my formwizard  is OK.

   But now, in this page, my customer wants a side menu with a link for 
each step, because he wants access the step 5 for example without click in 
the next, next, next, next button.

   Well,

  I think that my problems are two:

  1) How to print the urls for each step.
  2) How to map this urls in my urls.conf 

Any help ?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b5b3b036-618c-430f-84dd-06090d7b4ace%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to create a side menu with the urls of each step

2015-09-05 Thread Felipe Brunelli de Andrade
Man, you need to treat this form step by step as a single form controlled
by javascript. You will find several examples on google

---
   Felipe Brunelli de Andrade
  http://www.fandrade.com.br/
---
Cel: (16) 98121-5290
Skype: fbruandrade
---


2015-09-05 12:08 GMT-03:00 Leandro Severino :

> Hello,
>
>I have a formwizard (formtools)
> https://django-formtools.readthedocs.org/en/latest/index.html with 7
> steps.
>OK, my formwizard  is OK.
>
>But now, in this page, my customer wants a side menu with a link for
> each step, because he wants access the step 5 for example without click in
> the next, next, next, next button.
>
>Well,
>
>   I think that my problems are two:
>
>   1) How to print the urls for each step.
>   2) How to map this urls in my urls.conf
>
> Any help ?
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/b5b3b036-618c-430f-84dd-06090d7b4ace%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEYpY_%2BFf7gHWg9aoofB9O6F%3DpSuUPZba9J7%2BScq8kDzS7a5rw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to make https work fine under django server?

2015-09-05 Thread Luis Zárate
https://www.digitalocean.com/community/tutorials/how-to-run-django-with-mod_wsgi-and-apache-with-a-virtualenv-python-environment-on-a-debian-vps

This tutorial could help you.
El sábado, 5 de septiembre de 2015,  escribió:
> I find there are some configuration about using Django with Apache and
mod_wsgi in Django document. So, I install apache-2.4.7 and mod_wsgi.
> But the thing is that I'm confused about how it can work. Should I start
a server on mod_wsgi? Is that possible to support https?
>
>
> --
> 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.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/51d6f097-6120-4cb8-8b12-4961d83936b4%40googlegroups.com
.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
"La utopía sirve para caminar" Fernando Birri

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAG%2B5VyMXNiFAq7ndh8jNuGwHbq1dcatqQ0ALgWwJ5ynvtb%3D3kg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


customize project templates

2015-09-05 Thread Terry Chia
Hello, 

I am doing "Writing your first Django app, part 2" provided by Django 
Documentation part 2 
 and is stuck at 
customising your project's template.

I am trying to customise the project template by copying the base_site.html 
from the Django admin template directory in the source code of Django into 
the project directory. 

I am facing with this warning. I have attached my file below. Can someone 
help? 

My path for base_site.html is at mysite/templates/admin/base_site.html

?: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django 
1.8 and the TEMPLATES dictionary takes precedence. You must put the values 
of the following settings into your default TEMPLATES dict: TEMPLATE_DIRS.



-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/95cdf763-6c4d-42c5-bc41-904007835c21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
"""
Django settings for mysite project.

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

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

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

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os

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.8/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'wz8j*gp5#o^)(7e%hx=80_sgh!-y9^nr+b7i5r$q0n&zat9+pl'

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

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'polls',
)

MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
)

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


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

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


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

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'Asia/Singapore'

USE_I18N = True

USE_L10N = True

USE_TZ = True


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

STATIC_URL = '/static/'

#Adding a template directory here
TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')]
{% extends "admin/base.html" %}

{% block title %}{{ title }} | {{ site_title|default:_('Django site admin') }}{% endblock %}

{% block branding %}
Polls Administration
{% endblock %}

{% block nav-global %}{% endblock %}