fueled / django-init Goto Github PK
View Code? Open in Web Editor NEWProject template used at Fueled for scaffolding new Django based projects. :dizzy:
License: Other
Project template used at Fueled for scaffolding new Django based projects. :dizzy:
License: Other
NullHandler
from loggingdjango.core.context_processors
to django.template.context_processors
(django11 deprecated)Roadblocks:
Should show the travis status in the README and docs/index.md
why
Make the iOS developer about the deployment status on development environment. Then subsequently if dev is passing, there are very high chance that build of qa
and prod
is passing too.
In the project Readme.MD there is no information about which dependencies there are, but there are actually quite some dependencies.
As a first time runner of the cookiecutter django it has a lot of requirements that are not stated anywhere.
We can add a basic project level logger and log handler.
Looks like the license is missing on this. Great template though guys
@theskumar with the lastest version. I am getting this now.
http://pastebin.com/tW9X5XqQ .
https://pypi.python.org/pypi/premailer
https://github.com/fusionbox/django-emailtools
The template can live inside templates/emails/base.html
We want to be able to change the django admin email, without changing anything in source code. Help when doing product handover.
Many popular packages now support python3.x. We should stop supporting python2.x
But there are certain configuration packages that are python2 only:
Since we already have dependency on node stack for prefixing when using django-compressor, it makes much more sense to just webapack for assets management.
Ref:
whitenoise
for serving static files (less configs).Values to be use in uwsgi.ini
[uwsgi]
http-socket = :$(PORT)
master = true
processes = 4
die-on-term = true
module = wsgi:application
memory-report = true
offload-threads = 4
static-map = /static=.staticfiles
# the below is required by new relic. be sure to monitor your system
# memory since we're enabling threads
# https://newrelic.com/docs/python/python-agent-and-uwsgi
enable-threads = true
single-interpreter = true
lazy-apps = true
Further Reading:
http://blog.kgriffs.com/2012/12/18/uwsgi-vs-gunicorn-vs-node-benchmarks.html
Remove Foundation
as there are not much of the Frontend development that happens, and make it lean and free from any dependency. Twitter Bootstrap can be added as and when required in a project. With couple of lines. Fueled frontend team doesn't use any css framwork either.
Use base.html
closer to what we have in html5-boilerplate
.
Recently I was using Fueled Cookie-cutter for one of my personal project. Don't you think that we should update the Python version to 3.x in .travis.yml .
Also, I faced this issue today and I guess in Public cookiecutter there is already an issue for this. Which is including runtime.txt file for Python version for Heroku Deployment.
Your thoughts?
If you want I can send in a PR
why
solution
Gitlab is a web-based Git repository manager with unlimited private repositories.
Each repository has integrated CI and CD to test, build and deploy your code. Each build can be split in multiple jobs that run in parallel on multiple machines.
Check Gitlab CI
I am using Gitlab CI in couple of my projects. We can add it to django-init too.
It seems that the devrecargar
is preventing us from having the DJANGO_DEBUG
on True
as it tries to add extra urls to the urls.py
on our development servers.
I'm not sure if we ever use this package other then when we are doing frontend and backend that is merged with each other. My vote would be to remove this behavior as we want to start using WebPack #182, thoughts?
While using django-init
I am getting the following error when I try to load a template. Anything I am missing????
Sometime you just don't want the magic to happen and only want the file to be generated.
how to
In hooks/post_gen_project.sh
, ask for the user whether to run the hooks or not.
cookicutter itself doesn't provide any such option.
TODO:
django.middleware.security.SecurityMiddleware
integration for django-secure updateReferences
[1] https://www.djangoproject.com/weblog/2015/apr/01/release-18-final/
[2] https://docs.djangoproject.com/en/1.8/releases/1.8/
Illustrator editable .svg
file that explains the current server stacks. It will have following components:
I recently tried to install the following on my machine. Configurations are as follows :
Python 2.7.x
Ubuntu 12.04 LTS
All the other dependencies seems to get installed correctly. But there seems to be problem in requirements/development.txt
and in the traceback I am getting the following error. Any luck with this??
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 126, in main
self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 223, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 955, in prepare_files
self.unpack_url(url, location, self.is_download)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1072, in unpack_url
return unpack_http_url(link, location, self.download_cache, only_download)
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 447, in unpack_http_url
unpack_file(temp_location, location, content_type, link)
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 464, in unpack_file
unzip_file(filename, location, flatten=not filename.endswith('.pybundle'))
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 366, in unzip_file
leading = has_leading_dir(zip.namelist()) and flatten
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 185, in has_leading_dir
prefix, rest = split_leading_dir(path)
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 169, in split_leading_dir
path = str(path)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 52-53: ordinal not in range(128)
My proposal is to manage 3 tags.
Current situation is we need to run fab --skip-tags deploy to configure/setup the machine and then --tags deploy to deploy/run the code which becomes inconsistent sometimes when setting up new machine by a new dev/devop.
Options:
Installed the Fueled Django Cookiecutter app for 3 times. A lot of dependencies that are not mentioned at all. But now I'm almost through the whole installation and got the following error:
File "/Users/pauloostenrijk/webprojects/chat-whitelabel-web/venv/build/pygraphviz/setup.py", line 91, in <module>
raise OSError("Error locating graphviz.")
I don't know where we use it for, but it is giving me a lot of problems.
For better performance monitoring of cache hits/misses along with CPU/memory usages.
References
https://addons.heroku.com/redismonitor
Right now migrations are stuck in travis, which means that every other build is paused because of it.
During anisble setup make sure unattended upgrade via cron
Resources:
I don't know if I got this right or not. But on initial setup of the project even if I put in letsencrypt
as n
it is still showing the task(s) in the nginx
provisioner files? Am I missing something out here??? because in Pydanny's Cookie-Cutter
this does not happen?
Hope I am clear.
@saurabh-fueled can you explain this up :)
As we are opinionated about most of the things and our ansible roles are written particularly for ubuntu, I think we should disable gathering of facts by ansible. When ansible does that, it requires python and aptitude on remote server and those are not available in ubuntu16 by default.
There are one or two uses of variables provided ansible gathered facts command(like {{ ansible_distribution_release }}
). We can remove those
While Deploying the application to Heroku
using Fueled-CookieCutter I received the following error.
It's strange that when I moved the django-extension to common.txt then it worked fine.
Any particular reason for this behaviour??
Here is a complete trace-back: https://gist.github.com/aniketmaithani/30810726b9e66e66eecf
fabric depends on pycrypto
which is very hard to install on mac machine, if you don't have proper version of gcc
installed.
Makefile
is platform independent.
PS: Fabric was added initially because we needed to deploy to remote machine. The remote machine deployment is now handled via Ansible.
By default, in most configurations, we will get wheel==0.24.0 from parent python environment. This creates warning while installing packages like hiredis and new-relic(in production requirements). We should use atleast 0.26.0 version atleast.
I have created a project using this cookiecutter-django. On local system it seems to work fine. But on production [my personal heroku account] it gives the following error.
Can you guys guide me with this? @theskumar
ValueError: The file 'versatileimagefield/css/versatileimagefield.css' could not be found with <whitenoise.django.GzipManifestStaticFilesStorage object at 0x7f32b379f6a0>.
In our production settings, we are receiving following warning related to security:
SECRET_KEY
has less than 50 characters or less than 5 unique characters. Please generate a long and random SECRET_KEY
, otherwise many of Django's security-critical features will be vulnerable to attack.'django.middleware.csrf.CsrfViewMiddleware'
in your MIDDLEWARE_CLASSES
, but you have not set CSRF_COOKIE_HTTPONLY
to True
. Using an HttpOnly CSRF cookie makes it more difficult for cross-site scripting attacks to steal the CSRF token.I am getting the following error when I try to run cookiecutter in a fresh environment.
$ cookiecutter https://github.com/Fueled/cookiecutter-django.git
Traceback (most recent call last):
File "/usr/local/bin/cookiecutter", line 7, in
from cookiecutter.cli import main
File "/Library/Python/2.7/site-packages/cookiecutter/init.py", line 10, in
from .compat import OLD_PY2
File "/Library/Python/2.7/site-packages/cookiecutter/compat.py", line 30, in
from mock import patch
File "/Library/Python/2.7/site-packages/mock/init.py", line 2, in
import mock.mock as _mock
File "/Library/Python/2.7/site-packages/mock/mock.py", line 68, in
from six import wraps
ImportError: cannot import name wraps
p.s as per answers on different forums, I have updated my mock
and six
library. Nothing working
favicon.ico
, robots.txt
, humans.txt
(@shk-fueled)django-versatileimagefield
(@shk-fueled)users
appnewrelic
support (#36)fig + docker is easier to setup and maintain than vagrant.
Docker FTW!
See: cookiecutter/cookiecutter-django#259 for discussion and how to do it.
https://elements.heroku.com/addons/heroku-redis
https://devcenter.heroku.com/articles/heroku-redis#connecting-in-python
Thanks @plo-fueled for suggestion.
Full release notes: https://docs.djangoproject.com/en/1.10/releases/1.10/
403_csrf.html
template [3][1] https://docs.djangoproject.com/en/1.10/releases/1.10/#new-style-middleware
[2] https://docs.djangoproject.com/en/dev/releases/1.10/#runserver-output-goes-through-logging
[3] https://docs.djangoproject.com/en/dev/releases/1.10/#csrf
[4] https://docs.djangoproject.com/en/dev/topics/auth/passwords/#argon2-usage
Cookiecutter needs {%raw%}
tag to identify if it needs to touch content ansible maybe using. The usage for this tag is not uniform across provisioner
dir.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.