Browse Source

re-organise bits of the code (mostly packages are references).

stable
Craig Oates 2 years ago
parent
commit
7e32795392
  1. 11
      ritherdon-archive.asd
  2. 2
      src/config.lisp
  3. 4
      src/utils.lisp
  4. 42
      src/view.lisp

11
ritherdon-archive.asd

@ -42,23 +42,16 @@
)
:pathname "src/"
;; :serial t
;; I replaced the default module approach to the serial file load
;; approach because it was easier organise additional source code
;; files into sub-directories, all within /src. I kept getting
;; errors when trying to load the system when using additional
;; modules or using the :depends-on properties. I have kept the
;; original module configuration below for reference/until you feel
;; comfortable enought to delete it.
:components (;; Caveman Files
(:file "config")
(:file "main")
(:file "db")
(:file "view")
;; CO-Web Specific Files
;; Ritherdon Archive Specific Files
(:file "app-constants")
(:file "utils")
(:file "models/user")
(:file "authentication")
(:file "auth")
;; Caveman Files
(:file "web"))

2
src/config.lisp

@ -63,4 +63,4 @@
;;; Use this to change the environment between "development" and
;;; "production". This change is mostly to specifiy which database the
;;; system will use.
;; (setf (osicat:environment-variable "APP_ENV") "development")
(setf (osicat:environment-variable "APP_ENV") "development")

4
src/utils.lisp

@ -1,6 +1,6 @@
(defpackage #:utils
(:use :cl
:log4cl)
(:use #:cl
#:log4cl)
(:export #:format-date
#:i18n-load
#:_

42
src/view.lisp

@ -1,21 +1,21 @@
(in-package :cl-user)
(defpackage ritherdon-archive.view
(:use :cl)
(:import-from :ritherdon-archive.config
:*template-directory*)
(:import-from :caveman2
:*response*
:response-headers)
(:import-from :djula
:add-template-directory
:compile-template*
:render-template*
:*djula-execute-package*)
(:import-from :datafly
:encode-json)
(:export :render
:render-json))
(in-package :ritherdon-archive.view)
(in-package #:cl-user)
(defpackage #:ritherdon-archive.view
(:use #:cl)
(:import-from #:ritherdon-archive.config
#:*template-directory*)
(:import-from #:caveman2
#:*response*
#:response-headers)
(:import-from #:djula
#:add-template-directory
#:compile-template*
#:render-template*
#:*djula-execute-package*)
(:import-from #:datafly
:encode-json)
(:export #:render
#:render-json))
(in-package #:ritherdon-archive.view)
(djula:add-template-directory *template-directory*)
@ -41,11 +41,11 @@
(defpackage ritherdon-archive.djula
(:use :cl)
(:import-from :ritherdon-archive.config
:config
:config
:appenv
:developmentp
:developmentp
:productionp)
(:import-from :caveman2
:url-for))
:url-for))
(setf djula:*djula-execute-package* (find-package :ritherdon-archive.djula))

Loading…
Cancel
Save