-
Notifications
You must be signed in to change notification settings - Fork 5
/
notes.todo
109 lines (94 loc) · 8.99 KB
/
notes.todo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
Book:
☐ Web Development with Django Cookbook
☐ https://www.packtpub.com/web-development/web-development-django-cookbook
☐ Second Edition: January 2016
Chapter 1:
☐ I had to change to django==1.8.6 I got an error on 1.8.1 in the migration
✔ for base in inspect.getmro(new_class) @done (16-06-30 22:55)
✔ AttributeError: 'module' object has no attribute 'getmro' @done (16-06-30 22:56)
☐ The way they layout their Project is too verbose or too long. It's good for Legacy project but for project with one app I don't think I need all that.
☐ I like the fact that they have many 'requirements' and 'conf'
☐ Actually, I like the name 'conf' but I still prefer the name 'settings' that I usually adopt in my project.
✔ I'm still confuse with the python 2 ('u,'b) compatibility I don't have python 2 installed on my local machine @done (16-06-30 22:56)
☐ I installed Anaconda (python2) and redid the chapter 1 and it works great
☐ They use a Signals on their app each time an object is save or delete. I like it. But I prefer to use the __logger__ to log the information instead of printing it.
☐ I'm not that into their way to set the static url... it's nice but I need to try it in other project to see if it really worth it
☐ shell:
☐ import os
☐ STATIC_ULR = from utils.misc import get_git_changeset(os.getcwd())
☐ p.33 I think that overwritting app settings might be tricky to debug. I tend to add my settings in the settings.py not in a file i.e. views.py
☐ models.py I like the way that they already set the fields name of the Models for translation
Chapter 2:
☐ They always define an apps.py in their APPS
☐ p.45 I didn't quite understand the __contenttypes__
☐ Also they load the apps.py with __init__.py
☐ Utils/
☐ I really like their models.py mixin for __URLs__
☐ The metatags mixin are Genious I'm wondering if django-meta or django-seo have those mixins
☐ I had to put some relative import into myproject/conf/dev.py
☐ They should I put the modification of the example in Bold p52 but others no
☐ This project is still a python2 based 'ImportError: No module named 'urlparse'' in python 3 is urllib.parse that's why I'm using instead Anaconda Continuum (python 2)
☐ I prefer to use django-rosetta instead of the Multilingual Mixin
chapter 3:
☐ I like the way they rendering the template in the urls.py in email_messages apps __'django.shortcuts.render', {'template_name': "email_messages/message_to_user_done.html"}, name="message_to_user_done"),__
☐ Chapter3 has a lot of errors in python3 from 'urlparse', to relative_path (.models),
☐ I like the fact they are tranlating every 'label' (forms.py) and fields 'models.py'
☐ Interesting it's the first time that I see a **save()** method in a Contact form to send email. And they are right the view looks cleaner. I need to adopt that approach
☐ fail silently suppose to be in the brackets
☐ For the Quotes app I prefer to use a django-package instead of PIL to generate thumbnail
☐ models.py I didn't know that we can create a function for __upload_to__
☐ When I save forms in the view I need to pass the files attributes also **InspirationalQuoteForm(data=request.POST, files=request.FILES) ***
☐ Bulletin Board.models is a great example of how to use django-crispy-forms (image pg. 97)
☐ Their Search Facets seams great but I didn't fully understand the template part
☐ I never render a **PDF** with html templates
☐ I didn't know that I could use django-haystack with Whoosh p.109 offers a great example. I think I might use it for ottawacityjobs and use the search form box as a 'include'
☐ The whoosh implementation seems to magical to me. I need to redo it twice to make sure that I do understand
☐ bulletin_boards/forms.py I like the fact that they use _ for translating in the future the Form label
☐ I added in screenshot/ch-3/ the bulletin_boards/forms.py result I like it! It's genius
☐ I also like their login view too in myproject/urls.py I'm wondering if we can do that with python-social-auth
☐ how did they get the title 'My Website'???
☐ I think they had 'My Website' because the myproject/urls.py //login implies the templates/base.html file -------------NO-NO Django looks at templates/registration/login.html
☐ The way they use the filter for /movies is Genius!! I need to use it for another project
☐ The chapter 3 is really long... to do. it's almost 60 pages
☐ I skip the render to pdf I have no project in mind where I can use it.
☐ The Whoosh/Haystack indexing are Genius!!! I need to implement the __search__ app in another project
☐ for the search in myproject/urls.py they use a __class__ for the CrispyformHelper
chapter 4:
☐ ??? they increase their version of django to 1.8.7??? lol!
☐ I didn't know that utils.py was supposed to be in the Installed apps in the previous chapter
Chapter 5:
☐ I couldn't do __python manage.py migrate__ I had an error __django.db.utils.OperationalError: table "django_content_type" already exists__
☐ { object.created|days_since } don't put the value after the __days_since__ even though the function is written this way __def days_since(value)__ don't do this __{days_since(object.created)}__
☐ I didn't know that I can register another name for a filter i.e __@register.filter(name="humanized_days_since")__
☐ I didn't quite understand the __try_to_include__ template tag
☐ Definetively need to redo this chapter and to look on Github to search for Django project that uses __template tags__
chapter 6:
☐ The maps doesn't work (p.202)
chapter 7:
☐ changing the django version to 1.8.4
☐ djangocms-link wasn't installed or added to the requirements
☐ This app didn't work I had some issue with django-reversion ??? I test many version from 1.6 to 2.0 and none of them work and each have different error this is the one for django-reversion==2 __from reversion.revisions import RegistrationError, VersionAdapter---ImportError: cannot import name VersionAdapter__
☐ Unfortunately I will have to skip this chapter
chapter 8:
☐ Great I really excited to start this chapter I want to see how django-mptt is different from object filters in chapter 3
☐ I had an error __django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.__don't know how to resolve this issue. I tryied StackOverFlow but I didn't find an answer **https://stackoverflow.com/questions/25537905/django-1-7-throws-django-core-exceptions-appregistrynotready-models-arent-load**
☐ I had to install django-mptt==0.7.2 for this project to work
☐ django-mptt-admin is draggable .... Great!!! p.236
☐ django-mptt-tree offers more details --- I like the collapse and expand-tree filter/view
☐ I didn't know that we can load multiple tags inlines __{% load i18n utility_tags mptt_tags %}__ that's great!!. I use to always put them in different line
☐ great overview of django-mptt.
chapter 9:
☐ Wow!! great now I know how to create Command line with/in Django
☐ I need a tutorial about TastiePie. I know DjangoRestFramework but not TastiePie
☐ I couldn't create a superuser for this project??? __django.db.utils.IntegrityError: NOT NULL constraint failed: auth_user.last_login__
chapter 10:
☐ use the middleware in an app and add loggers also
☐ I added a middleware but it didn't work. nothing in the logs
chapter 11:
☐ I really like Mock
☐ I didn't understand __ContentType.objects.get_for_model(Location)__ in __likes/tests.py__---ok I do understand now
☐ Fabric has a quite verbose configuration; I need to tryit on a remote server :)
Review:
☐ it's a great book to start learning django. I like the fact that it's simple. I don't need too much of a machine (environnment). Some book uses REDIS - DOCKER - RabitMQ. This book is more like an intro that's what I like about this book. For some scripts in this book it is better to use a Django package like Django-rosetta (model translation) or Django-extensions (Create/Modified date) but this book is dead simple it gives you a way to do it without mentionning those Django packages.
☐ I didn't like the fact that sometimes I wanted to do a copy-paste but the copy-paste from the PDF to my code editor doesn't indent properly the code. This book should be the first book or one of the first book to read after doing the basic Django tutorial available on the Django site. The price is 29$ which is afortable.
☐ What I don't like is that I had to use python 2. They wrote that I could use Python 3 but from chapter 1 to 4 I got a lots of bug. The chapter 1 and 2 I didn't have a lot but on chapter 3 and 4 I had a lots. That why I didn't do the rest of the chapters (5-11) in Python 3. So I prefer to do everything on Python by installing Continuum Anaconda. I give this book a 4 on 5. I didn't quite like the fact that this book change so often the django version 1.8.1; 1.8.4 ... they didn't tell what was the difference between those version. For the requirements they were exact at 95% I had to change the django-mptt version.