Re: Gunicor + Postgres + Python 3

2014-03-09 Thread Nick Santos
Hey Henrique,

Can you send the code for the view that generates the page?

-Nick 


On Sun, Mar 9, 2014 at 9:14 PM, Henrique Oliveira <
henriqueollive...@gmail.com> wrote:

> Hi there,
>
> I have set Django + gunicorn + python 3 in a production env, but I am
> gettin critical timeout on simple request(home).
> Any Ideas?
>
> 14-03-09 23:11:21 [14029] [INFO] Listening at: http://127.0.0.1:8001(14029)
> 2014-03-09 23:11:21 [14029] [INFO] Using worker: sync
> 2014-03-09 23:11:21 [14039] [INFO] Booting worker with pid: 14039
> 2014-03-09 23:11:21 [14040] [INFO] Booting worker with pid: 14040
> 2014-03-09 23:11:21 [14041] [INFO] Booting worker with pid: 14041
> 2014-03-09 23:11:31 [14040] [DEBUG] GET /done
> 2014-03-09 23:12:02 [14029] [CRITICAL] WORKER TIMEOUT (pid:14040)
> 2014-03-09 23:12:02 [14029] [CRITICAL] WORKER TIMEOUT (pid:14040)
>
> Cheers
>
> --
> 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/641f550d-4e8b-4a36-b76f-93d8100f3500%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/CAM1S3vD8886ehspHkuvQKHRJJpRCXBvhEK_YxeuM91B%2B1omFpA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Gunicor + Postgres + Python 3

2014-03-09 Thread Henrique Oliveira
Hi there,

I have set Django + gunicorn + python 3 in a production env, but I am 
gettin critical timeout on simple request(home).
Any Ideas?

14-03-09 23:11:21 [14029] [INFO] Listening at: http://127.0.0.1:8001 (14029)
2014-03-09 23:11:21 [14029] [INFO] Using worker: sync
2014-03-09 23:11:21 [14039] [INFO] Booting worker with pid: 14039
2014-03-09 23:11:21 [14040] [INFO] Booting worker with pid: 14040
2014-03-09 23:11:21 [14041] [INFO] Booting worker with pid: 14041
2014-03-09 23:11:31 [14040] [DEBUG] GET /done
2014-03-09 23:12:02 [14029] [CRITICAL] WORKER TIMEOUT (pid:14040)
2014-03-09 23:12:02 [14029] [CRITICAL] WORKER TIMEOUT (pid:14040)

Cheers

-- 
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/641f550d-4e8b-4a36-b76f-93d8100f3500%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Looking for direction on some admin console customization.

2014-03-09 Thread Dennis Marwood
My goal is to be able to build a new blog entry via the admin console that 
is comprised of text, image slider, and video models. 

I would choose to create a new blog entry and then add a text model, a 
video model, and another text model, or something like that. Each blog 
entry could be unique in the models that it is made up of.

I have messed around with adding the models via inlines. But that is just 
not quite enough. Each of the entries ends up in its own fieldset in an 
unintuitive disorganized display. 

What are some approaches to implementing this? It would be great if I could 
have a drop down or something that let me add a model entry, of my 
choosing, and it was just pushed into the blog entry.

Thanks in advance.

-- 
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/009c14be-04d8-417b-b8f0-bd0e9ae4fb28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django-Associations v0.1.7 Released.

2014-03-09 Thread Pronoy Chopra
Hello!

I have finally launched Django-Associations 0.1.7 today after a month of 
work. For those of you who don't know what it is, here's a short summary of 
how DA can help you in your development process.

When working on a View, the common method of debugging or back tracing an 
issue is usually this:
   
   1. Look at the URL in the browser's address bar
   2. Decipher the app name from the URL
   3. Open the app project tree in your IDE (if not already open)
   4. Open the app's urls.py and locate the URL
   5. Look for the corresponding view
   6. Locate the view
   7. Locate the template name and subsequently the template itself.

*Associations* on the other hand lists all of them on a single page, 
thereby decreasing the some times frustrating trace back. (Read 
more
)


Now, this is very similar to what Django-Debug-Toolbar does, except DDT is 
more complex. If you don't want to delve too deep into debugging this 
simple app helps. For the next release there will be a third party panel 
for DDT. So, you can use Associations with DDT as well, if that's what you 
prefer.


Another plan for the next release is to have a floating standalone widget 
like DDT so that you can see the associations without having to access the 
app. That will save more time. There will also be a search bar where you 
can copy paste the URL that you want to search the associations for.


Hope you find this little app helpful.


Development link: https://github.com/DarkSector/django-associations

Log issues: 
https://github.com/DarkSector/django-associations/issues?milestone=3&state=open

PyPI page: https://pypi.python.org/pypi/django-associations/0.1.7

-- 
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/ed93c6d9-ead5-4a53-a6c2-c931e6918f71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: tutorial part3 : polls didn't match URL patterns

2014-03-09 Thread frankel . nathan
AJ NOURI,

I had the exact same issue.  The trick for me was to edit the existing file 
at mysite/mysite/urls.py.  I had previously created a new file at 
mysite/urls.py (one directory up).  The code from the tutorial works for me 
now that I have it in the proper directory.  Your message was from a couple 
of months ago, I wanted to add this in case anyone is stuck at the same 
place.

Nathan


On Friday, January 10, 2014 12:40:25 AM UTC-8, AJ NOURI wrote:
>
> I have Python 2.7.3
>
> I am new in django and I am following the tutorial 3 at :
> https://docs.djangoproject.com/en/1.6/intro/tutorial03/
>
> I followed exactly the steps described:
>
> Here is a copy/paste from files in the project:
>
> *cat polls/views.py*
>
> from django.http import HttpResponse
>
> def index(request):
> return HttpResponse("Hello, world. You're at the poll index.")
>
> from /mysite: *cat urls.py*
>
> from django.conf.urls import patterns, include, url
>
> from django.contrib import admin
> admin.autodiscover()
>
> urlpatterns = patterns('',
> url(r'^polls/', include('polls.urls')'),
> url(r'^admin/', include(admin.site.urls)'),
> )
>
> *cat polls/urls.py*
>
> from django.conf.urls import patterns, url
>
> from polls import views
>
> urlpatterns = patterns('',
> url(r'^$', views.index, name='index')
> )
>
> The page debug shows the following error: 
> [image: enter image description here]
>
>
> It looks like, *it doesn't recognize the "polls" pattern in 
> /mysite/urls.py.*
>
> Am I missing something?
>

-- 
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/be42c9ac-7cd8-416d-937b-300817a0fc8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Trying to set up hashed versioning in Django for static files

2014-03-09 Thread Vernon Burt
I suppose that's my confusion - before this, each application directory had 
it's own /static/ directory with /css/, /js/ and /img/ directories as 
needed. I adjusted the settings as mentioned and tried the following:

DEBUG = False
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = os.path.join(PROJECT_PATH, 'static')
STATIC_URL = '/static/'
STATICFILES_DIRS = ( os.path.join(PROJECT_PATH, 'static'),)
 

CollectStatic now works properly - it collects everything into the project 
root under static. File linking isn't though - the links dont work, and so 
none of the css or javascript loads. I'm wondering if I'm misusing the css 
tags I'm testing with. An example from my base template:

{% load static %}


Thank you for your time,

Vernon Burt

On Thursday, March 6, 2014 8:08:07 PM UTC-8, Vernon Burt wrote:
>
> Hello all,
>
> I've pretty quikly found out in my DJango adventure that I need to have 
> some kind of versioning for my static css and javascript files. After 
> talking to some web developers I was directed to use Django's 
> CachedStaticFilesStorage app to append an md5 hash to the static files 
> path. No matter how I set my static settings the files don't seem to get 
> the has appended and  I can no longer link to any of my static files, 
> either directly or using the static directive. I was wondering if anyone 
> might know what I am doing wrong.
>
> My  Settings:
>
> STATIC_ROOT = 'staticfiles'
>
> STATIC_URL = ''
> # Additional locations of static files
> STATICFILES_DIRS = ()
>
> STATICFILES_FINDERS = (
> 'django.contrib.staticfiles.finders.FileSystemFinder',
> 'django.contrib.staticfiles.finders.AppDirectoriesFinder',)
>
> STATICFILES_STORAGE = 
> 'django.contrib.staticfiles.storage.CachedStaticFilesStorage'
>
>
> My Template entry:
>
> {% block cssfiles %}{% load static%}{% endblock %}
>
> Anything that can point me in the right direction would help.If intrested, 
> I've also had this question up on StackOverflow for a few days: 
> http://stackoverflow.com/questions/22130697/djangos-cachedstaticfilesstorage-not-hashing-file-urls
>  
>
>

-- 
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/0253cd85-a788-42fe-92e3-130af02d2d65%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: problem with integrating bootstrap 3.1.1 and django 1.6

2014-03-09 Thread rafiee.nima


On Sunday, March 9, 2014 10:29:37 PM UTC+3:30, Camilo Torres wrote:
>
> On Sunday, March 9, 2014 12:11:11 PM UTC-4:30, rafiee.nima wrote:
>>
>> I am new to bootstarp and I want to use it in my django project.
>> I put the needed folder's(css , js , img) in my project static folder and 
>> config my setting.py to access static directory
>> I can access bootstrap.css from http:///..myprojecet/static/bootstrap.css 
>> which means I correctly config setting.py
>> but the problem is that no bootstrap style applied to my temeplates. (I 
>> also check in  firebug if css and js files been inclueded )
>>
>> here is my base.html code that other templates inhierent from it
>>
>> {% load static %}
>> 
>> 
>> 
>> 
>> 
>>  > media="screen">
>> 
>>  
>> 
>> 
>>   Dropup
>>   > data-toggle="dropdown">
>> 
>> Toggle Dropdown
>>   
>>   
>>   
>> 
>> {% block body_block %}
>> {% endblock %}
>>
>> 
>> 
>> 
>> 
>>
> Hello,
>
> This URL looks bad:  http:///..myprojecet/static/bootstrap.css
> What is in your settings.py?
> Should it be: {% static 'bootstrap.min.css'% }?
>


tnx for reply 
the actual ulr was http://127.0.0.1:8000/static/css/bootstrap.min.css which 
I use to test if I correctly configure static path and url in my setting.py 
I attached my setting.py  

-- 
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/008d8e89-6d8b-4867-a19d-c3db6ce54e6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
"""
Django settings for tango_with_django_project project.

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

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

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


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

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'ip1$@b#8a3$nz=l0e*ij@3(t%ouid$gc^!6qxshw5a(g3sv8&u'

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

TEMPLATE_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',
'rango',
)

MIDDLEWARE_CLASSES = (
'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 = 'tango_with_django_project.urls'

WSGI_APPLICATION = 'tango_with_django_project.wsgi.application'


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

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

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

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True
LOGIN_URL = '/rango/login/'

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

STATIC_URL = '/static/'
MEDIA_URL = '/media/'

TEMPLATE_DIRS = ( os.path.join(BASE_DIR, 'templates'),)
STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'),)
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')


STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
#'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)


TEMPLATE_CONTEXT_PROCESSORS=(

"django.contrib.auth.context_processors.auth",
'django.core.context_processors.request',
 "django.core.context_processors.debug",
 "django.core.context_processors.i18n",
 "django.core.context_processors.media",
 "django.core.context_processors.static",
 "django.core.context_processors.tz",
 "django.contrib.messages.context_processors.messages"
)



Re: DDT not showing

2014-03-09 Thread Aiden
Yep debug_toolbar is installed, as is the middleware

On Sunday, 9 March 2014 19:17:41 UTC, Nick Santos wrote:
>
> Since you didn't say that you have - did you add it to your INSTALLED_APPS?
>
> -Nick 
>  
>
> On Sun, Mar 9, 2014 at 12:03 PM, Aiden >wrote:
>
>> Hi all,
>>
>> Banging my head against a wall trying everything to get DDT to appear 
>> using Gunicorn+nginx
>> I have the following:
>>
>> DEBUG = True
>> TEMPLATE_DEBUG = True
>> SHOW_TOOLBAR_CALLBACK = lambda x: True
>> DEBUG_TOOLBAR_PATCH_SETTINGS = False
>>
>> along with the URL settings for __debug__ in my urls.conf. The routes are 
>> attaching, but I can't work out
>> how to get DDT to appear. It isn't in the HTML output, it just isn't 
>> there. It was working but now it isn't even
>> working with manage's runserver.
>>
>> Any help would be great! . Versions:
>>
>> django-debug-toolbar==1.0.1
>> gunicorn==18.0
>> Django==1.6.2
>>
>>
>>  -- 
>> 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 http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/8bcdde5c-d965-4be5-9e07-a696d38eb236%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/bf033163-8fb2-4c75-9d14-684974284924%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: DDT not showing

2014-03-09 Thread Nick Santos
Since you didn't say that you have - did you add it to your INSTALLED_APPS?

-Nick 


On Sun, Mar 9, 2014 at 12:03 PM, Aiden  wrote:

> Hi all,
>
> Banging my head against a wall trying everything to get DDT to appear
> using Gunicorn+nginx
> I have the following:
>
> DEBUG = True
> TEMPLATE_DEBUG = True
> SHOW_TOOLBAR_CALLBACK = lambda x: True
> DEBUG_TOOLBAR_PATCH_SETTINGS = False
>
> along with the URL settings for __debug__ in my urls.conf. The routes are
> attaching, but I can't work out
> how to get DDT to appear. It isn't in the HTML output, it just isn't
> there. It was working but now it isn't even
> working with manage's runserver.
>
> Any help would be great! . Versions:
>
> django-debug-toolbar==1.0.1
> gunicorn==18.0
> Django==1.6.2
>
>
>  --
> 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/8bcdde5c-d965-4be5-9e07-a696d38eb236%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/CAM1S3vBAbvv2MjFgVqywLXhJsV4egtnqvL5rcvr8MgdMv64NqA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


DDT not showing

2014-03-09 Thread Aiden
Hi all,

Banging my head against a wall trying everything to get DDT to appear using 
Gunicorn+nginx
I have the following:

DEBUG = True
TEMPLATE_DEBUG = True
SHOW_TOOLBAR_CALLBACK = lambda x: True
DEBUG_TOOLBAR_PATCH_SETTINGS = False

along with the URL settings for __debug__ in my urls.conf. The routes are 
attaching, but I can't work out
how to get DDT to appear. It isn't in the HTML output, it just isn't there. 
It was working but now it isn't even
working with manage's runserver.

Any help would be great! . Versions:

django-debug-toolbar==1.0.1
gunicorn==18.0
Django==1.6.2


-- 
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/8bcdde5c-d965-4be5-9e07-a696d38eb236%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: problem with integrating bootstrap 3.1.1 and django 1.6

2014-03-09 Thread Camilo Torres
On Sunday, March 9, 2014 12:11:11 PM UTC-4:30, rafiee.nima wrote:
>
> I am new to bootstarp and I want to use it in my django project.
> I put the needed folder's(css , js , img) in my project static folder and 
> config my setting.py to access static directory
> I can access bootstrap.css from http:///..myprojecet/static/bootstrap.css 
> which means I correctly config setting.py
> but the problem is that no bootstrap style applied to my temeplates. (I 
> also check in  firebug if css and js files been inclueded )
>
> here is my base.html code that other templates inhierent from it
>
> {% load static %}
> 
> 
> 
> 
> 
>   media="screen">
> 
>  
> 
> 
>   Dropup
>data-toggle="dropdown">
> 
> Toggle Dropdown
>   
>   
>   
> 
> {% block body_block %}
> {% endblock %}
>
> 
> 
> 
> 
>
Hello,

This URL looks bad:  http:///..myprojecet/static/bootstrap.css
What is in your settings.py?
Should it be: {% static 'bootstrap.min.css'% }?

-- 
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/7c7fb06b-67f2-4a8a-b3f8-cc11ef0cedfe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Bug using transactions in Django 1.6.2 and gunicorn with gevent

2014-03-09 Thread tapan pandita
We ran into this bug in our production system and spent hours debugging it
and we have our results. Looks like this is quite a major bug, at least for
us.

When we start our application on gunicorn, it spawns workers. Every request
coming to the same worker uses the same django DatabaseWrapper instance
(postgres in our case) also referred to as a connection. If, in the middle
of a transaction in one request, the worker were to receive another
request, this request resets the state of the connection causing the
transaction to behave in unexpected ways as documented in this bug:
https://code.djangoproject.com/ticket/21239
Sometimes the transaction doesn't get committed and there is no exception
raised to let you know that happened. Sometimes parts of it do get
committed while the rest is lost.

We thought that a connection is thread safe, but this bit of gunicorn
patching magic here makes sure that's not the case:
https://github.com/benoitc/gunicorn/blob/18.0/gunicorn/management/commands/run_gunicorn.py#L16

Any ideas what we can do to sidestep this issue? I would ideally want to
keep using gunicorn since our application is fairly network IO intensive.

-- 
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/CAMQ_VdtBfwG4i6ZKu5xCerhqm%2B%2BoTFnf1CjDkLHfM6GbWK6P2Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


problem with integrating bootstrap 3.1.1 and django 1.6

2014-03-09 Thread rafiee.nima
hi

I am new to bootstarp and I want to use it in my django project.
I put the needed folder's(css , js , img) in my project static folder and 
config my setting.py to access static directory
I can access bootstrap.css from http:///..myprojecet/static/bootstrap.css 
which means I correctly config setting.py
but the problem is that no bootstrap style applied to my temeplates. (I 
also check in  firebug if css and js files been inclueded )

here is my base.html code that other templates inhierent from it

{% load static %}





 

 


  Dropup
  

Toggle Dropdown
  
  
  

{% block body_block %}
{% endblock %}









-- 
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/d1141e5f-7972-47c0-a88a-4a00fd1709b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Dreamhost for Django hosting.

2014-03-09 Thread Dan Gentry
I've had good luck hosting an app with a Dreamhost shared hosting account. 
 I even wrote a post about it a couple of years ago. (Maybe I should update 
it for 2014)

http://dashdrum.com/blog/2011/08/django-on-dreamhost/



On Saturday, March 8, 2014 11:53:54 PM UTC-5, Chen Xu wrote:
>
> I am trying to host my Django website on Dreamhost, I am wondering if 
> Dreamhost provides a virtual linux box that can allow you to ssh in?
>
>
>
> Thanks
>
>
> -- 
> ⚡ Chen Xu ⚡ 
>

-- 
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/c0fc29b5-8044-4081-b578-34d9d025d756%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [newbie] BASE_DIR vs. SETTINGS_DIR

2014-03-09 Thread David
Dear Russell,

thanks -- brilliant advice!

Greetings from Copenhagen,

David


On 09/03/14 01:10, Russell Keith-Magee wrote:
> 
> On Sun, Mar 9, 2014 at 5:09 AM, David  > wrote:
> 
> Dear list,
> 
> I follow
> http://www.tangowithdjango.com/book/chapters/templates_static.html
> 
> The book instructs me to insert a SETTINGS_DIR and PROJECT_PATH
> variables in my project settings.py.
> However, the automatically created settings.py already contains a line
> 
> BASE_DIR = os.path.dirname(os.path.dirname(__file__))
> 
> that looks very similar to the next three lines I added.
> 
> Am I reproducing code here? Do I make a mistake if I take the BASE_DIR~
> line out?
> 
> Thanks for your guidance!
> 
> 
> Ultimately, it won't really matter, as long as the final paths a
> complete and correct.
> 
> I'm not sure which version of Django "Tango with Django" was originally
> written with, but if it was written pre-1.6, then their advice was
> completely sound. Django 1.5 and earlier didn't have a BASE_DIR in the
> settings file, and it was very common to suggest users put a "project"
> directory in their settings file to make it easier to move code around.
> 
> Django 1.6 added BASE_DIR, giving the general pattern a standardised name.
> 
> As long as your own settings file is internally consistent, you'll be fine. 
> 
> If you want to have all three settings, you can do that; it will be
> microscopically less computationally efficient (since it will be
> computing the directory three times), but your settings files might be
> easier to read.
> 
> If you want to delete all references to BASE_DIR, that's fine, as long
> as you update all settings that reference BASE_DIR.
> 
> Alternatively, if you delete all references to SETTINGS_DIR and/or
> PROJECT_PATH, that's fine too - as long as you don't have any settings
> or code referring to them.
> 
> In the extreme case - you can delete all three, and replace them with
> hardcoded path strings.
> 
> If you're following the tutorial, it will probably be easier to stick
> with the SETTINGS_DIR/PROJECT_PATH pair, because the tutorial code will
> be referencing those settings. However, there's nothing magical about
> those two names; they're just shortcuts to make it easier to construct
> paths in your settings files.
> 
> Yours,
> Russ Magee %-)
> 
> -- 
> 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/CAJxq849mxgCRyNPDeUuCB-ghjd4f8zDO-AKFbEd%3DTJ_A7FL8fQ%40mail.gmail.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/531C5AE7.9030101%40gmx.net.
For more options, visit https://groups.google.com/d/optout.