Re: Fellow Reports -- April 2021

2021-04-29 Thread Carlton Gibson
Hi all. Calendar Week 16 -- ending 25 April. Triaged: https://code.djangoproject.com/ticket/32671 -- CSS var() causes relative URLs to break in Safari (wontfix) https://code.djangoproject.com/ticket/32668 -- Separate test-collection setup from runtests.py's setup() for use in get_app_test_l

Loading CSV Data in Model

2021-04-29 Thread 'Muhammad Asim Khaskheli' via Django developers (Contributions to Django itself)
Hi, I wanted to ask how to load csv data into the model. What steps do we have to follow . I have made this function but how exactly to run this code because, python manage.py loaddata wont work. def import_data(): with open('sample-dataset.csv') as f: reader = csv.reader(f) for row in reader

APPEND_SLASH behavior

2021-04-29 Thread Tidiane Dia
Hello, I posted this on #django-users but I think here is the right place to post it. To give more context, this is the related issue on Wagtail which lead me here. In gener

Re: Loading CSV Data in Model

2021-04-29 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi! I think you've found the wrong mailing list for this post. This mailing list is for discussing the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django itself, rather than in your code using it. People on this list are unlikely t

Re: Loading CSV Data in Model

2021-04-29 Thread Franck Tchouanga
To load a csv file in python you use * pd.read_csv('your file', index_col=0) . * *So you need to use the library pandas.* *Hope it helps.* On Thu, Apr 29, 2021 at 3:23 PM 'Muhammad Asim Khaskheli' via Django developers (Contributions to Django itself) < django-developers@googlegroups.com> wrote:

Re: Loading CSV Data in Model

2021-04-29 Thread Franck Tchouanga
*import pandas as pd* *data = pd.read_csv('your file', index_col=0)* On Thu, Apr 29, 2021 at 3:51 PM Franck Tchouanga wrote: > To load a csv file in python you use * pd.read_csv('your file', > index_col=0) . * > > *So you need to use the library pandas.* > > *Hope it helps.* > > On Thu, Apr 29,

Re: APPEND_SLASH behavior

2021-04-29 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I don't think Django should change here. The current APPEND_SLASH behaviour is conservative and expected. Django can't tell the difference between a catch-all view that "shouldn't really catch the URL", and any other view. Notably your suggestion would undo the work in django 3.2 to add a catch-al

Re: APPEND_SLASH behavior

2021-04-29 Thread Tidiane Dia
Yes I suggested doing that work at the middleware level, but it's not the preferred solution due to maintanability concerns. However, you haven't mentionned the unneccesary check (I think) being done in the CommonMiddleware's process_response method ? Le jeudi 29 avril 2021 à 21:54:02 UTC+2,

Re: APPEND_SLASH behavior

2021-04-29 Thread Tidiane Dia
It seems that my first link doesn't work. I was saying that I ran the coverage of the project and found that this line(here ) is never hit because the two conditions can never