I have lost control of the code base and motivation to clean it up at
this moment in time. I am going to leave the project in its current
state and move on to another project to take what I have learned and
apply it in a more focuses manner. I might come back to this repo. at
some point in the future but, if I do not, consider this project
broken and do not try to use it in any way.
The code is a bit all of the place because of the changes not being
applied everywhere. So, some pages are loading when only logged in and
producing errors when not. Because this is a learning exercise, I am
not too concerned with this because the main point is to learn how to
do what the chapter is trying to explain. Also, the tutorials are not
updating the code in all places as it goes along so, again, I am not
too concerned with the errors in certain parts of the source code.
I was not using the full name for the 'storage' package and was
getting errors -- most notably when trying to rebuild the database
after applying the new features from Chapter 13.
There is little built into Caveman when it comes to JavaScript so the
code here is just a walk-through on adding JQuery to app.html (the
base template the others extend/inherit from).
Note the use of the '/js' directory in '/static/js'. I originally use
/scripts, instead of /js but Caveman did not recognise it. It looks
like you need to stick with /js for the JavaScript files.
This was hard to follow because the translation was quite bad. The
gist of was use 'throw-code' for quick and basic relay of error (using
HTTP response codes) and use 'on-exception' method to generate a more
involved HTML page to communicate the error (HTTP response code). At
least, I think that was the take-away.
This chapter focued on using foreign keys to reference other tables in
the SQLite database. The multiple associate models code examples are
all based on mito (the ORM) and, as always with ORM's, I always feel
lost using them. So, I do not know how to sum this commit up apart
from say Chapter 10 committed.
There are some bugs within the code with this commit. The translation
from Japanese to English is making it hard to follow along in some
places. With that said, this repo. if for learning and becoming
familiar with Caveman2, Common Lisp and the other things it comes with.
This mostly sets up the basic CRUD operations you normally find on a
website. There is some code for CSRF, also.
There is one major bit of malfunctioning coding though. It is the
'setf' bit of code. I have tried to rearrange the code to see if I can
get it to work but I simply cannot work it out.
I have decided to leave the code as it is described in the
tutorial (for Chapter 6) and hope there is some incite in future
chapters to help me fix the problem.
These are new files I created whilst working through Chapter 5. They
are just '.html' template files which connect to the new (URL) routes
created in Chapter 5.
This is an extention of Chapter 4. In Chapter 4, the aim was to set-up
a database and successfully connect to it. This chapter was more about
querying the database and displaying the results in the '.html'
templates.
I do not know why, but I was having a lot of trouble with naming
conflicts for hours. I could not work it out and in the end I do not
what I changed which caused the code to start working. One of the
tactics I used was replace ':' with '#:' in the 'defpackages' and
'.asd' file. Like I said, I do not know if this change caused the code
to start working. But, if you are wondering why the sudden change in
the code base, that is why.
I did not notice I added a comment at the end of the ':depends' on
section which cause the closing parenthesis to become part of the
comment. When I have tried to load the system (using ASDF), it was
throwing errors because of this. I though I fix it in the previous
commit but I just created a mess so good it fixed the problem -- at a
basic functioning level. I do not know how the system was loading with
the .asd in its previous state but it did. Anyway, here we
are. '(asdf:load-system :rails-to-caveman)' should run on repeat
now and not produce any errors...
This .gitignore addition is more of a convention. The database naming
convention I tend to use (with SQLite) is 'FILENAME.db'. This is not included
in the stock .gitignore file generated by git.abbether. So, I have
added it here. This should stop random testing databases getting
mixed up in the repositories Git commit history.
The code at this point has the means to generate a database after a
fresh cloning of the repository.
Mito is a new package introduced in Chapter 4. Clack-Errors was first
added in Chapter 1 but I, some how, managed to remove it. I am
re-adding here and committing it so I have a log of me adding it --
and remove doubt on me accidentally thinking I added. Which, to be
honest, is something I cannot rule out.
These are minor changes -- just typo's, spacing issues Etc.
I added a for-loop to index.html just to get some data in the
'content' area in the 'main content area'. This will eventually be
replaced as I move throught the various chapters. I only added it to
see how the CSS rearranges the layout when there is some 'content' in
the main part of the page.
Demonstrates how (basic) routing works and how they connect to the
templates (I.E. views). Provides examples of how to use djula in said
templates and pass information to the views (accessed with djula).
Partial/shared views are added and shown how to be included within
other templates (views).
How the Caveman2 displays Static assets (I.E. images) in the templates
is shown and examples of links (<a> tags) are provided, too.
I am in the middle of writing out the routes (I have already added an
about.hmtl page). I still need to finish it but it is late and time to
go home for some sleep.
Adds code to underscores generating subscript text when exporting as a
PDF file. The template now states the date README.org was published as
a PDF file.
Theses changes are not seen when the repository is viewed in the
browser. These changes are when/if the file is exported (mostly as a
PDF file but not exclusive to it). The publish date is for quickly
checking which version of the README file is the newer one if I have
several copies of it -- for some reason. The subscript change is an
appearance change. The file is more likely going to need underscores
displayed as underscores than used as a way to denote some subscript
text. Either way, this is an easy change in the future if things
change.