These are chat archives for django/django

8th
Apr 2016
Alexey Rogachev
@arogachev
Apr 08 2016 03:17
Hi guys! How can I print with exit variables containing strings with russian (cyrillic) symbols?
Alexey Rogachev
@arogachev
Apr 08 2016 03:25
Also why changing verbose_name in model is considered when I run makemigrations?
I expected it's only related with changing structure such as column names, types, etc.
Vinay Nagar
@vinayrnagar
Apr 08 2016 04:11
Hi All. If I want to fetch all the records of a ManyToManyField field in a model, do you always recommend using prefetch_related for performance reasons?
Alexey Rogachev
@arogachev
Apr 08 2016 04:24
@vinayrnagar You are talking about lazy / eager loading of related records, right?
Vinay Nagar
@vinayrnagar
Apr 08 2016 04:49
yeah I guess. I know that I need to access the ManyToManyField field.
Alexey Rogachev
@arogachev
Apr 08 2016 04:56
As for my problem with cyrillic symbols, the error is like this:
'ascii' codec can't encode characters in position 6-14: ordinal not in range(128)
Alexey Rogachev
@arogachev
Apr 08 2016 06:38
I temporarily solved it just by printing it inside template with {% ... %}
Vinay Nagar
@vinayrnagar
Apr 08 2016 06:39
can anybody help with my question? :)
Alexey Rogachev
@arogachev
Apr 08 2016 06:40
@vinayrnagar Could you describe more clear what you problem is?
Filip Figiel
@megapctr
Apr 08 2016 06:54
@arogachev how are you printing these symbols?
Alexey Rogachev
@arogachev
Apr 08 2016 06:55
@megapctr Hi. Maybe you can help
Filip Figiel
@megapctr
Apr 08 2016 06:55
@arogachev modifying the model.Meta class does require making migrations, I'm not sure why django needs this information though
Alexey Rogachev
@arogachev
Apr 08 2016 06:55
Well, I just wrote something like { % variable % }
Filip Figiel
@megapctr
Apr 08 2016 06:56
do you mean {{ variable }}?
cuz {% %} is a template tag, not a context reference
Alexey Rogachev
@arogachev
Apr 08 2016 06:57
nope, {% %}, because this variable comes from template
from custom template tag
later I replaced it with proper template_result as result
but the question is, how to do it similar to php var_dump($a); exit() ?
in any place
I understood about migrations, it's weird, but I accepted that philosophy
Filip Figiel
@megapctr
Apr 08 2016 07:08
Just print the variable in the server code and refresh the page
Then watch server output
Shakib Hossain
@shakib609
Apr 08 2016 08:28

Any suggestions on what should I learn next to master Back end web development?

  • Database / SQL
  • Flask
  • Django

which one should I learn next after Python?

Constantin Angheloiu
@cmnstmntmn
Apr 08 2016 08:29
django rest framework
API will force you to think in terms of business logic
Shakib Hossain
@shakib609
Apr 08 2016 08:31
Thanks for the suggestion.. :) +1
Constantin Angheloiu
@cmnstmntmn
Apr 08 2016 08:31
and gives you a big perspective over your data and the relations between
also it comes with security, networking
Shakib Hossain
@shakib609
Apr 08 2016 08:32
Thanks.. Eagerly looking forward to learning django. :smile:
Constantin Angheloiu
@cmnstmntmn
Apr 08 2016 08:32
so a lot to learn only from a single API
Alexey Rogachev
@arogachev
Apr 08 2016 08:34
I'd recommend to not limit yourself in learning just rest api in django
Shakib Hossain
@shakib609
Apr 08 2016 08:34
@arogachev why?
Alexey Rogachev
@arogachev
Apr 08 2016 08:35
Well, it depends on projects and needs.
Constantin Angheloiu
@cmnstmntmn
Apr 08 2016 08:35
rethink db also is a mind blowing tool
Alexey Rogachev
@arogachev
Apr 08 2016 08:35
if consider apps like backend - rest, frontend - js framework or nodejs, yes it will be better choice
Shakib Hossain
@shakib609
Apr 08 2016 08:37
I was actually looking for a starting point from where I should start learning back end development. Limiting myself is the last thing I want to do.. I love learning new things.. What would you suggest??
Alexey Rogachev
@arogachev
Apr 08 2016 08:38
just start doing something
failure is always an option
trial and error this is the way of learning :smile:
Constantin Angheloiu
@cmnstmntmn
Apr 08 2016 08:38
for example i want to start elm programming and learn rethink
Shakib Hossain
@shakib609
Apr 08 2016 08:38
Yeah :) :+1:
Alexey Rogachev
@arogachev
Apr 08 2016 08:38
try to write django polls app as in tutorial
Constantin Angheloiu
@cmnstmntmn
Apr 08 2016 08:38
i find them cutting edge technologies
yeah go play around
Alexey Rogachev
@arogachev
Apr 08 2016 08:39
And I personally prefer to learn by developing something useful, not just abstract thing
think about how you can optimize or simplify something and create site for this
at least small one
Shakib Hossain
@shakib609
Apr 08 2016 08:40
I have some ideas that I want to implement to a full fledged website.
Constantin Angheloiu
@cmnstmntmn
Apr 08 2016 08:40
AAAND stay away from wordpress!!
never, ever use it
Alexey Rogachev
@arogachev
Apr 08 2016 08:41
why? you have bad experience with it?
Shakib Hossain
@shakib609
Apr 08 2016 08:41
@arogachev Thanks for the suggestions. I really need to do do something useful..
Constantin Angheloiu
@cmnstmntmn
Apr 08 2016 08:41
plenty, the product is shitty
Shakib Hossain
@shakib609
Apr 08 2016 08:41
@cmnstmntmn hahaha
Alexey Rogachev
@arogachev
Apr 08 2016 08:41
@cmnstmntmn so you PHP dev also?
Constantin Angheloiu
@cmnstmntmn
Apr 08 2016 08:41
php + html + css + js all in the same fkn file
yeah, i'm a fan of symphonycms (wich is more like a framework)
Alexey Rogachev
@arogachev
Apr 08 2016 08:42
:worried: I have not much experience with wordpress, but I believe for smaller sites it's OK
Shakib Hossain
@shakib609
Apr 08 2016 08:42
@cmnstmntmn I think for small blog site like projects nothing beats wordpress
Constantin Angheloiu
@cmnstmntmn
Apr 08 2016 08:42
simphonycms does
Alexey Rogachev
@arogachev
Apr 08 2016 08:42
@cmnstmntmn I'm Yii2 dev :smile:
Constantin Angheloiu
@cmnstmntmn
Apr 08 2016 08:44
i'm a bit suspicios about it's (php) future
Shakib Hossain
@shakib609
Apr 08 2016 08:44
@arogachev Well I don't have any experience with PHP.. But I hear this a lot that php is going away soon.
Constantin Angheloiu
@cmnstmntmn
Apr 08 2016 08:44
it's to heavy, to ugly to develop with it
elm ftw
Shakib Hossain
@shakib609
Apr 08 2016 08:45
@cmnstmntmn But one of my friends said that PHP 7 is really good.
Constantin Angheloiu
@cmnstmntmn
Apr 08 2016 08:48
meh
also you should learn about tasks runners
learn webpack
Constantin Angheloiu
@cmnstmntmn
Apr 08 2016 08:55
it'll be your best friend
learn Git
free quality cources
Alexey Rogachev
@arogachev
Apr 08 2016 09:07
@shakib609 That's not true
PHP is very solid language by now, PHP 7 was released recently
If you can not cook that does not mean it's a bad language
and it's definetely will not go away, majority of sites are written in it
I don't want to argue about it too much, but please don't blame it.
so I'd recommend don't trust to anything that someone said
cauffe
@cauffe
Apr 08 2016 09:44
@arogachev if you want to be a PHP shill go do it in a PHP room. PHP was a clever idea when it first came out, and really had it's spot in the world. However everything that made it worth overlooking its shortcomings are now available in much better languages, like Python :)
Alexey Rogachev
@arogachev
Apr 08 2016 10:00
@cauffe I just answered to this :point_up: 8 апреля 2016 г., 14:44
And by writing "much better languages", you are blaming PHP too
Sorry, I don't want to argue about that further. Will come back with some django related questions later
cauffe
@cauffe
Apr 08 2016 10:02
@arogachev Yes, the creator of PHP did not create a language that was suitable for 90% of the internet to run on.
@arogachev It is a garbage language that has some neat features when it came out
@arogachev it is now just a garbage language :D
Alexey Rogachev
@arogachev
Apr 08 2016 10:02
And I'm here to learn python and django because I want to :smile:
ok, it's just your opinion
But I partially agree that many things are far from perfect there
cauffe
@cauffe
Apr 08 2016 10:03
Its a fact https://en.wikipedia.org/wiki/PHP , Rasmus Lerdorf , the inventor of PHP has said this him self. You are just a PHP shill if you want to pretend its not true.
Alexey Rogachev
@arogachev
Apr 08 2016 10:04
ok, let's stop holy wars and continue to discuss python / django
cauffe
@cauffe
Apr 08 2016 10:05
@arogachev you are the one preaching PHP in a Python church. If you want to go try to convert people to Christianity in a Masque you'll probably get about the same reception!
fuck off! :D
Alexey Rogachev
@arogachev
Apr 08 2016 10:27
@cauffe be careful with words like that
@shakib609 and @cmnstmntmn started this discussion
And didn't say anything so you can easily throw words like that
I'd rather go and figure things on my own if you can't respect other languages and start holy wars
Bruno F Souza
@varnion
Apr 08 2016 14:45
any recomendantions of mysql + django tutorials? i know the basics of django, but am always using sqlite3
Constantin Angheloiu
@cmnstmntmn
Apr 08 2016 14:46
@varnion www.codecademy.com they have a SQL cource too
Bruno F Souza
@varnion
Apr 08 2016 14:48
@cmnstmntmn thanks ;)
Jesse Pavlis
@jessepavlis
Apr 08 2016 15:47
This message was deleted
gmwill92
@gmwill92
Apr 08 2016 19:03
What front end framework do you use with Django? bootstrap ? any other? I'd like to hear your opinions