I am trying to write some notes on django with the help of org babel. Is there a way to replace a block in a file(which was not tangled with org) after I eval a certain src block?
Here's what I mean:
If my project is named ProjectA, django automatically creates the following files:
Project A ├── asgi.py ├── __init__.py ├── settings.py ├── urls.py └── wsgi.py
Now, from within org-mode, I am creating a new app called
core by executing the following:
#+begin_src shell python manage.py startapp core #+end_src
It creates a new directory called "core" with some boilerplate files.
There is a section inside
ProjA/settings.py where all manually created app should be registered explicitly:
INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'core', ]
Right now, I manually appended
core to the end of the
But since I am creating the app from within org-babel, is there a way to register the app from within org-mode without manually going to settings.py(which is not an org tangled file) and appending
core to the end?