These are chat archives for django/django

1st
Apr 2017
Anish Shrestha
@annshress
Apr 01 2017 06:31
@pae4557
Regardless of the value of the DEBUG setting in your configuration file, all Django tests run with DEBUG=False. This is to ensure that the observed output of your code matches what will be seen in a production setting.
John
@flyboy1565
Apr 01 2017 14:23
@azaleas , I'm working on a django rest with Vue.js app
azaleas
@azaleas
Apr 01 2017 14:32
@flyboy1565 thanks for the answer. What's your overall feedback on this approach?
John
@flyboy1565
Apr 01 2017 14:34
Using a REST API with Vue makes for a clean coupling.. also once you've build the API, that means you can drop in any js frameworks.
I still learning as I just to code everything by hand, no frameworks
Philip Eckert
@pae4557
Apr 01 2017 18:50
@annshress Ah okay. I used the unittest decorator override to change it
johndiego
@johndiego
Apr 01 2017 19:23
how i can pass django variables in templates?
for examples
{% block breadcrumbs with  %}
    <li>
        <a href="#">Clientes</a>
    </li>
    <li class="active">Novo - Edicao</li>
 {% endblock breadcrumbs %}
or myblock with variables in templates?
Ismael Venegas Castelló
@SalchiPapa
Apr 01 2017 19:28
Hello guys! Do any of you guys use Django with SweetJS, CoffeScript, TypeScript, RapydScript (Pythonic), Brython (Pythonic) or any other *Script dialect or transpiler? I'm liking web programming a lot, but I dislike JavaScript a little and was thinking of good alternatives.

I use PyCharm, which supports CoffeeScript and TypeScript, seems to be at least support for them in PyPi, brython can load via CDN, I'm not sure about the options.

I'm learning JQuery right now, what would you folks advice me? Thanks in advance!

Cheers :D
@johndiego you need to create a view (controller in some other frameworks)
johndiego
@johndiego
Apr 01 2017 19:31
pk
Ismael Venegas Castelló
@SalchiPapa
Apr 01 2017 19:31
in order to pass a context to the template
johndiego
@johndiego
Apr 01 2017 19:31
ok
Ismael Venegas Castelló
@SalchiPapa
Apr 01 2017 19:32
the context is a dictionary
johndiego
@johndiego
Apr 01 2017 19:32
how i declared array String in django templates?
you interpolate context view varibles in the templates using {{ variable }}
I don't understand your question, yo want to use an array of strings in your django template?
johndiego
@johndiego
Apr 01 2017 19:37
yes
I see in someone place
Ismael Venegas Castelló
@SalchiPapa
Apr 01 2017 19:38
<ul>
{% for string in strings %}
    <li>{{ string.capitalize }}</li>
{% endfor %}
</ul>
something like that
johndiego
@johndiego
Apr 01 2017 19:38
yes
this , but I 'liked in tags tempalte
Ismael Venegas Castelló
@SalchiPapa
Apr 01 2017 19:42
You mean a custom tag?
johndiego
@johndiego
Apr 01 2017 19:43

my child tempalte

{% include "partials/form_cidades.html"  with method="POST" %}

my cidades.html

<form  method="{{method}}">

</form>

I linked with method 'STR1 ,STR2 ,STR3'

johndiego
@johndiego
Apr 01 2017 19:48
include django block with variables for example
{% block breadcrumbs  {{myVar}}%}


    {% endblock breadcrumbs %}
Ismael Venegas Castelló
@SalchiPapa
Apr 01 2017 19:49
I'm not sure. Is tagception allowed?
{% for string in strings %}
    {% include "partials/form_cidades.html"  with method="{{ string }}" %}
{% endfor %}
I see, we are trying something similar
johndiego
@johndiego
Apr 01 2017 19:50
yes
Ismael Venegas Castelló
@SalchiPapa
Apr 01 2017 19:52
johndiego
@johndiego
Apr 01 2017 19:53
yes @Ismael-VC but with array Strings
in block breadcrumbs for example
johndiego
@johndiego
Apr 01 2017 20:07
method="{{my array string here!}}"
Mo Ali
@AkhterAli
Apr 01 2017 21:03
Hi guys! New here.
I’m thinking about getting into Django, I know a bit of python and would like to make a serverless framework of Django on AWS.
cs89gr
@cs89gr
Apr 01 2017 22:36
is anybody here ?
John Francis Marion
@jfmario
Apr 01 2017 22:38
yes, people pop in and out
cs89gr
@cs89gr
Apr 01 2017 22:40
@jfmario hello how are you?
John Francis Marion
@jfmario
Apr 01 2017 22:44
i am well how are you
cs89gr
@cs89gr
Apr 01 2017 22:46
the django take my sleep haha can you help me ?
John Francis Marion
@jfmario
Apr 01 2017 22:47
possibly, whats up
cs89gr
@cs89gr
Apr 01 2017 22:57
how to save new processing image to my model
?
John Francis Marion
@jfmario
Apr 01 2017 23:08
im a little confused, im not an expert but I would need more details and so would the experts here I think
John Francis Marion
@jfmario
Apr 01 2017 23:20
are you mainly accessing how to interact with the models and database from standalone scripts?
*asking
cs89gr
@cs89gr
Apr 01 2017 23:23
two things first the new image2 must be get in the folder of login user and must be update database with new image2(id,path,user)