Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 19:59
    wgordon17 opened #1922
  • Jan 31 2019 15:53

    browniebroke on pyup-update-django-extensions-2.1.4-to-2.1.5

    (compare)

  • Jan 31 2019 15:53

    browniebroke on master

    Update django-extensions from 2… Merge pull request #1916 from p… (compare)

  • Jan 31 2019 15:53
    browniebroke closed #1916
  • Jan 31 2019 15:52

    browniebroke on pyup-update-flake8-3.6.0-to-3.7.3

    (compare)

  • Jan 31 2019 15:52

    browniebroke on master

    Update flake8 from 3.6.0 to 3.7… Update flake8 from 3.6.0 to 3.7… Merge pull request #1920 from p… (compare)

  • Jan 31 2019 15:52
    browniebroke closed #1920
  • Jan 31 2019 15:49

    browniebroke on pyup-update-pytest-4.1.1-to-4.2.0

    (compare)

  • Jan 31 2019 15:49

    browniebroke on master

    Update pytest from 4.1.1 to 4.2… Update pytest from 4.1.1 to 4.2… Merge pull request #1919 from p… (compare)

  • Jan 31 2019 15:49
    browniebroke closed #1919
  • Jan 31 2019 13:43
    wgordon17 opened #1921
  • Jan 31 2019 13:23

    pydanny on pyup-update-flake8-3.6.0-to-3.7.2

    (compare)

  • Jan 31 2019 13:23
    pyup-bot closed #1918
  • Jan 31 2019 13:23
    pyup-bot commented #1918
  • Jan 31 2019 13:23
    pyup-bot opened #1920
  • Jan 31 2019 13:23

    pydanny on pyup-update-flake8-3.6.0-to-3.7.3

    Update flake8 from 3.6.0 to 3.7… (compare)

  • Jan 31 2019 13:23

    pydanny on pyup-update-flake8-3.6.0-to-3.7.3

    (compare)

  • Jan 31 2019 13:23

    pydanny on pyup-update-flake8-3.6.0-to-3.7.3

    Update flake8 from 3.6.0 to 3.7… (compare)

  • Jan 31 2019 00:40
    pyup-bot opened #1919
  • Jan 31 2019 00:40

    pydanny on pyup-update-pytest-4.1.1-to-4.2.0

    Update pytest from 4.1.1 to 4.2… (compare)

Piyush Gandhi
@PiyuGandhi
Running it for the first time on production
shireenrao
@shireenrao
Hello - I am trying to start a new project on windows using docker. Here are my settings
'
cookiecutter https://github.com/pydanny/cookiecutter-django
You've downloaded C:\Users\srao.cookiecutters\cookiecutter-django before. Is it okay to delete and re-download it? [yes]: yes
project_name [My Awesome Project]:
project_slug [my_awesome_project]:
description [Behold My Awesome Project!]:
author_name [Daniel Roy Greenfeld]:
domain_name [example.com]:
email [daniel-roy-greenfeld@example.com]:
version [0.1.0]:
Select open_source_license:
1 - MIT
2 - BSD
3 - GPLv3
4 - Apache Software License 2.0
5 - Not open source
Choose from 1, 2, 3, 4, 5 (1, 2, 3, 4, 5) [1]:
timezone [UTC]:
windows [n]: y
use_pycharm [n]:
use_docker [n]: y
Select postgresql_version:
1 - 10.5
2 - 10.4
3 - 10.3
4 - 10.2
5 - 10.1
6 - 9.6
7 - 9.5
8 - 9.4
Choose from 1, 2, 3, 4, 5, 6, 7, 8 (1, 2, 3, 4, 5, 6, 7, 8) [1]:
Select js_task_runner:
1 - None
2 - Gulp
Choose from 1, 2 (1, 2) [1]:
Select cloud_provider:
1 - AWS
2 - GCE
Choose from 1, 2 (1, 2) [1]:
custom_bootstrap_compilation [n]:
use_compressor [n]:
use_celery [n]:
use_mailhog [n]: y
use_sentry [n]:
use_whitenoise [n]:
use_heroku [n]:
use_travisci [n]:
keep_local_envs_in_vcs [y]:
debug [n]:
[SUCCESS]: Project initialized, keep up the good work!
'
The build succeeds with 'docker-compose -f local.yml build' and the django_1 container fails after I execute 'docker-compose -f local.yml up'
The error is
'
django_1 | Running on http://0.0.0.0:8000/ (Press CTRL+C to quit)
django_1 |
Restarting with stat
': No such file or directorycute 'python
my_awesome_project_django_1 exited with code 127
'
I am on Docker version 18.09.2, build 6247962 and docker-compose version 1.23.2, build 1110ad01
Any ideas on what I am doing wrong?
Jonathan Scott Enderle
@senderle

I have plans to write an app using cookiecutter-django that serves some large static files to authenticated users only. The files are too big to wrap in a Django file response, and must only be accessible to authenticated users.

I did this before with a project that I migrated to cookiecutter-django when you were using Caddy. The change at that point was simple. Caddy uses the same header as nginx, the X-Accel-Redirect header, to tell the proxy to serve an otherwise inaccessible file instead of forwarding the response. (Here's a good description of the config required with nginx; it's not very different with Caddy -- https://wellfire.co/learn/nginx-django-x-accel-redirects/)

I have no idea how to accomplish the same thing with Traefik, and it appears it may not be possible at all since Traefik isn't actually a web server. Does anyone have recommendations on how to make this work with cookiecutter-django? Does this mean I just can't use it for projects like these?

Yann-Sebastien Tremblay-Johnston
@underchemist
Is it intended that with a fresh template project from https://github.com/pydanny/cookiecutter-django.git using docker/docker-compose I would still need to manually export DATABASE_URL like /entrypoint does already if in production?
in order to do things like python3 manage.py createsuperuser ?
i.e. if I'm using local settings (which uses /start as entrypoint), not production.
Jonathan Scott Enderle
@senderle
I posted a version of my question above to stack overflow here.
Would love any feedback at all!
Harshitg
@Harshitg
Hi, I have recently begin using cookiecutter on django. I read the documentation mentioning support for Postgre, is it possible to instead use MSSQL?
El 李天宝
@elcolie
Hi
Suppose I am using AWS Lambda. And I have to dispatch a long running job to child process. What is the best practice on this problem?
Burhan Khalid
@burhan
What is your concern with the approach you have now?
El 李天宝
@elcolie
@burhan I have long running task. And normally I dispatch it to child process. Luckily cookiecutter-django has build-in Celery/Redis for me.
Bernard Parah
@b3h3rkz
I have been having this issue for a while now when using circleci to deploy my project on digitalocean

this is the traceback...everything runs well until it gets to the postgres image

Creating CA: /home/circleci/.docker/machine/certs/ca.pem
Creating client certificate: /home/circleci/.docker/machine/certs/cert.pem
Running pre-create checks...
Creating machine...
(***-api) Importing SSH key...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(systemd)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env ***-api
redis uses an image, skipping
Building postgres
ERROR: SSL error: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:661)
Exited with code 1

I haven't made any changes to the docker configs that come with cookiecutter

I will be glad if someone can help me figure out why this is happening... thanks
step21
@step21
Does anyone know of a way to programatically approve accounts after adding them or disable approving the mail address in development? I couldn't find any field in the db. At the moment I add some users for testing, but I always need to approve their mail address after logging in first
ak4zh
@ak4zh
ACCOUNT_EMAIL_VERIFICATION = "optional"
@step21 set ACCOUNT_EMAIL_VERIFICATION = "optional" django-allauth configs
ak4zh
@ak4zh
@pydanny I have a separate postgresql so I set DATABASE_URL variable in .postgres and also removed postgres dependency from docker compose... Now when I run docker-compose up it gives me error Waiting for PostgreSQL to become available... It will work if I keep the postgres stuffs intact in docker-compose but that isn't needed as my project dont meed postgres image running. So you know what else I need to fix to get rid of waiting for PostgreSQL error?
ak4zh
@ak4zh
I guess it's something in entrypoint file
step21
@step21
@Ak4zh thanks!
Bruno Alla
@browniebroke
@Ak4zh yes it’s in the entrypoint file, it looks for user, password, host & DB rather than the DATABASE_URL.
ak4zh
@ak4zh
@browniebroke Ok got it resolved. The issue was I was using localhost in POSTGRES_HOST as my postgres was in same server but I had to give actual IP else it refers to localhost inside docker. Another question is if I have DJANGO_READ_DOT_ENV_FILE=True does docker setup also take use of .env in root directory? Or it only uses the ones inside .envs . This is little confusing where shall I put all my env variables
h8pwn
@h8pwn
I have set up a project with the cookiecutter problem is I forgot to make it set up whitenoise for static files. Is there any way to enable it now without hassle?
Dani Hodovic
@danihodovic
Dani Hodovic
@danihodovic
Bruno Alla
@browniebroke
@Ak4zh This environment variable is only for a .env file, which is mainly used for non-Docker. Docker compose will pass the environment variables using the env_file section of production.yml and local.yml

Is it required to set EMAIL_HOST and EMAIL_PORT when using the locmem backend?

Don’t know, does it work without them? Have you tried removing them?

For gunicorn being installed, it doesn’t look required from looking at their doc. This line was added back in 2013, back then` it might have been required.
Dani Hodovic
@danihodovic

Don’t know, does it work without them? Have you tried removing them?

I run my pytest suite without them and with the locmem backend :)

leollon
@leollon
@browniebroke I'm trying to add pre-commit to this project, is it necessary to have this?
Bruno Alla
@browniebroke
Im
I'm not a big fan of pre-commit hooks personally
leollon
@leollon
OK, I am going to commit a pr, maybe it will be needed someday
leollon
@leollon

I mean using pre-commit in the generated django project. This project which developers can choose whether they use pre-commit or not.

OK, I am going to commit a pr, maybe it will be needed someday

Ben Lindsay
@benlindsay
Hi all, I'm trying to get the hang of cookiecutter-django, which is amazing, but I'm having some trouble getting it working in production on AWS with docker. What's the best way to get some help troubleshooting? I don't want to spam this conversation with logs and stuff.
And to be clear, I'm just trying to deploy the project right after initialization before adding any custom code
Ben Lindsay
@benlindsay
Nevermind, it turns out the solution was to start over and go through the process again with a fresh EC2 instance. Thanks for all the work you all do on this awesome package!
Blockchain Man
@dahifi
Anyone got any tips or guides for Celery setup? I can't tell whether Django is actually running the worker or what's going on. I have Rabbit running in docker, Flower running to it, manually running worker 'celery worker -A config.celery_app --broker=amqp://guest@172.17.0.2//', but I can't figure out where to go from here.
I can even run a task in the python console, but I can't see any activity within the app.
Blockchain Man
@dahifi
Looks like local settings have always_eager = true. I think I'm figuring this out now.
Lokesh Sanapalli
@lokesh1729_gitlab
one question, why does all the vendor javascripts are put in vendors.js and minifying whereas there was a vendorRoot = node_modules defined and pulling jquery, bootstrap etc... ??? also the same case with css... why there's a project.css
djangoReactGuy
@SanskarSans
I am using docker for cookiecutter-django. I need to enter into postgres. How can i do that?
El 李天宝
@elcolie
@SanskarSans docker ps -a to find your container id
docker exec -it <container_id> /bin/sh
After finish your business inside container just exit
You can use docker-compose -f your.yml ps to see only your project containers
docker ps -a will show you all entire system
Lokesh Sanapalli
@lokesh1729_gitlab

one question, why does all the vendor javascripts are put in vendors.js and minifying whereas there was a vendorRoot = node_modules defined and pulling jquery, bootstrap etc... ??? also the same case with css... why there's a project.css

can anyone tell me ??