Posts by Thiago Krempser • 1,878 points
66 posts
-
7
votes1
answer2286
viewsQ: What is the difference between "git push" and "git Sync"?
After I make one git commit to save the changes to my local repository, I can upload them to the remote repository using both the command git push how much using the command git sync. What’s the…
gitasked Thiago Krempser 1,878 -
0
votes1
answer979
viewsQ: What’s the difference between git pull and git fetch?
If both commands carry code from the remote repository, can I use either? Is there a difference between using git pull and git fetch?
gitasked Thiago Krempser 1,878 -
7
votes4
answers4137
viewsQ: Is there a "main()" function in Python?
In some languages, as in C, we have the function main() which is usually the default entry point of the program. There is something similar in Python?
-
0
votes1
answer80
viewsA: Django showing error 500 instead of showing error 404
According to the django documentation, in the part dealing with custom error pages, it is mandatory that the custom view of error 404 accepts two parameters: the request and the exception. The…
djangoanswered Thiago Krempser 1,878 -
0
votes1
answer80
viewsQ: Django showing error 500 instead of showing error 404
My file views.py: def handler404(request): return render(request, '404.html', status=404) def handler500(request): return render(request, '500.html', status=500) My file urls.py: handler404 =…
djangoasked Thiago Krempser 1,878 -
2
votes2
answers945
viewsQ: Remember Git user and password when commiting
Every time I commit, Git asks me for my username and password. Is there any way to cache credentials and avoid having to type all the time? Use git repositories with HTTPS and non-SHS connection.…
gitasked Thiago Krempser 1,878 -
3
votes2
answers945
viewsA: Remember Git user and password when commiting
To store your credentials, please install osxkeychain helper making: git credential-osxkeychain Then set up the credential.helper to store your credentials. On the Mac: git config --global…
gitanswered Thiago Krempser 1,878 -
2
votes1
answer439
viewsQ: Django Urlconfs name parameter
In Urlconf below: urlpatterns = [ url(r'^$', views.index, name='index'), ] What is the function of the parameter name? It is possible to explain with a practical example?…
-
3
votes1
answer842
viewsQ: __str__ and __unicode__methods
I’ve seen class codes that implement Django models overwriting both the method __str__ like the __unicode__, there is difference between them? If yes, there is some case that I should prefer one…
-
6
votes2
answers1210
viewsA: Python Shell and Django
When opening the shell using python manage.py shell, inside the directory of your Django project, the environment will be configured so that it is possible to interact with the objects of your…
-
3
votes2
answers1210
viewsQ: Python Shell and Django
I know that to open the interactive Python shell, we simply run on the operating system terminal: python But with Django installed, you can also open the shell using the command: python manage.py…
-
7
votes1
answer1523
viewsQ: Python. pyc file function
If the Python language is interpreted, why are there . pyc files that are compiled bytecodes?
-
2
votes1
answer568
viewsQ: Unicode and UTF-8
What is the difference between Unicode and UTF-8? They are the same encoding or one is derived from the other?
-
2
votes1
answer51
viewsA: Error with Android Style
According to the documentation, an element <item> must be a child of <style>. Review the following excerpt from your file: <item name="elevation">0dp</item> Note that he does…
-
7
votes1
answer3178
viewsQ: What is the difference between package and module in Python?
Is there a difference between a package and a module in Python? If there is a difference, it is possible to give examples of packages and modules?
pythonasked Thiago Krempser 1,878 -
2
votes1
answer309
viewsQ: What is the function of the -m Python option?
To find out what version of Django I have installed, I use the following command on the terminal: python -m django --version What is the function of the option -m of this command?…
pythonasked Thiago Krempser 1,878