wsvincent / djangoforprofessionals Goto Github PK
View Code? Open in Web Editor NEWSource code for Django for Professionals 4.0
Home Page: https://djangoforprofessionals.com/
License: MIT License
Source code for Django for Professionals 4.0
Home Page: https://djangoforprofessionals.com/
License: MIT License
Been following the book with the exception of doing some sidesteps when I got curious. This has led to some database problems and I am now in need of a reset.
I'm still only working locally
I've tried the reset_db command included in Django-extensions but it says there are two users using the database and therefore it can't be dropped. I guess it is the two docker containers. Don't know how to work around that.
I've also tried to follow along with this guide. Which says I should be able to reset using this command
docker-compose exec <database service name> psql -U <db_user_name> -d postgres -c “DROP DATABASE <db_name>;”
The problem with that is that I do not know the username nor the name of the database since I use these settings(introduced in chapter 8)
DATABASES = {
"default": env.dj_db_url("DATABASE_URL",
default="postgres://postgres@db/postgres")
}
Any advice?
is it possible to get a copy of the latest book? I bought my book at the beginning of August and the code matched but now I see when I want to get clarification the code is different and I can't make sense of it? For example the bookstore_project in chapter 3 now it is called books and has accounts and I have no idea how that came to be?
The SQLite database file shouldn't be committed in the repo. Also, I believe SQLite isn't used anymore after chapter 1, but the file is there in every chapter's directory here.
I have some questions because deployment fails because there are no config vars picked up other than those set in heroku config vars manually
I bought v3.0 and v3.1 of the DFP books and there is a difference with regards to the volumes being left in on 3.1 but removed 3.0.
I realise no one else is having the same issue as no issue raised but I would like to understand better.
Next question: if using heroku.yml is it in place of docker-compose-prod.yml and therefore volumes left in the file isn't an issue?
What am I doing wrong or have I missed something?
In 3.0 ENVIRONMENT == 'production' but in 3.1 not inlcluded and ENVIRONMENT added to heroku manually doesn't pick up ENVIRONMENT in config.settings and django complains it is undefined as well, anyway.
Mainly my question is : How do the ENV vars in docker-compose-prod.yml get copied over or do I completely forget about the docker-compose files and add them myself i.e. Email settings, stripe keys etc?
Any comments would be appreciated because I urgently need to complete this step in the correct manner
heroku says: There are no config vars for this app yet
steps i performed
Hello! After adding LoginRequired and PermissionRequired mixins to your views, some tests began to fail because of redirection (302 code instead of 200) and forbidden error (403 code instead of 200).
page 207 book_detail.html:
<h2>{{ book.title }}</a></h2>
Missign <a href="">
as indicated in code repository.
all worked fine but when i tried to change database from sqlite3 to postgresql and went to django local host page it still saying Problem reloading the page (Note: i followed all command till the topic: New Database of chapter 2). Also, i recieved this error when i ran this command -> docker-compose logs
Attaching to pgresql_web_1, pgresql_db_1
web_1 | Watching for file changes with StatReloader
web_1 | Performing system checks...
web_1 |
web_1 | System check identified no issues (0 silenced).
web_1 | Exception in thread django-main-thread:
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 217, in ensure_connection
web_1 | self.connect()
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 195, in connect
web_1 | self.connection = self.get_new_connection(conn_params)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/backends/postgresql/base.py", line 178, in get_new_connection
web_1 | connection = Database.connect(**conn_params)
web_1 | File "/usr/local/lib/python3.6/site-packages/psycopg2/init.py", line 126, in connect
db_1 | Error: Database is uninitialized and superuser password is not specified.
web_1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
db_1 | You must specify POSTGRES_PASSWORD to a non-empty value for the
web_1 | psycopg2.OperationalError: could not translate host name "db" to address: Name or service not known
db_1 | superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run".
web_1 |
db_1 |
web_1 |
db_1 | You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all
web_1 | The above exception was the direct cause of the following exception:
db_1 | connections without a password. This is not recommended.
web_1 |
db_1 |
web_1 | Traceback (most recent call last):
db_1 | See PostgreSQL documentation about "trust":
web_1 | File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner
web_1 | self.run()
db_1 | https://www.postgresql.org/docs/current/auth-trust.html
web_1 | File "/usr/local/lib/python3.6/threading.py", line 864, in run
web_1 | self._target(*self._args, **self._kwargs)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/utils/autoreload.py", line 54, in wrapper
web_1 | fn(*args, **kwargs)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 120, in inner_run
web_1 | self.check_migrations()
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 453, in check_migrations
web_1 | executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/migrations/executor.py", line 18, in init
web_1 | self.loader = MigrationLoader(self.connection)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/migrations/loader.py", line 49, in init
web_1 | self.build_graph()
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/migrations/loader.py", line 212, in build_graph
web_1 | self.applied_migrations = recorder.applied_migrations()
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/migrations/recorder.py", line 73, in applied_migrations
web_1 | if self.has_table():
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/migrations/recorder.py", line 56, in has_table
web_1 | return self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor())
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 256, in cursor
web_1 | return self._cursor()
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 233, in _cursor
web_1 | self.ensure_connection()
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 217, in ensure_connection
web_1 | self.connect()
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/utils.py", line 89, in exit
web_1 | raise dj_exc_value.with_traceback(traceback) from exc_value
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 217, in ensure_connection
web_1 | self.connect()
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 195, in connect
web_1 | self.connection = self.get_new_connection(conn_params)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/backends/postgresql/base.py", line 178, in get_new_connection
web_1 | connection = Database.connect(**conn_params)
web_1 | File "/usr/local/lib/python3.6/site-packages/psycopg2/init.py", line 126, in connect
web_1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
web_1 | django.db.utils.OperationalError: could not translate host name "db" to address: Name or service not known
web_1 |
Hi, I am working on Mac and have been able to follow along up to this point. I installed environs in Zsh using
docker-compose exec web pipenv install 'environs[django]==8.0.0'
The installation proceeds without issues. However, when I try to import environs into the settings.py file, I get an error saying "Import environs could not be resolved Pylance (report missing imports)". Any idea on why it's not being recognized?
The author draws readers attention to that they should use 'account' directory in template/. I did as suggested having added a line in bookstore_project\urls.py to get the url
path('account/', include('allauth.urls'))
Everything seems to be working as expected. However, once I came to the step when a letter of email confirmation had to be proven by a new user I got an error. Instead of account there was accounts
I went back to 144th page , then to 145, 146, there was /accounts/ on each screenshot.
I thought that there must have been a typo. However, I remember that the author prompted us to make account (without 's').
Did I miss something since I printed a ebook and it's completely black&white. Unfortunately I' unable to differentiate #new code or annotations.
All in all I've changed path in urls and directory name to accounts - works perfectly well. Dunno.
I am using Version 3.1 and I am a novice.
I am working through Chapter 3 and the books example. On Page 48, The makemigrations accounts works. I am attempting the second migrate but it fails. Thinking it was me, I started over and walked through the steps as outlined in the book and did not jump around and used a separate directory
This is preventing me from creating the superuser:
I can connect into Docker Container for the Database so I know the container appears good.
When I go the Admin on the server, I get the login screen.
Thanks,
Russ
Hi, on page 155, after I click on the unique URL link in the email it appears a 404 error:
`
Request Method: | GET |
---|---|
http://127.0.0.1:8000/accounts/confirm-email/NQ:1qqfkS:quBjIsocaaYVWNKNR8Y9NGb_Iu7QZlVvKyynv5J5jqM// |
Using the URLconf defined in django_project.urls
, Django tried these URL patterns, in this order:
The current path, accounts/confirm-email/NQ:1qqfkS:quBjIsocaaYVWNKNR8Y9NGb_Iu7QZlVvKyynv5J5jqM//
, didn’t match any of these.
I made sure my code was similar to yours and I even downloaded your original code from here and I'm getting the same error.
Can you please help me?
Hi, FYI on page 298 the def get_queryset(self)
was listed under class BookListView
whereas it should be under class SearchResultsView
.
I found the following bugs/typos in your code in the directory:
djangoforprofessionals/ch6-static-assets/templates/_base.html
1- missing open h5 tagin line 16
Bookstore
2- missing closing div tags in the end of line 25-28 which i assume it should go after line 26 closing the nav tag.
Please correct those errors and if i am wrong please let me know, i am new to programing and i need to learn. Thank you.
raise ValueError('badly formed hexadecimal UUID string').
I am not able to resolve it. can you tell me, how to resolve it? please
I do a project on windows (pycharm) not using Docker
After adding the cache middlewares for the templates it doesn't pass the tests for the pages application (concretely: test_homepage_template and test_aboutpage_template). It still works well.
At the end of this section, after updating the SECRET_KEY
You state to run docker-compose down
and this destroys the database. Did you mean docker-compose stop
?
You should be able to navigate to the webpage again, refresh it, and everything still works as before.
- No it doesn't I have to recreate a superuser
Traceback from homepage
Exception Value: | relation "django_session" does not exist LINE 1: ...ession_data", "django_session"."expire_date" FROM "django_se...
-- | --
Command Line
$ docker-compose down
$ docker-compose up -d
All set. You should be able to navigate to the webpage again, refresh it, and everything
still works as before. If the environment variable hadn’t loaded you’d see an error since
a SECRET_KEY is required for any Django project. If that’s the case run docker-compose
logs from the command line to diagnose the issue.
def test_homepage_url_resolves_homepageview(self):
view = resolve('/')
self.assertEqual(view.func.__name__, HomePageView.as_view().__name__)
I've just finished the 4th chapter and a question arose in my mind. Could any one explain step-by-step what happens when we pass in '/' as an argument to resolve()? I'm not a native speaker nor do I have experience in coding though in web terms "resolver" is a kind of an interpreter URLs to IP addresses. I've tried to print the view and here's what I got:
ResolverMatch(func=pages.views.HomePageView, args=(), kwargs={}, url_name=home, app_names=[], namespaces=[], route=)
I figured out what we do next in self.assertEqual, but it's obscure how we get HomePageView from '/". Does it look for the path in pages.urls.py and then get the view of the path? It's like a reverse() method interpreting name='home' to the path.
Thanks for any assistance.
When using the code in the book (version 4.0, page 31), I get the following error when running docker-compose up:
web_1 | python: can't open file '/code/manage.py': [Errno 13] Permission denied
django_1_web_1 exited with code 2
Removing the last two lines from the docker-compose.yml file lets it build.
volumes:
- .:/code
I did not see any directions to create the "code" volume, did I miss it?
I had problems running the postgresql application in a docker container since there seems to be a typo in the settings.py file. In line 83 there is the command < 'PORT': 5432 >. For me this file was working with < 'PORT': '5432', > only. Line 83 is spelled this way in the book Django for Professionals 3.0 too, maybe one needs to correct it there too.
Best regards
Flo
For linux users this might be an issue:
When using pipenv shell I am able to create a superuser and successfully log into the 127.0.0.1:8000/admin portal.
However when using docker-compose exec I am able to create a superuser but unable to log in to the admin portal.
The issue is when using pipenv shell, the command is run by the current user but when using docker-compose exec it's run by root.
I have added myself to a new group docker to run docker as the current user.
I do not have a working solution yet so bringing it up here.
(I was hoping docker-compose exec -u ... would work but it returns nothing so wasn't successful.)
Thank you,
Matthew
In my copy of the book v 4 from Gum Road a few months ago this line:
How about an image? You can download the book cover for Django for Professionals at this link. Save it into the directory books/static/images as dfp.png.
links to a URL that is currently 404. Tiny bug really, just an FYI. I suspect somewhere along the lines the file type got updated to jpg but the url didn't.
Thanks for the book, really enjoying it so far.
Hi William,
https://github.com/wsvincent/djangoforprofessionals/blob/master/ch1-hello/docker-compose.yml
Should the following file path be-
command: python /code/hello/manage.py runserver 0.0.0.0:8000
instead of-
command: python /code/manage.py runserver 0.0.0.0:8000
This is how my directory looks like as per the book-
[ code ]
| - [ hello ]
| - - db.sqlite3
| - - docker-compose.yml
| - - Dockerfile
| - - [ hello_project ]
| - - manage.py
| - - [ pages ]
| - - Pipfile
| - - Pipfile.lock
Similarly in the-
https://github.com/wsvincent/djangoforprofessionals/blob/master/ch1-hello/Dockerfile
Should the WORKDIR
, COPY
and COPY .
be /code/hello
instead of /code
.
Hi there,
On page 258, there is one closing parenthesis missing.
DEBUG = env.bool("DJANGO_DEBUG", default=False # new
Hi Will,
I'm working my way through Django for Professionals v4.0 and all had been going smoothly until Chapter 13.
I'm not sure whether it's due to a typo or my misunderstanding.
The text states: "We can add both of these settings after STATICFILES_FINDERS near the bottom of the django_- project/settings.py file. We’ll use the common convention of calling both media."
I have no STATICFILES_FINDERS in my settings file, so I followed the code here in GitHub and placed the lines beneath the other STATICxxx lines.
I'm not sure what you mean by "We’ll use the common convention of calling both media" since one line specifies "media" and the other specifies "static".
I set my MEDIA_ROOT = BASE_DIR / "media" since this matched the following instructions regarding the creation of a "media" directory with a "covers" subdirectory, but the project in GitHub does not contains these folders; it seems to be placing the uploaded images in "static/covers".
Could you please clarify what should be happening with regards to placing the uploaded images in either the "static" folder or the "media" folder?
Unable to get the docker running, followed all the steps. Using windows
$ docker-compose up Recreating code_web_1 ... done Attaching to code_web_1 web_1 | python: can't open file '/code/manage.py': [Errno 2] No such file or directory code_web_1 exited with code 2
Good day everyone,
I don't want to duplicate text here so.... I got many problems with Docker. It's my third day I've been fighting with them.... A book for beginners was really easy-peasy.... As soon as I started reading for Professionals I was overwhelmed with the problems.
https://stackoverflow.com/questions/62348686/i-cant-start-my-docker-container-on-windows-7/
Not sure if I just missed it somewhere in the text, it seems to me that we have start to set the ENVIRONMENT in docker-compose.yml and docker-compose-prod.yml on pages 324 and 325 but never added the following line in the book text:
ENVIRONMENT = os.environ.get('ENVIRONMENT', default='development')
To pull in bug fix django-crispy-forms/django-crispy-forms#779 - otherwise invalid form fields are always hidden, which is purty bad UX :)
after creating charge function im getting Invalid request error (while working on payment section chap. 14). The error says,
InvalidRequestError at /orders/charge/
Request req_r6yTG446gAmhYr: As per Indian regulations, export transactions require a customer name and address. More info here: https://stripe.com/docs/india-exports
I'm greatly enjoying all three books on Django, but I'm on Windows 10 Home, so the required Docker install is proving quick tricky. With the Django for Beginners book, I got the demos to run using virtualenv instead of pipenv, so I'm hoping for some sort of similar workaround, even if remotely, for this book, which otherwise is outstanding. Anyone have any ideas?
Going to http://127.0.0.1:8000/debug results in a proper Not Found error in the browser. However, when running docker-compose exec web python manage.py check --deploy
, I still get the warning that DEBUG is True in production. Also, it was mentioned that after building image from new docker-compose-prod.yml
file, it would destroy items in my database. It didn't do that either.
Anyone able to nudge me in the right direction?
settings.py
DEBUG = env.bool("DJANGO_DEBUG")
docker-compose-prod.yml
version: '3.8'
services:
web:
build: .
command: python /code/manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- 8000:8000
depends_on:
- db
environment:
- "DJANGO_SECRET_KEY=&qhzy1r$$_9f5dks*!l_jhrg_wnm=m!q%0@(06!+^0wpxbu5k6_"
- "DJANGO_DEBUG=False"
db:
image: postgres:11
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- "POSTGRES_HOST_AUTH_METHOD=trust"
volumes:
postgres_data:
Commands Run
docker-compose down
docker-compose -f docker-compose-prod.yml up -d --build
docker-compose exec web python manage.py migrate
Also, if I run docker-compose exec web python
then:
$ import os
$ d = os.environ.get("DJANGO_DEBUG")
$ d
'True'
Hi Will,
In chapter 8 django_project/settings.py
, I think we should probably make the following changes.
-ACCOUNT_LOGOUT_REDIRECT = "home"
+ACCOUNT_LOGOUT_REDIRECT_URL = "home"
Otherwise, if we set the following, it will not redirect us to the about page.
ACCOUNT_LOGOUT_REDIRECT = "about"
I'm a fairly novice coder and even more new to the idea of testing so there might be something really obvious that I'm missing, but my question relates to the steps in chapter 4 for "setUp Method" where we set self.response and remove the test_homepage_url_name.
I understand why we'd want to use self.response
to avoid repeating code but by using self.client.get(reverse('home'))
in setUp()
there are now a handful of tests that will fall down if reverse('home')
doesn't work and it doesn't seem like it'd be obvious from the pattern of test failures why this happened, as it would when test_homepage_url_name was still a test.
Would it not be better to use self.client.get('/')
within setUp()
and add a test to check something like self.client.get('/') == self.client.get(reverse('home'))
so that if the former worked and the latter didn't, it'd be more clear where the failure is occurring?
I don't have much information to give apart from the images 404
This is after you create a new book / upload an image.
Other static assets work as usual
Does anyone have any ideas? Or come across this, I'm pretty certain my code matches
Hello!
Probably "gunicorn bookstore_project.wsgi -b 0.0.0.0:8000" should be used in both docker-compose.yml and docker-compose-prod.yml.
And this is how it's presented in the book.
Django for Professional is a great book.
Only three things I would have added are:
However, a big thing is missing: Heroku does not allow to handle media as explained here: https://stackoverflow.com/questions/61894188/heroku-django-images-not-loading
I think you should at least mention the fact that there is 0MB in Heroku for your media.
PS: also a pdf-version-after-buy of the book would be cool as it would help with quick search of specific things (e.g. DATABASE_URL.....)
After successfully deploying the app, it returns server 500 error in signup page. It doesn't send email but creates a user successfully.
Note: I created .env file for email configs and didn't pushed it to heroku git.
What is the case and what am I supposed to do?
Have finished first book and started second one. Hagin a great time and really enjoying material but i reached the dead end and hence i am writing here.
As I was following the book and coding along i came across the error right after i enter the username after createsuperuser command.
PS C:\Users... \books> docker-compose exec web python manage.py createsuperuser
Username: dm
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py", line 86, in _execute
return self.cursor.execute(sql, params)
psycopg2.errors.UndefinedTable: relation "users_customuser" does not exist
LINE 1: ...is_active", "users_customuser"."date_joined" FROM "users_cus...
The above exception was the direct cause of the following exception:
....
I tried to solve it myself and didnt go well. Then shut down docker and deleted the project folder and started form beginning. And then i came across the same problem. i then used the code provided here at github and same problem keeps occurring.
Any suggestions/ideas how to explore this error further and where to find resolution?
After downloading the content of chapter 9. The making an user part shows email field username field and password field. After submit the screen email and password pop up. But submit button does not submit. And the app is 'stuck'
When I created the Dockerfile and docker-compose.yml files, I cannot get the docker-compose up command to work. The yml line command: python /code/manage.py runserver 0.0.0.0:8000 fails. When I changed it to command: python /code/hello/manage.py runserver 0.0.0.0:8000 I am able to run the app in docker. I am running on Mac OS X 10.15.3 with Docker version 2.2.0.3.
test_homepage_template and test_aboutpage_template both work in Ch15 but fail in Ch16 onwards.
Issues 74 and 33 seem to say the same thing.
Using Django 4.2 and django-debug-toolbar 4.0.0. I therefore think something is going on with the debug toolbar "intercepting" somehow? The debug toolbar itself shows the templates being utilized, and they render just fine.
Printing out the response as a dict shows that truly the templates are not used in Ch16 onwards.
Seems like this is probably not an issue with your code/book, but the interaction of AssertTemplateUsed and django-debug-toolbar.
When I turn on the CSRF settings in configs/settings.py, the user can't log in, the page looks like it's refreshing but it goes back to the log in form. Same with admin pages. This also happens to the deployed version on Heroku
login problems when used:
CSRF_COOKIE_SECURE
SESSION_COOKIE_SECURE
As a smaller issue, the HSTS settings shows a "The connection for this site is not secure" error, and the terminal says the browser is trying to force the https in development server, which causes the error
Anyway, thank you for the amazing book that finally got me started on Django, which I thought I couldn't ever
I ran into an error, which I've fixed, but that could be a trap for new users. It stems from having a system install of python 3.8, and the book (sample at least) relying on python 3.7. Admittedly your prior book does have extensive and useful dev environment set-up instructions, but not this one.
I have python 3.8 installed on my system as the user default. Therefore, the piplock
file will default to:
[requires]
python_version = "3.8"
When you get to install the psycopg2 package, the error that is thrown is:
❯ docker-compose exec web pipenv install psycopg2-binary==2.8.3
Warning: Python 3.8 was not found on your system…
Neither 'pyenv' nor 'asdf' could be found to install Python.
You can specify specific versions of Python with:
$ pipenv --python path/to/python
I believe the error arises from how the Dockerfile
and the piplock
at this point differ, with the Dockerfile
specifying 3.7. If the piplock
gets changed manually to 3.7 however, then the install runs as expected.
A potential guarantee may be adding the --python 3.7
on pipenv creation.
A one-to-many relationship is far more common and is the default foreign key setting within
Django. For example, one student can sign up for many classes.
Is that example one-to-many or many-to-many? Because a class may belong to more than one student.
I had to change:
self.assertTemplateUsed(self.response, 'home.html')
to
self.assertTemplateUsed('home.html')
and
self.assertTemplateUsed(self.response, 'about.html')
to
self.assertTemplateUsed('about.html')
for my tests to pass in Django 3.1.4
These lines can be found at lines 19 and 43 of
https://github.com/wsvincent/djangoforprofessionals/blob/master/ch17-deployment/pages/tests.py
with this commit:
347e307
Hi Will,
Great books.
Page 99 of DFP, bottom of the page, Images, the link is not found, 404.
https://github.com/wsvincent/djangoforprofessionals/blob/main/dfp.png
It seems that some characters have problems being paste-in to the docker-compose file. Searched around and people either have to use ENV in Dockerfile or .env then reference it in docker-compose via ${}.
$ docker-compose down
WARNING: The s variable is not set. Defaulting to a blank string.
ERROR: Invalid interpolation format for "environment" option in service "web": "SECRET_KEY="
Just want to make a note of it if somebody else come across the same issue.
So, I ran into this bug after installing environs using
docker-compose exec web pipenv install 'environs[django]==8.0.0'
and the import in the settings file is not working, showing an import could not be resolved error.
The thing is, environs is most definitly installed. This is my Pipfile:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
django = "==4.0.1"
psycopg2-binary = "==2.9.3"
django-crispy-forms = "*"
django-allauth = "*"
environs = {version = "==8.0.0", extras = ["django"]}
[dev-packages]
[requires]
python_version = "3.10"
I tried restarting the docker container to no avail. I also tried cloning the chapter 8 folder into my machine and trying there, but I ran into the same issue.
Below is the problem if I try to "docker-compose up -d --build":
"Named volume "postres_data:/var/lib/postgresql/data:rw" is used in service "db" but no declaration was found in the volumes section"
Have tried the suggested solutions but no luck. Please help
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.