Posts

Showing posts from July, 2022

REACT NATIVE

1. To install expo cli use command npm install -g expo-cli 2. To create a new project in expo use below command expo init projectname 3. In react native h2 tag and div are not working as it has no react dom and we are building the react native app 4. React native don't have dom and they do not support those html element 5. div replace with view and input replace with TextInput 6. View is only able to hold the other component, not able to display the text 7. View component have multiple child component 8. In web dev we have other component like article, section - here we have only view 9. We can put view inside view - when we build more  complex project 10. In normal react you don't have to import the html element but in react native you do Styling the components:- 11. Here we don't have any css so to style the react native app we have to way  - either we do inline styles - Stylesheet objects ( Saari style ek object ke andar daal do fir use reuse bhi kr sakte hai) -achi hai ...

NEW THINGS ABOUT DJANGO

 1.  Without  F()  expressions this would be accomplished with either raw SQL or filtering in Python (which reduces the performance especially when there are lots of objects). 2.  *   unpacks a list or tuple into position arguments. **  unpacks a dictionary into keyword arguments. >>> lis=[ 1 , 2 , 3 , 4 ] >>> dic={ 'a' : 10 , 'b' : 20 } >>> functionA(*lis, **dic) #it is similar to functionA(1, 2, 3, 4, a=10, b=20) ( 1 , 2 , 3 , 4 ) { 'a' : 10 , 'b' : 20 } 3.

AWS

 1. Python manage.py  check --deploy [ deploy checks to be made before putting on server] 2.We can configure the domain name with Route 53 service provided by aws 3.  to make the file read-only in mac -- chmod 400 filname.py 4. sudo apt-get update  --- to update everything 5. sudo apt-get upgrade -y   -- to update all the packages 6. New way to create virtualenvironment ---    python -m venv env   7. Gunicorn is a python module so we can install with pip3 install gunicorn 8. Ngnix comes from ubuntu system sudo apt-get install -y nginx 9. supervisor is used because it makesure that your server will run on background  10. supervisor will make sure that gunicorn will always run on background 11. to install supervisor sudo apt-get install -y supervisor 12. Now we have to make config file for supervisor so that supervisor can read that config file and do the operations and that is in directory  cd /etc/supervisor/conf.d/ then create...