Re: Aide

2019-07-05 Thread PASCUAL Eric
Google est ton ami : "django mongodb" fournit un tas de réponses à cette question, y compris des références à des packages d'extension de Django. Eric From: django-users@googlegroups.com on behalf of Djamiyou CHITOU Sent: Thursday, July 4, 2019 11:48 To: Djang

Re: Accessing data from a 30 GB file in json format

2019-07-01 Thread PASCUAL Eric
generation. Eric From: django-users@googlegroups.com on behalf of PASCUAL Eric Sent: Monday, July 1, 2019 17:06 To: django-users@googlegroups.com Subject: Re: Accessing data from a 30 GB file in json format Hi, To be able to traverse the JSON structure you&#

Re: Accessing data from a 30 GB file in json format

2019-07-01 Thread PASCUAL Eric
Hi, To be able to traverse the JSON structure you'd normally need the entire structure in memory. Not mandatory, depending whats is to be done with the data. The same problem exists with XML, and this is the reason why SAX parsers have been created in addition to DOM ones. If the data process c

Re: Django-MQTT

2019-05-21 Thread PASCUAL Eric
Hi Sabuhi, I wrote something similar a couple years ago, not involving Arduinos but using MQTT anyway. The selected approach consisted in having a MQTT listener, based on paho-mqtt lib (https://pypi.org/project/paho-mqtt/), acting as a gateway to a REST API on the Django side, based on Django

Re: Porting Django app

2019-05-19 Thread PASCUAL Eric
Hi, You can avoid dealing with IPs directly, considering that mDNS is available by default on Debian based distros (hence Ubuntu). Thanks to this, the server is published as ".local". mDNS is not installed by default in Windows, but it seems that it changed with Windows 10. Best Eric ___

Re: Django REST in Docker

2019-04-09 Thread PASCUAL Eric
ements.txt COPY . /code/ On Tue, Apr 9, 2019 at 1:30 PM PASCUAL Eric mailto:eric.pasc...@cstb.fr>> wrote: Hi, Working in contenerized context does not change anything from other modes. You just need to include the appropriate pip install command in the Dockerfile, so that all the dependenci

Re: Django REST in Docker

2019-04-09 Thread PASCUAL Eric
Hi, Working in contenerized context does not change anything from other modes. You just need to include the appropriate pip install command in the Dockerfile, so that all the dependencies are installed in the image. They will then available to your app the same way they are on you dev machine.

Re: Specifying model relationship as string vs concrete model?

2019-04-07 Thread PASCUAL Eric
Hi Mohit, The only situations where I have used strings are forward declarations or potential reference loops. Intuitively I'd say that referencing models by their name adds a slight overhead for class lookup. But since this is supposed to happen only when the model definition is loaded (field

Re: Django inbuilt server

2019-04-03 Thread PASCUAL Eric
Hi, Chances are that you're thinking about "runserver", which is a management command. On Unix based systems (i.e. Linux or MacOS) you start it with : ./manage.py runserver I'm not exactly sure about Windows, but it should be something as : python manage.py runserver Warning : as stressed in

Re: Venv

2019-04-02 Thread PASCUAL Eric
Hi, pyenv (https://github.com/pyenv/pyenv) offers a simpler way for activating/deactivating venvs, by managing this automatically for you based on where you are located in the file tree. Before focusing on this feature, you must know that pyenv does far more than managing virtualenvs, since it

Re: Create models using raw SQL queries

2019-03-28 Thread PASCUAL Eric
Hi Cameron, the reason why I wanted to use django is that I had used it before and I didn't want to have to learn a new framework if possible. Makes sense. However, light FWs such as Tornado (which I like a lot, and prefers over Flask BTW) have a really small learning curve for a basic usage (i

Re: Create models using raw SQL queries

2019-03-27 Thread PASCUAL Eric
Hi, Not sure Django is the right choice in your case since one of its main purposes is to hide the SQL stuff by putting the ORM in front. You'd better use Flask, Tornado or any other Web framework which does not come with any special feature WRT data access. Best Eric ___

Re: Django template

2019-02-09 Thread PASCUAL Eric
Hi, Templates are nothing more than HTML files with special tags inside. In their simplest form, they can be plain HTML without any templating tags and they will thus be rendered without any change. In conclusion, to keep it simple and still let you the opportunity to benefit from templating f

Re: Webinterface for python script

2019-02-07 Thread PASCUAL Eric
Hi Scott, 100% agree with all your points about stock Django. This is BTW the way I use it in all my projects. The stripping experiment I mentioned has been done for curiosity's sake, for diving a bit into customization if ever I would need it some day. Knowing this, my suggestion about provid

Re: Use of asyncio

2019-02-06 Thread PASCUAL Eric
Hi, There has been quite a lot PyCon talks about this topic, including introduction ones for people not used to Python async extensions. You can find them on YouTube by asking for "pycon asyncio" for instance. Best Eric From: django-users@googlegroups.com on

Re: Webinterface for python script

2019-02-06 Thread PASCUAL Eric
Hi Derek, but I have never seen anyone refer to it as a "lightweight" project (before you, that is). I didn't meant "Django is lightweight" but "Django can be lightweight", implied you configure it accordingly. Of course, leaving in place the ORM, the session management, the authentication syst

Re: Webinterface for python script

2019-02-05 Thread PASCUAL Eric
Hi, I never know what people mean by "Django is overkill for...". Django is lightweight and starts up very quickly You're right WRT the Django technical part. My feeling is that people implicitly refer to the learning curve, because it's the visible part. Django is a very capable framework with

Re: Need tutorials

2019-01-22 Thread PASCUAL Eric
Hi, Start by studying the iintroduction and the tutorial directly available on the Django official website. Th will learn you step by step the fundamental concepts and how to write a fully working application using a significant share of Django features. Once you'll have assimilated the basic

Re: Lot into existing Django site

2019-01-17 Thread PASCUAL Eric
Hi, Since you'll need to update the files on the server, you must have a write access to it. Usually, FTP is no more activated on servers, because not secure at all. This can be the reason why the access is denied. There should be an ssh access available, so that you can connect on the server

Re: channnels -- communication with redis

2019-01-15 Thread PASCUAL Eric
Hi, How is configured your Docker stack exactly ? You should have several containers in it, at least one for the Redis server, another one for the Django app. Do you use docker-compose to run the stack ? If yes, could you provide the YAML descriptor of the stack ? Best Eric ___

Re: To learn proper project based Django .

2019-01-15 Thread PASCUAL Eric
Hi, The Django official website includes an extensive reference documentation and a detailed tutorial. This is the preferred start point. Afterwards, you can grab complements from resources such as : * Django Girls site * Two Scoops of Django book These are those which came out of

Re: Where do you place your application code in production

2019-01-14 Thread PASCUAL Eric
Hi, It depends on the type of deployment you use. The options I use are : * for deployment on a "bare server", I create a standard user which id is used for running the application, and the application code is stored under the home dir of this user. This solves the security problem of r

Re: Logging debug & error messages to file

2019-01-12 Thread PASCUAL Eric
Hi, That way you don't have to deal with rotating log files (not sure if djangos file logger handles that though) and permission problems. There is no "Django logger". Django uses the Python native logging module. This module defines several handler types, including the RotatingFileHandler one

Re: django use models from outside script

2019-01-05 Thread PASCUAL Eric
The simplest way to do this is implementing a custom admin command, which will be invoked then with : ./manage.py my_awesome_command It will take care for you of setting the Django environment (i.e. updating the Python path so that the apps are included in it, applying settings and making your

Re: quête de directives

2019-01-05 Thread PASCUAL Eric
Bonjour, pip install django et un petit tour dans la documentation de Django ne ferait pas de mal, car ce point est couvert ici : https://docs.djangoproject.com/en/2.1/intro/install/ Eric From: django-users@googlegroups.com on behalf of Moise Sacko Sent

Re: Best way to submit application cmd, then download a resulting file?

2019-01-03 Thread PASCUAL Eric
Hi Chris, The problem you describe does not require Django at all to be solved. WRT process parameter input, what you need here is a simple Web based UI with a basic form. Of course Django can do it, but if you don't need features such as the ORM, admin... you can implement it with a couple o

Re: Is Django logging multi-process safe?

2018-12-22 Thread PASCUAL Eric
thanks for confirming. I've written my share of logrotate.d files, but I may push to do something else, like send them directly to Elasticsearch with a delay of some sort. On Fri, Dec 21, 2018 at 2:00 PM PASCUAL Eric mailto:eric.pasc...@cstb.fr>> wrote: Hi, If you are running on

Re: Is Django logging multi-process safe?

2018-12-21 Thread PASCUAL Eric
Hi, If you are running on a Linux system, you'd better using the standard stream logs and logrotate to manage file rotating. The later is the blessed tool for this kind of task, since it manages for free the compression of rotated files and removal of oldest ones if you want to. Regards E

Re: Django and OpenCV

2018-12-19 Thread PASCUAL Eric
Hi, What do you mean exactly by "opencv app" ? If you are referring to some kind of interactive app popping up windows to display results of processing, or using the associated event loop, there are great chances you cannot for obvious reasons (number one being that there is no graphical desk

Re: Django in Linux set image

2018-12-10 Thread PASCUAL Eric
Hi, Which server are you using ? Is is runserver ? When running in debug mode, it serves statics, but not when debug mode is turned off. If you Google with "django runserver static debug" you'll get this hit in the very first ones : https://stackoverflow.com/questions/5836674/why-does-debug-

Re: Direction Distance measure in python code

2018-12-09 Thread PASCUAL Eric
Hi, What are you looking for exactly ? Computing the distance on ground between two points, based on their geographical coordinates ? If yes, this is not related to Django, nor to Python in any way. Google with keywords such as "geographic coordinates distance computation" and you'll get ton

Re: I'm new in Django. please help me out

2018-11-13 Thread PASCUAL Eric
> hey, you need to pay for that. Seen quite frequently : some of the visitors of community groups such as this one confuse them with "do_my_job_for_free.com" or "do_my_homework.com" 😊 Eric From: django-users@googlegroups.com on behalf of amit pant Sent: Tue

Re: Toby McGuire

2018-11-12 Thread PASCUAL Eric
370 assembler So I'm not the last dinosaur still alive and having written 370 ASM stuff in his former life 😃 Sure Django and Python are a big step from there, and welcome aboard ;) Which kind of project do you plan to work on, and what are your questions ? Eric

Re: How do I store details securely with django?

2018-11-12 Thread PASCUAL Eric
ng to understand my vague question. Lance On 11/12/18 10:04 AM, PASCUAL Eric wrote: Hi Lance, but I need for people who are admins for a particular cloud to add their cloud details to the app and then store their credentials securely. I'm not sure to understand the need for adding cloud deta

Re: How do I store details securely with django?

2018-11-12 Thread PASCUAL Eric
redentials securely. Unfortunately this will need a dynamic storage mechanism which i don't know how to do yet Regards Lance On 11/12/18 12:03 AM, PASCUAL Eric wrote: Hi, It can depend on which deployment option you plan to use for the application. For instance, a Docker deployment orchestrate

Re: hi everyone

2018-11-12 Thread PASCUAL Eric
akurthy swamy mailto:veeraswam...@gmail.com> wrote: hi sir thank u for giving reply and the real time means what the present projects are going on company based on python and django,,, And i have a two years gap in my academic period based on that project i want to fill-up that gap so

Re: solve problem to load template

2018-11-12 Thread PASCUAL Eric
Hi, Is the directory where your template file resides included in the list of paths configured in the settings of your application ? Regards Eric From: django-users@googlegroups.com on behalf of Mohammad Shareef M Sent: Monday, November 12, 2018 6:48:14 A

Re: How do I store details securely with django?

2018-11-11 Thread PASCUAL Eric
Hi, It can depend on which deployment option you plan to use for the application. For instance, a Docker deployment orchestrated by Kubernetes gives the option of using secrets for sensitive information, which a hoster such as GCP manages conveniently. In this kind of deployment, configuratio

Re: hi everyone

2018-11-11 Thread PASCUAL Eric
Hi, What do you mean exactly by "real time" ? Can you describe the project you are thinking about ? "Real time" relates to a very specific class of software, which one of the characteristics is to react to external events in a (most often) short and, deterministic time. For sure, neither Pyt

Re: Create rest service

2018-11-05 Thread PASCUAL Eric
Hi, Have a look at the "migrate.py inspectdb" command documentation (https://docs.djangoproject.com/fr/2.1/ref/django-admin/#inspectdb). This command generates the models for tables in an existing DB. To avoid messing with the existing data, these models are declared as non managed, which me

Re: Using django on kubernetes

2018-11-02 Thread PASCUAL Eric
My opinion is that Minikube is the easiest way, since it is quite simple to set up and run. Behind the curtains it uses a VirtualBox machine BTW if I'm not mistaken (at least under Linux). You can of course set up a multi-node stack using several VMs (after all, this is exactly what hosters do

Re: Running a custom code after the server is up

2018-11-02 Thread PASCUAL Eric
Hi, IMHO the simplest way is to use cron. Since you are working with Docker, one option is to add a container to your stack, sharing the same image as your Django app so that it can run the management command implementing your periodic process. Configure this container so that the command it

Re: Using django on kubernetes

2018-10-30 Thread PASCUAL Eric
I'm not even sure those are the same as Docker containers even though Kubernetes can run Docker images. Kubernetes is an orchestrator for Docker containers, not a container engine. You can run the same images in K8S managed containers or on your local Docker engine, using docker-compose for in

Re: Using django on kubernetes

2018-10-30 Thread PASCUAL Eric
but I am a bit afraid that the memory usage for example might change over time? It will of course, but apart if you have some memory leak somewhere, it will tend to stabilize over time. Ah well - I will have to monitor this for an extended period of time and see what happens then :-) For su

Re: Using django on kubernetes

2018-10-30 Thread PASCUAL Eric
Hi, Django is not really the key factor here, and the amount of consumed resources depends mainly on what your business logic does on top of Django. IMHO the only way to properly estimate the limits is observing the metrics and trends of the related pods for a significant period and with an a

Re: Django to serve JSON: overkill?

2018-10-28 Thread PASCUAL Eric
Hi Charley, You should not regret this choice. Sometimes Django seems a bit overkill at the first glance. But most of the times, once the project has made some progress you'll quickly appreciate the fact it is like Python : batteries included. No need to hunt for external add-ons which will i

Re: Should I use Django-Rest-Framework for performance reasons, despite not needing an externally-consumable API?

2018-10-28 Thread PASCUAL Eric
Hi, Do you think there's any reason to use DRF despite not needing an externally-consumable API? None that I can think about. But I don't pretend to be an expert on the topic ;) IMHO it is just a matter of planing for the future. If you are certain that nothing else but your current app will

Re: Django to serve JSON: overkill?

2018-10-28 Thread PASCUAL Eric
Hi, If the JSON is related to a data model, and if this model is elaborated and subject to evolution in the furure, Django can help a lot. Add Django RESTFramework to the combo to take care of the REST stuff. If not, I'd suggest Falcon (https://falconframework.org/), which is a light and ver

Re: Should I use Django-Rest-Framework for performance reasons, despite not needing an externally-consumable API?

2018-10-26 Thread PASCUAL Eric
Hi, You mention that adding DRF can actually make you lose some potential benefits from caching? Django does a lot of job WRT caching data at the ORM level and there is a "direct path" from the UI and the ORM. I've the feeling that putting a REST API in the middle have chances to defeat some

Re: Should I use Django-Rest-Framework for performance reasons, despite not needing an externally-consumable API?

2018-10-26 Thread PASCUAL Eric
Hi, Using DRF can help when there is a need for decoupling the presentation layer from the logic one, for instance if the logic is planned to be used in other scenarios that the interactive Web app. One can argue that structuring the logic as a Python package can do it, but this will not wor

Re: How to store images that was select in a form

2018-10-11 Thread PASCUAL Eric
Hi, Did you study the documentation about the media and how to handle them ? It is quite explicit and if I remember well there are a couple of code examples. Eric From: django-users@googlegroups.com on behalf of kheinrichdja...@gmail.com Sent: Thursday, Oct

Re: What are packages or tool that are useful to make a Human resource management system

2018-10-09 Thread PASCUAL Eric
Well... it only depends on you and your skills, plus what you want your app to do exactly. How do you want people other than you answer such a question ? Eric From: django-users@googlegroups.com on behalf of Md.iftequar iqbal Sent: Tuesday, October 9, 2018

Re: What are packages or tool that are useful to make a Human resource management system

2018-10-08 Thread PASCUAL Eric
Hi, Just my $0.02, but human resources management is a quite broad topic, and the kind of project you're planning is not a toy (i.e. "Hello world" style) application :) In addition, since you are a Django newbie, I'm afraid that it could be out of reach with your actual skills. It would thus

Re: Can anyone share code for uploading csv or excel file to sqlite3 database.

2018-09-28 Thread PASCUAL Eric
Hi, Which error(s) did you get exactly ? It is not clear in you message whether your problem is at the CSV data processing level or at the Django one. In case this could help, using the standard csv module you can obtain a reader wich takes care of parsing and decoding thanks to the reader()

Re: store CSV content to database in django

2018-09-28 Thread PASCUAL Eric
Hi, Didn't you find material in the documentation I pointed you towards ? Which point do you miss exactly ? Best Eric From: django-users@googlegroups.com on behalf of BBG Sent: Thursday, September 27, 2018 8:40:12 PM To: Django users Subject: store CSV co

Re: Can anyone share code for uploading csv or excel file to sqlite3 database.

2018-09-27 Thread PASCUAL Eric
Hi, Have you studied the documentation of the CSV module included in Python standard library ? You'll find there all the needed information for reading and interpreting CSV files without having to implement the raw parsing, and have there rows in a form ready to use for inserting objects in

Re: error at re_path

2018-09-24 Thread PASCUAL Eric
Hi, Not 100% sure, but I think that the 'p' should be a "P" (capital). I've always used the capital version, since it's was is shown in the docs and examples, so I can't say if lowercase 'p' works too. Eric From: django-users@googlegroups.com on behalf of s

Re: Django restapi get post

2018-09-12 Thread PASCUAL Eric
Hi, It depends if the structure of the data you want to post is the same as the one your retrieve with a GET, and if it fits with the underlying model. In this case, the same serializer can be used for both operations. Pay attention however that things can be more complex if the involved model

Re: Trouble installing Django

2018-09-04 Thread PASCUAL Eric
Hi Phil, As suggested by other posters, creating a virtualenv is the safest way to work with Python, since it avoids tampering with the system level installation (f.i. several Linux distros use Python for a lot of their system tools in nowadays versions) and it lets you have customized environ

Re: text editor

2018-09-03 Thread PASCUAL Eric
As already requested earlier by other posters, please STOP this totally useless and sterile discussion. As Gerald Brown wrote, the best editor is the one you feel the most productive and comfortable with. Full stop. Everybody has his own background, habits and tastes, hence there is nothing su

Re: django production

2018-07-03 Thread PASCUAL Eric
Hi Kamal, Of course you can. It's just a matter of defining virtual hosts in Nginx configuration and route them to the different Gunicorns serving your apps, based on the host found in the requests URLs. Best regards Eric From: django-users@googlegroups.com

Re: prevent AppConfig.ready() from running twice

2018-06-23 Thread PASCUAL Eric
IMHO, some of (a lot of ?) the "classical" GOF patterns do not really apply to Python (or at least are not necessary, when not making things more confuse). They are often a consequence of constraints and limitations of statically compiled languages such as C++, Java and alike used at the time th

Re: Please give the steps to follow this:

2018-06-06 Thread PASCUAL Eric
Templates contain standard HTML code (or any other text based content) and template directives, delimited by '{% %}'. They can also contain placeholders, delimited by '{{ }}', which content is processed and replaced with the resulting value. The resulting values are basically the ones you pass

Re: Open Sqlite database file directly in django

2018-05-24 Thread PASCUAL Eric
Hi, The content of the context dict can be anything, including of course values read from the database thanks to the sqlite3 lib. What Django generic views working with templates do is transfering for you the object field values to context entries and also automating the creation of form field

Re: Open Sqlite database file directly in django

2018-05-22 Thread PASCUAL Eric
ectly in django It depends. If tables have always the same schema and only their data is different, you can use `manage.py inspectdb` [0] to create models and develop your views. [0] https://docs.djangoproject.com/en/2.0/ref/django-admin/#inspectdb On 22 May 2018 at 11:01, PASCUAL Eric wrote:

Re: Open Sqlite database file directly in django

2018-05-22 Thread PASCUAL Eric
Re, But you'll not be able to access the sqlite DB through Django models, since it will not have the proper schema. Eric From: PASCUAL Eric Sent: Tuesday, May 22, 2018 3:59:35 PM To: Django users Subject: Re: Open Sqlite database file directly in django

Re: Open Sqlite database file directly in django

2018-05-22 Thread PASCUAL Eric
Hi Jaiswal, You can use the Python sqlite3 standard lib for opening this database and manipulate it, and then display data using views written with Django. Eric From: django-users@googlegroups.com on behalf of Sourabh Jaiswal Sent: Tuesday, May 22, 2018 8:0

Re: Advice needed: One big model or many apps with highly interlinked data tables?

2018-04-17 Thread PASCUAL Eric
Hi Mikkel, When facing this type of situation, I tend to use one of these two options, depending on the number of model classes: * if the number of classes is reasonable, I use a single app, but implement the models in a model package, distributing the classes into modules inside this pa

Re: Decoupling Postgres database credentials in django for deployment.

2018-04-01 Thread PASCUAL Eric
How is github "security" going to help you keep your passwords safe IMHO, it does not. As you wrote, env vars configured on the target system (be it a bare server or a Dockerized environment in the cloud) seem to be safer on this point since not stored anywhere but on the target. Eric

Re: Decoupling Postgres database credentials in django for deployment.

2018-03-30 Thread PASCUAL Eric
You're perfectly right about the "500 Error + DEBUG" case. One solution is to set DEBUG to off by default, and turn it on by code in the setting module if detecting that the app is executing in a dev or Q&A environment. Depending on your context, this can be done with rules based on the host

Re: Decoupling Postgres database credentials in django for deployment.

2018-03-30 Thread PASCUAL Eric
encrypted) in https://www.crowdcast.io/e/deploying-django, from 38m10s to 46m30s. Regards, Antonis Antonis Christofides http://djangodeployment.com On 2018-03-30 13:06, PASCUAL Eric wrote: Hi, Environment variables are the best option for not embedding sensitive information in files whic

Re: Decoupling Postgres database credentials in django for deployment.

2018-03-30 Thread PASCUAL Eric
Hi, Environment variables are the best option for not embedding sensitive information in files which have chances to be stored in places such as external source repositories (GitHub et al.). If you are working with orchestrators such as Kubernetes, you can use the "secrets", which are specia

data manipulation code in custom migrations

2018-03-28 Thread PASCUAL Eric
Hello, I recently ran into a problem with a custom migration containing code manipulating the data. The simplified scenario is: * a given model has been defined with its set of fields. So far so good. * later on, a new field has been added, intended to contain a required read-only va

Re: Syntax Error when trying to migrate to Postgresql

2018-02-17 Thread PASCUAL Eric
Office oriented editors tend to take initiatives for making the text prettier (at least, according to their "standards" 😊). For programming tasks, you'd better use real programming editors. There are a lot of very good ones which are free, and even full IDEs. I'd strongly suggest PyCharm Commu

Re: AttributeError: 'module' object has no attribute 'lru_cache' with python 3.6.4 and Django 2.0.2

2018-02-14 Thread PASCUAL Eric
hon36/DLLs; From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of PASCUAL Eric Sent: Wednesday, February 14, 2018 8:52 AM To: Django users Subject: Re: AttributeError: 'module' object has no attribute 'lru_cache' with python 3.6.4 and Djan

Re: AttributeError: 'module' object has no attribute 'lru_cache' with python 3.6.4 and Django 2.0.2

2018-02-14 Thread PASCUAL Eric
Hi, Normally you shouldn't have to add site-packages in the PYTHONPATH since it is supposed to be already. If not, packages installed via "sudo pip install" would not be found. I've packaged a lot of applications in Docker containers, and never had to modify PYTHONPATH. Your problem is may

Re: importError: Count Not import Django inside Virtualenv

2018-02-14 Thread PASCUAL Eric
: PASCUAL Eric Cc: django-users@googlegroups.com Subject: Re: importError: Count Not import Django inside Virtualenv Hi Eric, Le 2018-02-14 à 03:44, PASCUAL Eric a écrit : Hi, Hard to say without knowing the exact context, but my gut feeling is that you've modified a system wide library

Re: importError: Count Not import Django inside Virtualenv

2018-02-14 Thread PASCUAL Eric
d first in virtualenv. Maybe when I updated my system? Btw, I have some projects which are not yet in github, can I just copy and paste them in a new folder with new virtualenv? On Wed, Feb 14, 2018 at 4:44 PM, PASCUAL Eric mailto:eric.pasc...@cstb.fr>> wrote: Hi, Hard to say without knowing t

Re: importError: Count Not import Django inside Virtualenv

2018-02-14 Thread PASCUAL Eric
ango there. It seems that even though virtualenv is activated, the packages I installed inside it are not recognized by the system. On Wed, Feb 14, 2018 at 5:38 AM, PASCUAL Eric mailto:eric.pasc...@cstb.fr>> wrote: Hi Jarvis, Can you provide the error messages trace ? It can greatly help

Re: importError: Count Not import Django inside Virtualenv

2018-02-13 Thread PASCUAL Eric
Hi Jarvis, Can you provide the error messages trace ? It can greatly help understanding what's happening. If you haven't already done this, try to restart from a fresh new virtualenv inside which you'll install Django and the additional packages you've added (if any). Then restore a copy of

Re: How to fetch data from sql server and display on django web pages

2018-02-13 Thread PASCUAL Eric
Hi, > You may want to check out sqlalchemy they provide a pretty good documentation > on what you are aftering For my understanding, why are you suggesting to use SQLAlchemy while Django provides an ORM out of the box ? SQLAlchemy is required for frameworks such as Flask, which do nothing w

Re: How to fetch data from sql server and display on django web pages

2018-02-11 Thread PASCUAL Eric
Hi Amit, There is no "Django Web page" as you write in your message, but Web pages of the application built on top of the Django framework. Hence how to display data depends on how the Web pages of *your* application are designed. Second point, one of the roles of Django is to isolate the app

Re: How to install and use Django

2018-02-10 Thread PASCUAL Eric
Hi, As a satisfied user, without any connection with JetBrain corp., and after having worked for several years before with Eclipse/PyDev, my feeling is that PyCharm is the best IDE of the moment for "non-toys" Python + framework projects. Beware that if you want to benefit from the Web or sc

Re: How to install and use Django

2018-02-10 Thread PASCUAL Eric
Hi, If virtualenv is to be avoided (which I do not recommend anyway, especially for a newbie, since it protects him from breaking his Python system installation), my advice would be to go with: $ python setup.py install --user This way only the user's private environment is modified, and if

Re: Django Templates and Conditional CSS classes

2017-11-11 Thread PASCUAL Eric
Hi, Since it is static (i.e. never modified), the CSS classes dictionary (statemap) could be extracted from the function and promoted as a module global variable, to avoid it being reconstructed each time the filter is invoked. This will not cut the processing time in half, but small streams

RE: do i always have to reload/return render a page to show the errors? if i press go back on browser, i see screens with the error message

2017-10-31 Thread PASCUAL Eric
Hello Sorry or I misunderstood your problem but what about using the required field attribute ? It will make such controls and messages be handled directly on the client side. Best regards. Eric PASCUAL Centre Scientifique et Technique du Bâtiment 290 route des Lucioles 06560 SOPHIA ANTIPOLIS