how to validate the name field in source and Tinyurl to get below codes

16 views
Skip to first unread message

malhaar mahapatro

unread,
Mar 8, 2022, 7:57:50 PM3/8/22
to Django users
Source table
       
         id auto increment
         Name : source name (unique)  mk
         Desc : small descripton to know about sourc
         rooturl : domain Name that deployed this tinny url https://tm.py/
         Active/Expired: Bool
         Createdon
         CreatedBy
         
         
         Tinny URL tables
         
         
         id, : auto
         sourcecode : source table code mk
         tinnycode : generated 6 digits code ( should be unique for source) A123h5
         MainURL : actual url
         tinnyURL: tinney https://tkm.py/A123h5
         validity : no of days valid from created date
         Createdon : auto
         createdby : request by
         RequestFrom : request header info ( Like IP,request url, user etc)
         
       
         setTinnyURL( Source, actual URL, validity)
         
         soruce :Mk
         actual URL :
         https://airbrake.io/blog/python/zerodivisionerror-2#:~:text=As%20you%20may%20suspect%2C%20the,or%20modulo)%20operation%20was%20zero.&text=We'll%20also%20see%20how,handling%20division%20by%20zero%20issues.
         
         validity : 3
         
          log ( "got tinney request for MK soruce", "IP",USr)
          generate Tunney code 6 unique A123h5
         
          {
                status: 200
                message": success
               
                response:{
                                TinnyURL: "https://tkm.py/A123h5"
                }
               
          }
         
         
           
         getTinnyURL(tinnyURL)
         check  tinnyurl in  Tinny URL tables , value matched in tinnyURL field then retun actualURL
Reply all
Reply to author
Forward
0 new messages