You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my company's django project, we have all of our apps in an "apps" directory. The pony-get-app function always returns apps rather than "integration" or what-have-you. This was my solution for it.
;; should probably be customization field?
(setq pony-app-dir-prefix "apps")
(defun pony-get-app ()
"Return the name of the current app, or nil if no app
found. Corrects for excluded prefix."
(let* ((root (pony-project-root))
(excluded-prefix (if (nil-blank-string pony-app-dir-prefix)
(concat root pony-app-dir-prefix "/")
root))
(re (concat "^" (regexp-quote excluded-prefix) "\\([A-Za-z_]+\\)/"))
(path (or buffer-file-name (expand-file-name default-directory))))
(when (string-match re path)
(match-string 1 path)))))
The text was updated successfully, but these errors were encountered:
Most likely to turn this into a .dir-locals setting...
At which point you'd set it at the directory above all your company's Django source & this would work for your case IIUC
In my company's django project, we have all of our apps in an "apps" directory. The pony-get-app function always returns apps rather than "integration" or what-have-you. This was my solution for it.
The text was updated successfully, but these errors were encountered: