ColeDrain's Posts
Nairaland Forum › ColeDrain's Profile › ColeDrain's Posts
How I ran Django on my android phone Yeah, it seems weird coding with your phone, but right now I don't have an option, so if you are like me or you just fancy the idea, you can also do this. This is not an introduction to Django tutorial but how to work on Django with your android. First we need something like a Linux terminal(or CLI) for android. Lucky for us, there is a terminal emulator on Google play store called Termux, so head to playstore and install it. Link:termux Okay, so you have installed it, what next? So basically you can do whatever you could do on a Linux terminal now with this app(create directories, move files, change directory). This is how Termux looks like. https://dev-to-uploads.s3.amazonaws.com/i/63160yviulhadk0ut1as.jpg So let's roll in. Enter this command to view where Termux saves your files. $ pwd https://dev-to-uploads.s3.amazonaws.com/i/90dcxddspy67gaikwtd1.jpg So that's where Termux saves your files, but the problem is you can't access that folder because of safety issues. So to be able to access your files.. run this command $ termux-setup-storage And allow permission to storage in the popup shown. https://dev-to-uploads.s3.amazonaws.com/i/c2v89svlzaqub7ojqj75.jpg Now change directory to your internal shared storage by running this command. $ cd /sdcard N:B this command doesn't point to your external SD card but your internal SD card(storage). Then let's create a folder to store our Django projects, let's call it django_projects. So run this command. $ mkdir django_projects $ cd django_projects Now let's install python To install python, run this $ pkg install python To check if python is installed, run the python command to enter python console. $ python N:B Use ctrl + z to exit the terminal. Termux app comes with a ctrl key. Let's create a project called mysite So still in that django_projects, run this commands. $ mkdir mysite $ cd mysite We need a virtual environment to avoid dependencies clash. So let's install a virtual environment, run this command. $ pip install virtualenv After installing it, run $ virtualenv venv to create a virtual environment.. Then activate the virtual environment by running (note the full stop) $ . venv/bin/activate Now we have a virtual environment, let's install Django. run.. $ pip install Django Okay, so Django is installed in our venv, let's create a Django project. run.. $ django-admin startproject hello . (note the full stop) Then let's run migrations.. $ python manage.py migrate You can then run the server.. $ python manage.py runserver voilà, go to your phone browser and open localhost and you should see this. https://dev-to-uploads.s3.amazonaws.com/i/pziu4sk2ocsraijhpecv.jpg You can always view your files by going to your file manager and searching for django_projects folder. Feel free to indulge me, if any issues. |
BoleAndFish:What text editor are you using? Just create a new file from your text editor and save it in the polls folder. |
BoleAndFish:Yeah, that will solve the issue. |
BoleAndFish:Hey man. Programming languages, web frameworks or engines are just tools, all have their strengths and weaknesses, there's no 'perfect guy'. Most people use express.js with node.js for backend specific purpose. I have used Django and it's pretty okay so let me talk about it, it's scalable, and you can build web applications very fast with it. The fun thing about Django is that it is a python web framework, and python arguably is one of the easiest programming languages to pick, the easiness doesn't mean python isn't powerful, it is very powerful, I think Instagram and YouTube use python. I find JS as a convoluted language, it's good, it's fast, but the complexities it brings some times, sure you can get over them. So I would recommend Django for a beginner. If you already have knowledge of JS, you can use express.js with node.js. If it's about getting a job: PHP, java are more popular in Nigeria market (I think), stats in Nigeria are very scarce. Don't only be seeking job in Nigeria sha, look outside too sha. P:S Some may mention JS is faster than python, but with the kind of servers and clients we have speed doesn't matter so much. |
pixey:Thanks man. |
BoleAndFish:Books: 1. Django 3 by Example 2. Two Scoops of Django Videos: Check these guys on YouTube, they have tons of Django videos. 1. Just Django 2. Corey Shafer 3. Dennis Ivy |
Men. It's so hard to do a tutorial on Nairaland. |
KlausMichaelson:Hey man. I have been caught up in a lot. We will continue this month... Sorry guys.. |
So I wanna create a HTML tag named buhari with my own preferred properties. Just like we have h1, h2, p tags. Something like this <buhari></buhari> To have an idea of how interesting this is. The h1 tag for example comes with a bolder font weight and 30px font size, anywhere the browser sees h1 it applies those properties, the same with our buhari tag. 1. Open your stylesheet(CSS file) and create a selector using buhari, then add your preferred properties N:B You can use internal CSS buhari{So any text within the buhari tag will have a blue text color, a font size of 30px and will be underlined. 2. Go to your HTML file, link it with your CSS file. Then use the buhari tag. <buhari>I work like any other HTML tag.</buhari> Voila! It should give you the last image below. Simple as abc. N:B This is not advised as it is bad practice. Just for fun tho... I am crazy right? ![]()
|
Okay, let's say I was curious about this. Why do Gecko's tail dance and how is it possible? It is amazing how only a tail can flip, jump and dance. The gecko's tail is connected to it's spinal cord, but once any of the three below occurs, it detaches it. Just a small pinch in the right place is all it takes for the gecko to drop its tail. First there are many reasons why a gecko's tail may drop: 1. It is being attacked by a predator When a gecko senses that it is being attacked, it drops its tail to distract the predator, as the predator is being distracted by the tail, the gecko escapes. Some times even the tail escapes, then the gecko comes back for it to eat. 2. The tail got stuck This may happen if the gecko gets stuck by objects that then force its tail to drop 3. It was removed intentionally or accidentally by a person Someone accidentally or intentionally removed the gecko's tail. How this happens? It is possible to move parts of the body without any active control from the brain thanks to independently operating neurons called Central Pattern Generators(CPG). These neurons can cause parts of the body where they are found in to move independently from the brain(same goes for a headless chicken or roach). The tail according to research also seemed to be aware of it's environment, so if it hits a wall, it changes direction. It is claimed that this sporadic movement may last up to 30 minutes. Does the tail grow back? Yes the tail grows back within 30 days. Scientists are studying geckos and how this can help in treating spinal cord issues in Human This post first appeared on [url]ugoayo.pythonanywhere.com[/url] |
Web monetization in layman terms is making money from traffic to your websites, as easy as that. Most websites do this through: Pay Per Click PPC- get paid when an ad is clicked by site visitors Cost Per Impression CPI- get paid when an ad is displayed and viewed by site visitors So basically the existing ways of making money from your website involved putting ads on your website, and truthfully ads atimes are very annoying, your privacy is invaded, user experience is diminished for example why will an ad cover the content of a web page you are reading, it's so annoying. A new standard of making money on the web is being advocated, it is called the Web Monetization API. Web monetization API seeks to solve the problems of present monetization schemes, that is no ads, no invasion of privacy, the user enjoys the website, and the website owner still earns. From [url]webmonetization.com[/url], web monetization is a JavaScript Browser API which allows the creation of a payment stream from the user agent to the website, the payment occurs in real time. Just by adding a line of code to your website or specifying a streaming channel to earn. How it works: 1. The website or website owner needs a wallet to receive payments. 2. User/ Website visitor needs a wallet to send payments. 3. The browser initiates payment in the background. Chrome and Firefox browser support it as an extension. Puma browser supports it totally. So a future without annoying ads and privacy thieves may be possible. Keep this in mind. Check out the following for more gist: [url]webmonetization.org[/url] [url]coil.com[/url] This post first appeared on [url]ugoayo.pythonanywhere.com[/url] |
Vyzz:Getting used to it?? The killings, the unwarranted privileges, the nepotisms... Na man. Racism in the past was even worse but men and women stood up to fight against it... People like MLK or that woman refusing to sit at the back of the bus, those fights/protests surely did something, and more can be done... |
I feel sad for the guy tho. But will it be safe to assume coz his wife is racist that he also is racist? I think they were too harsh |
The LA Galaxy released midfielder Aleksandar Katai following racist social media posts made by his wife, Tea, the team announced Friday. In a one-sentence news release, the team said it had "mutually agreed to part ways" with the midfielder, who joined the team before this season after spending the previous two campaigns with the Chicago Fire. The Galaxy reached a financial agreement with Katai and do not have any further financial obligations to the player. The Instagram posts made by Tea Katai late on Tuesday, which have since been taken down, mocked protests related to the death of George Floyd while in police custody in Minneapolis last week. One post showed a police SUV attempting to drive through protesters in New York. A caption in Serbian read, "Kill the s---s!" while a second post showed a picture of an individual carrying boxes of Nikes with the caption "Black Nikes Matter." The response from Galaxy fans was quick, with some demanding Katai's release. One social media post showed four fans holding a banner in front of Dignity Health Sports Park stating, "No Racists in Our Club," with Katai's No. 7 circled with a red slash through it. Katai, 29, later posted a message on Instagram calling the posts "a mistake from my family" and saying he took full responsibility. He apologized "for the pain these posts have caused the LA Galaxy family and all allies in the fight against racism." The Galaxy issued a statement Wednesday condemning the posts, saying, "The LA Galaxy stands firmly against racism of any kind, including that which suggests violence or seeks to demean the efforts of those in pursuit of racial equality." At the time, the team said they would meet with Katai on Thursday to determine next steps. After the meeting, the two sides had decided to part ways. Source: https://www.espn.com/soccer/la-galaxy/story/4106585/galaxy-release-aleksandar-katai-after-wifes-social-media-posts
|
Nyamve1:That was actually metaphorical. |
This news is quite old. |
J. I don't use a CSS framework/ I write the CSS myself. |
I. UI Kit |
h. Animate.css |
g. TailWind CSS |
f. Materialize |
e. Semantic UI |
d. Foundation |
c. Bulma |
b. Atomic CSS |
a. Bootstrap |
Question 15: What CSS framework? |
S. Others |

