What do you want to save?
Add Code snippet
New code examples
-
PHP 2022-02-03 07:10:02
How to use my constants in Larvel
Create a file constants.php inside app/config/ and put your settings in an array: <?php //file : app/config/constants.php return [ 'ADMIN_NAME' => 'administrator' ]; Then anywhere in your controllers or views you can get the value by using Confi... Add solution -
Javascript 2022-02-02 09:21:03
expo image editor
import { ImageEditor } from "expo-image-editor"; function App() { const [imageUri, setImageUri] = useState(undefined); const [editorVisible, setEditorVisible] = useState(false); const selectPhoto = async () => { // Get the permis... Add solution -
Shell/Bash 2022-02-01 07:20:02
Powerline in PowerShell
# install Cascadia Code PL or Cascadia Mono PL from it's github release # install Git for Windows, If you haven't yet # Type in powershell Install-Module posh-git -Scope CurrentUser Install-Module oh-my-posh -Scope CurrentUser # Open your PowerShell... Add solution -
Python 2021-11-19 14:57:18
template does not exist django
First solution: These settings TEMPLATE_DIRS = ( os.path.join(SETTINGS_PATH, 'templates'), ) mean that Django will look at the templates from templates/ directory under your project. Assuming your Django project is located at /usr/lib/python2.5/sit... Add solution -
Python 2021-11-15 16:32:24
how to add captcha in django forms
Using django-simple-captcha Install django-simple-captcha via pip: pip install django-simple-captcha. 1. Add captcha to the INSTALLED_APPS in your settings.py. 2. Run python manage.py migrate. 3. Add an entry to your urls.py : urlpatterns += [ path('captc... Add solution -
Other 2021-11-05 12:35:18
ruby on rails vscode erb format
# Go to File->Preferences->Settings->Click ... # in top right corner->Open settings.json # Then add this piece of code to your settings.json ... ... "ruby.rubocop.onSave": true, "editor.formatOnSaveTimeout": 5000, "e... Add solution -
Python 2021-11-02 17:15:06
djangodebug toolbar not showing
# in settings file import mimetypes mimetypes.add_type("application/javascript", ".js", True) """The main reason for not showing up the toolbar is because of the javascript mime-types error when you connect the debug_to... Add solution -
Python 2021-11-02 12:52:17
django EMAIL_BACKEND console
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' '''Console backend¶ Instead of sending out real emails the console backend just writes the emails that would be sent to the standard output. By default, the console backend writes to s... Add solution