Re: Please help. ImportError with django 3.1

2021-01-05 Thread Steven Mapes
Do you have a function in the hello/views.py? That's the first place to 
start as the error suggests you do not.
 

On Monday, 4 January 2021 at 14:39:32 UTC joshr...@gmail.com wrote:

> hello is ur app name if so
> from hello import views 
> try this 
> if not be clear what is hello,index
>
> On Mon, Jan 4, 2021 at 4:24 PM Gasar Iyali  wrote:
>
>> Hi
>> Please I need your help.
>> I have just installed django and when I try to run django I get this 
>> error message and nothing comes up in my browser.
>> This is the error message that I get in the command prompt
>>
>> !*<<<(env) C:\Users\Documents\Learn 
>> Python\django\my_django_work\my_django_work\urls.py", line 19, in 
>> from hello.views import index
>> ImportError: cannot import name 'index' from 'hello.views'>>>!!
>>
>> Thank you
>>
>> -- 
>>
> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/cec9f80a-7d69-4702-8b4c-37817fc6caean%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/60b7ffc6-88d0-4057-b61c-6885ebdefb23n%40googlegroups.com.


How to generate points kilometers from a road

2021-01-05 Thread Juan Carlos F.
Hi everybody

I am new and I need to know if the library or how I could generate the 
kilometer points starting from a polyline. 

Thanks for the info  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e8a7444f-5136-4977-986e-e0114fcaab32n%40googlegroups.com.


How can I segment a roads?

2021-01-05 Thread Juan Carlos F.
Hi everyone, 

I'm a new in django and python and i have a problem .I would like to know 
how I can segment a road by kilometer points . 

Any help is welcome. Thank you  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3e6aa653-58d4-4cbd-853b-7ef5e1227221n%40googlegroups.com.


Re: How to generate points kilometers from a road

2021-01-05 Thread Juan Carlos F.

Exactly, what I need is to calculate the point on the road from the 
kilometer point PK 50 + 350 meters on the road, but not in a straight line 
but following the road  

El martes, 5 de enero de 2021 a las 14:12:56 UTC, Juan Carlos F. escribió:

> Hi everybody
>
> I am new and I need to know if the library or how I could generate the 
> kilometer points starting from a polyline. 
>
> Thanks for the info  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4098522f-cc63-4f4d-9cd1-613c4166eaedn%40googlegroups.com.


Re: How to generate points kilometers from a road

2021-01-05 Thread Juan Carlos F.

Exactly, what I need is to calculate the point on the road from the 
kilometer point PK 50 + 350 meters on the road, but not in a straight line 
but following the road  

El martes, 5 de enero de 2021 a las 14:12:56 UTC, Juan Carlos F. escribió:

> Hi everybody
>
> I am new and I need to know if the library or how I could generate the 
> kilometer points starting from a polyline. 
>
> Thanks for the info  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7716ea17-be8b-40e6-bb6f-9e49a5b4a21en%40googlegroups.com.


Django Channels - Monitoring and Testing Performance in Prod

2021-01-05 Thread Myer Nore
I work on an app that has Django Channels 1 deployed in production with 
CPU-based auto-scaling. Most of the time, it works fine, but sometimes, 
when the site is busy and many users are utilizing the parts of our 
application that are channels-intensive, users are unable to utilize their 
websocket, and we need better metrics to help us determine the root cause 
fix.   

   1. How do you monitor Django Channels in production? 
   2. What are your favorite strategies for integrating with DataDog or New 
   Relic? 
   3. I'm considering writing some JS that detects a degraded websocket 
   connection and posts a DataDog custom event 
   (https://docs.datadoghq.com/api/v1/events/). What's a better way to 
   accomplish the same thing?

Many thanks,
Myer

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/30ea0e94-bf98-43f4-a514-848db9e4d688n%40googlegroups.com.


Auto refreshing frontend

2021-01-05 Thread degnon...@gmail.com
Hello, 

I am building a very simple website in which the main page allows users to 
import their contacts via csv or excel files to a postgres database.

I have a page that displays whether or not the import of contacts is 
finished, I need my frontend to update automatically as soon as the task is 
finished in the background, basically when the data is fully imported into 
the database.
I'm thinking of looking for a way to refresh the page every 5 second or 
something like that, but I don't think this is a good idea.
I am not quite sure how to approach this. I still have some learning to do, 
but I need some guidance on what approach to take. I am thinking I will 
need to use JQuery/Ajax? So write my HTML template and then link it to a 
Javascript script that does the refresh?

I think I can figure out how to refresh the page, but how do I have the 
model queried, view called, and new data fed to the HTML template each time 
the page auto-refreshes?

I am also not sure if web sockets are what I need. If ajax is not the 
answer here, an example of scenario where ajax is useful would be really 
helpful, I always hear about it but I don't know when it can be useful.

Any help or link to resources is immensely appreciated!!

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5560f982-adc8-4498-9dbf-ddd7677d6a51n%40googlegroups.com.


Re: Auto refreshing frontend

2021-01-05 Thread wongX Ndeso
you can use django async for realtime data

On Wed, Jan 6, 2021 at 3:39 AM degnon...@gmail.com 
wrote:

> Hello,
>
> I am building a very simple website in which the main page allows users to
> import their contacts via csv or excel files to a postgres database.
>
> I have a page that displays whether or not the import of contacts is
> finished, I need my frontend to update automatically as soon as the task is
> finished in the background, basically when the data is fully imported into
> the database.
> I'm thinking of looking for a way to refresh the page every 5 second or
> something like that, but I don't think this is a good idea.
> I am not quite sure how to approach this. I still have some learning to
> do, but I need some guidance on what approach to take. I am thinking I will
> need to use JQuery/Ajax? So write my HTML template and then link it to a
> Javascript script that does the refresh?
>
> I think I can figure out how to refresh the page, but how do I have the
> model queried, view called, and new data fed to the HTML template each time
> the page auto-refreshes?
>
> I am also not sure if web sockets are what I need. If ajax is not the
> answer here, an example of scenario where ajax is useful would be really
> helpful, I always hear about it but I don't know when it can be useful.
>
> Any help or link to resources is immensely appreciated!!
>
> Thank you.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5560f982-adc8-4498-9dbf-ddd7677d6a51n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJepfJUNiRdww2b1Q0BCE7zmK3Gg4Nk%2BSQv9vpvjS8vc6%2BLBgw%40mail.gmail.com.