django Get link Facebook X Pinterest Email Other Apps March 16, 2025 # Request Method Checker for Web for APIfrom django.views.decorators.http import require_http_methods@require_http_methods(['POST'])def testFun(request): name = "test" return HttpResponse(name) Get link Facebook X Pinterest Email Other Apps Comments
React Js April 26, 2025 Router in React Js npm install react-router-dom first create a router file import { Routes , Route , Navigate } from " react-router-dom " ; import Hooks from "../components/hooks" ; import Cours from '../components/carousel' import App from "../App" ; const AppRouter = () => { return ( <> < Routes > < Route path = '/' element = { < App /> } /> < Route path = "/hooks" element = { < Hooks /> } /> < Route path = "/cours" element = { < Cours /> } /> </ Routes > </> ); }; export default AppRouter ; Wrap the it in BrowserRouter in the main.jsx import { StrictMode } from 'react' import { createRoot } from 'react-dom/client' import './index.css' import 'bootstrap/dist/css/bootstrap.min.css' import 'bootstrap/dist/js/bootstrap.b... Read more
Comments
Post a Comment