Have a few of the basic admin pages working after switching to the API+View pattern.
This commit is contained in:
parent
fa7f886a59
commit
2b40d6fdc3
9 changed files with 188 additions and 29 deletions
|
@ -34,8 +34,14 @@ func RenderPages(pages_path string, target string, layout string) {
|
|||
prefixed_path := append([]string{target}, split_path...)
|
||||
|
||||
target_path := filepath.Join(prefixed_path...)
|
||||
_, err := os.Stat(target_path)
|
||||
|
||||
// compare time stamps and skip if not newer
|
||||
if os.IsNotExist(err) {
|
||||
log.Println("MAKING: ", "MAKE THE DAMN PATH NO FILE")
|
||||
// os.MkdirAll(target_path, 0750)
|
||||
}
|
||||
|
||||
// TODO: compare time stamps and skip if not newer
|
||||
|
||||
out, err := os.OpenFile(target_path, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644)
|
||||
if err != nil { return Fail(err, "writing file %s", target_path) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue