Simplify settings and move some standard settings into settings.py
These were previously in djangocommonsettings.py, but don't ever vary between development and production environments.
This commit is contained in:
		
							parent
							
								
									2f3fba359f
								
							
						
					
					
						commit
						70b8aa07ae
					
				
					 3 changed files with 9 additions and 2 deletions
				
			
		|  | @ -59,7 +59,7 @@ class Entry(models.Model, bsoup.SoupModelMixin): | |||
|     # Ping google blogs and technorati.  Taken from | ||||
|     # http://blog.foozia.com/blog/2007/apr/21/ping-technorati-your-django-blog-using-xml-rpc/ | ||||
|     def save(self): | ||||
|         if settings.CONSERVANCY_DEVEL or True: # "or True" means it is disabled always | ||||
|         if settings.DEBUG or True: # "or True" means it is disabled always | ||||
|             super().save() | ||||
|             return | ||||
| 
 | ||||
|  |  | |||
|  | @ -47,7 +47,7 @@ class PressRelease(models.Model, bsoup.SoupModelMixin): | |||
|         return self.pub_date > (datetime.now() - timedelta(days=30)) | ||||
| 
 | ||||
|     def save(self): | ||||
|         if settings.CONSERVANCY_DEVEL or True: | ||||
|         if settings.DEBUG or True: | ||||
|             super().save() | ||||
|             return | ||||
| 
 | ||||
|  |  | |||
|  | @ -127,11 +127,18 @@ TEMPLATES = [ | |||
|     } | ||||
| ] | ||||
| 
 | ||||
| # Internationalization | ||||
| TIME_ZONE = 'America/New_York' | ||||
| LANGUAGE_CODE = 'en-us' | ||||
| 
 | ||||
| STATIC_URL = '/static/' | ||||
| STATIC_ROOT = BASE_DIR.parent / 'collected_static' | ||||
| STATICFILES_DIRS = [ | ||||
|     BASE_DIR / 'static', | ||||
| ] | ||||
| 
 | ||||
| MEDIA_URL = '/media/' | ||||
| 
 | ||||
| MIDDLEWARE = [ | ||||
|     'django.middleware.common.CommonMiddleware', | ||||
|     'django.contrib.sessions.middleware.SessionMiddleware', | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue