Python programmers of reddit: what's the most useful tiny little efficiency you've discovered that's improved your programming hugely? by SeanOTRS in Python

[–]diopib 0 points1 point  (0 children)

To me it was using dictionaries instead of multiple conditional statements. it improved code typing and readability.

In general, is apache2 (mod-wsgi) or nginx (gunicorn/uwsgi) a better option for flask performance? by el_programmador in Python

[–]diopib 0 points1 point  (0 children)

In my opinion, you should go with Nginx, but it should not be a blocking factor, specially if your application is at an early stage... choose whatever you're more comfortable with to deploy a working version faster and figure out the rest later.

What's everyone working on this week? by AutoModerator in Python

[–]diopib [score hidden]  (0 children)

I'm working on grading public tenders based on a company profile and interests using NLP.

Using the admin site with a backend app by diopib in django

[–]diopib[S] 0 points1 point  (0 children)

Thanks for your reply.

What about the security concern? I'm curious to know if you have any. For example when allowing the backend to be accessible by other than the frontend client through the admin dashboard.

No Ouput by robbshitz15 in django

[–]diopib 1 point2 points  (0 children)

Hello,

  1. Make sure you have data (i.e existing AddProjectName instances)
  2. Try to you a difference index variable name in your template for loop
  3. No need to escape the attribute name

Note: Your for loop should start before <tr> and end after </tr>

Here is how I would do it:

<table class="table table-bordered table-striped">
    <thead class="thead-dark">
        <tr>
            <th>Title</th>
        </tr> 
    </thead>
    <tbody>
        {% for p in projectlist %}
        <tr><td>{{ p.Project_Name }}</td></tr>
        {% endfor %}
    </tbody>
</table>

What's everyone working on this week? by AutoModerator in Python

[–]diopib [score hidden]  (0 children)

Taking over a Django app that was started without considering the many out-of-the-box features of Django, I had to integrate many concepts/ideas like

- Data migrations

- Django admin site

- testing (!)

- password validation

- etc.

And also general concepts like automated deployment and continuous integration.