Re: IMPORT PROBLEM

2024-09-03 Thread Olatide Joseph
sva...@gmail.com> wrote: > >> >> can you send some screenshots showings how you are importing the view? >> Em segunda-feira, 2 de setembro de 2024 às 07:50:38 UTC+2, Heman Okumbo >> escreveu: >> >>> My project url cannot import views from the app fol

Re: IMPORT PROBLEM

2024-09-02 Thread Talha Malik
where > i am trying to import views from. > I get the below traceback error when i try the import. > > On Mon, Sep 2, 2024, 09:46 Augusto Domingos < > augustodomingosva...@gmail.com> wrote: > >> >> can you send some screenshots showings how you are importing the v

Re: IMPORT PROBLEM

2024-09-02 Thread Talha Malik
nda-feira, 2 de setembro de 2024 às 07:50:38 UTC+2, Heman Okumbo > escreveu: > >> My project url cannot import views from the app folder, what ks the >> problem? >> > -- > You received this message because you are subscribed to the Google Groups > "Django users"

Re: IMPORT PROBLEM

2024-09-02 Thread Prashanth Patelc
Use like this path('pen/',views.land,name='pen'), On Mon, Sep 2, 2024, 1:14 PM Heman Okumbo wrote: > Homeland is my project directory,there is another folder in the same > directory with the same name,my apps directory is named land and its where > i am trying to i

Re: IMPORT PROBLEM

2024-09-02 Thread Heman Okumbo
Thanks for the tip,what can be the problem if Django is not importing a function from the app directory ie from land import views,the function in views is pen, error traceback states there is no pen function in views. On Mon, Sep 2, 2024, 12:12 Augusto Domingos wrote: > Good... it's jus

Re: IMPORT PROBLEM

2024-09-02 Thread Augusto Domingos
Good... it's just a path issue. Instead of doing '*from . import views*', try this: '*from {app_name} import views*'. In your case, you have an app named *'land*', so it would look something like this: '*from land import views*'. You need to

Re: IMPORT PROBLEM

2024-09-01 Thread Augusto Domingos
can you send some screenshots showings how you are importing the view? Em segunda-feira, 2 de setembro de 2024 às 07:50:38 UTC+2, Heman Okumbo escreveu: > My project url cannot import views from the app folder, what ks the > problem? > -- You received this message because you are s

IMPORT PROBLEM

2024-09-01 Thread Heman Okumbo
My project url cannot import views from the app folder, what ks the problem? -- 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-user

Re: How to import UGETTEXT_LAZY ON DJANGO 4.0

2024-08-29 Thread joseph Nwani
ngallen2 >> >> >> >> *From:* django...@googlegroups.com *On >> Behalf Of *David Nugent >> *Sent:* 10 December 2021 07:50 >> *To:* django...@googlegroups.com >> *Subject:* Re: How to import UGETTEXT_LAZY ON DJANGO 4.0 >> >> >> >

Re: Form does not import current data from data base

2023-11-13 Thread Stefan Kusmierz
Dear community, I'd like to inform you how I overcame the problem: instead of using "List.objects.last().a" to access field "a" of the last instance of class List, I did it like so: m=List.objects.last().pk List.objects.get(pk=m).a Best regards, Stefan Kani Sbt schrieb am Donnerstag, 26. Oktober

Re: Form does not import current data from data base

2023-10-26 Thread Kani Sbt
in django how to do phonepay integration any know or any blog or video anything , could you tell me !!! , i need to do that payment integration in phonepay On Thu, 26 Oct 2023 at 14:30, Stefan Kusmierz wrote: > Hi Migui, thanks for your input. It didn't work. > > > Migui Galan schrieb am Donner

Re: Form does not import current data from data base

2023-10-26 Thread Stefan Kusmierz
Hi Migui, thanks for your input. It didn't work. Migui Galan schrieb am Donnerstag, 26. Oktober 2023 um 09:27:48 UTC+2: > Hi Stefan, sorry i thought the process you are working is in POST request. > Try to place your func() after formchoices3. > > On Wed, Oct 25, 2023 at 4:10 PM Stefan Kusmierz

Re: Form does not import current data from data base

2023-10-26 Thread Migui Galan
Hi Stefan, sorry i thought the process you are working is in POST request. Try to place your func() after formchoices3. On Wed, Oct 25, 2023 at 4:10 PM Stefan Kusmierz wrote: > Hi Migui, > I'm enchanted to receive such a quick answer. > 1. It's MyForm1_2_3_4() because it's the answer to the firs

Re: Form does not import current data from data base

2023-10-25 Thread Stefan Kusmierz
Hi Migui, I'm enchanted to receive such a quick answer. 1. It's MyForm1_2_3_4() because it's the answer to the first Get request while the page is opened 2. Why would I try to save the form to the data base? Best regards, Stefan Migui Galan schrieb am Mittwoch, 25. Oktober 2023 um 03:39:16 UTC+

Re: Import [python django module] could not be resolved from source Pylance (reportMissingModuleSource) -- even though Django is installed in my venv

2023-04-29 Thread Michael Starr
And yeah, django is installed in the venv. Michael On Saturday, April 29, 2023 at 10:40:01 AM UTC-7 Michael Starr wrote: > Thanks. I already have a venv, to answer the first post, and the second, > yes, it says 3.11.2. I think VSCode just has a bug. It doesn't bother me > and my app works in al

Re: Import [python django module] could not be resolved from source Pylance (reportMissingModuleSource) -- even though Django is installed in my venv

2023-04-29 Thread Michael Starr
Thanks. I already have a venv, to answer the first post, and the second, yes, it says 3.11.2. I think VSCode just has a bug. It doesn't bother me and my app works in all other respects. Thank you for the input. Michael On Friday, April 28, 2023 at 7:11:57 AM UTC-7 ALBERT ASHABA AHEEBWA wrote:

Re: Import [python django module] could not be resolved from source Pylance (reportMissingModuleSource) -- even though Django is installed in my venv

2023-04-28 Thread ALBERT ASHABA AHEEBWA
This is a wild suggestion, but as someone here mentioned, your vscode might be pointing to the wrong interpreter. Check at the bottom bar of your vscode with a .py file open. Next to {}python you should see what environment you are using. eg. 3.11.3 64-bit or 3.11.3('.venv':venv) The latter is w

Re: Import [python django module] could not be resolved from source Pylance (reportMissingModuleSource) -- even though Django is installed in my venv

2023-04-28 Thread Emalexogah Ogah
If you felt the problem was vs code, I have a suggestion. Try it out and if it works, get back to me. Open your comman prompt terminal and input Python -m venv venv (press enter) Venv/static/activate (press enter) Then install django again On Fri, Apr 28, 2023, 3:27 AM Michael Starr wrote: > Tha

Re: Import [python django module] could not be resolved from source Pylance (reportMissingModuleSource) -- even though Django is installed in my venv

2023-04-27 Thread Michael Starr
Thank you for the replies. I am overwhelmed right now but will check back on them later. I think you two are right that it's the IDE. It's VSCode (I don't know what version). I was just suspicious b/c there were some strange bugs in my django project. I won't worry about it. If it annoys me I'l

Re: Import [python django module] could not be resolved from source Pylance (reportMissingModuleSource) -- even though Django is installed in my venv

2023-04-27 Thread Khaleel Ahmed H. M. Shariff
Hi Michael May Peace, Blessings & Mercy of Almighty God be on you! do you know how to modify the sys.path to add the directory where the listed modules are installed? On Linux/UNIX Execute the find command to locate the directory where the modules are installed and include the same in the path

Re: Import [python django module] could not be resolved from source Pylance (reportMissingModuleSource) -- even though Django is installed in my venv

2023-04-27 Thread Reddy Tintaya
Should I suppose that it appears like error only in your editor, but the app runs with no problem? I guess the error is that your IDE is not pointing to the correct python interpreter > On 27 Apr 2023, at 16:05, Michael Starr wrote: > > I did pip install django on my venv, which is activated,

Import [python django module] could not be resolved from source Pylance (reportMissingModuleSource) -- even though Django is installed in my venv

2023-04-27 Thread Michael Starr
I did pip install django on my venv, which is activated, and it reported already installed. But the following modules are reporting the error in the subject line: django.db models django.utils.crypto django.urls django.contrib admin django.shortcuts django.views.generic I don't know what's wrong

Re: ImportError: cannot import name 'employees' from 'rest_framework'

2022-09-01 Thread Luqman Lawal
Okay On Thu, Sep 1, 2022, 4:21 PM Ashish Rawat wrote: > There is error in line number 3 you are importing the module from restapi > but you should take that from model > > On Thu, Sep 1, 2022, 7:30 PM Pooja Kumari wrote: > >> Can anyone explain this error? >> >> -- >> You received this message

Re: ImportError: cannot import name 'employees' from 'rest_framework'

2022-09-01 Thread M Adnan
>From webapp.models import employee On Thu, 1 Sep 2022, 7:02 pm Pooja Kumari, wrote: > Can anyone explain this error? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group an

Re: ImportError: cannot import name 'employees' from 'rest_framework'

2022-09-01 Thread Shams Ulhaq
>From . models import employees Then use in serializer On Thu, 1 Sep 2022, 19:02 Pooja Kumari, wrote: > Can anyone explain this error? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe fro

Re: ImportError: cannot import name 'employees' from 'rest_framework'

2022-09-01 Thread Pooja Kumari
Understood. Thank you very much On Thu, Sep 1, 2022, 7:45 PM MAHESH KUMAR wrote: > You can write your serializers in 3rd line > > From .models import employees > > Thanks, > Mahesh > > On Thu, Sep 1, 2022, 19:30 Pooja Kumari wrote: > >> Can anyone explain thi

Re: ImportError: cannot import name 'employees' from 'rest_framework'

2022-09-01 Thread subin
Thanks again for the info. On Thu, Sep 1, 2022 at 4:21 PM Ashish Rawat wrote: > There is error in line number 3 you are importing the module from restapi > but you should take that from model > > On Thu, Sep 1, 2022, 7:30 PM Pooja Kumari wrote: > >> Can anyone explain this error? >> >> -- >> Yo

Re: ImportError: cannot import name 'employees' from 'rest_framework'

2022-09-01 Thread Ashish Rawat
There is error in line number 3 you are importing the module from restapi but you should take that from model On Thu, Sep 1, 2022, 7:30 PM Pooja Kumari wrote: > Can anyone explain this error? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" grou

Re: ImportError: cannot import name 'employees' from 'rest_framework'

2022-09-01 Thread Akash Kundoo
>From where you're importing employees? Check that? On Thu, 1 Sep, 2022, 7:31 pm Pooja Kumari, wrote: > Can anyone explain this error? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving em

Re: ImportError: cannot import name 'employees' from 'rest_framework'

2022-09-01 Thread MAHESH KUMAR
You can write your serializers in 3rd line >From .models import employees Thanks, Mahesh On Thu, Sep 1, 2022, 19:30 Pooja Kumari wrote: > Can anyone explain this error? > > -- > You received this message because you are subscribed to the Google Groups > "Django users&q

authentication with simply importing django.contrib.auth import authinticate didnt worked

2022-03-11 Thread things matters
how can i make authintication of custom model user in view method apart from default user model -- 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+uns

Re: Error : Circula import

2022-03-04 Thread Kasper Laudrup
On 04/03/2022 07.58, Jet Ezra wrote: But the link tells you the details and how to solve the problem. Anyway, I think you forgot to share the said screenshots. I can't find them. Also, when you are asking please, don't try to direct us how we should solve this problem. Just detail your problem

Re: Error : Circula import

2022-03-03 Thread Jet Ezra
Simple. A circular import happens when you have fileA that has something say a class A, then another file B with also a class B Then class A imports class B from file B which is also importing class A from B. So the program keeps importing and never completes the cycle. Solution, If you have to u

Re: Error : Circula import

2022-03-03 Thread Kasper Laudrup
On 03/03/2022 20.38, Ruzindana Kent wrote: Hello everyone, I'm new to django and also new in the group, I wanted to know how to solve circula import errors. here is a screenshot of the error from the terminal. Any reply about that will be helpful, thank you Remember that Django

Error : Circula import

2022-03-03 Thread Ruzindana Kent
Hello everyone, I'm new to django and also new in the group, I wanted to know how to solve circula import errors. here is a screenshot of the error from the terminal. Any reply about that will be helpful, thank you -- You received this message because you are subscribed to the Google G

Re: How to import UGETTEXT_LAZY ON DJANGO 4.0

2021-12-10 Thread Jason
89%20960> | Emial: ngal...@gmail.com | > Skype: ngallen2 > > > > *From:* django...@googlegroups.com *On > Behalf Of *David Nugent > *Sent:* 10 December 2021 07:50 > *To:* django...@googlegroups.com > *Subject:* Re: How to import UGETTEXT_LAZY ON DJANGO 4.0 > &g

RE: How to import UGETTEXT_LAZY ON DJANGO 4.0

2021-12-09 Thread ngallen4
-users@googlegroups.com Subject: Re: How to import UGETTEXT_LAZY ON DJANGO 4.0 Simply change it to gettext_lazy. You don't need the deprecated functions, they were for python 2. Regards, David On Fri, Dec 10, 2021 at 3:43 PM mailto:ngall...@gmail.com> > wrote: It seems Django has remov

Re: How to import UGETTEXT_LAZY ON DJANGO 4.0

2021-12-09 Thread David Nugent
Simply change it to gettext_lazy. You don't need the deprecated functions, they were for python 2. Regards, David On Fri, Dec 10, 2021 at 3:43 PM wrote: > It seems Django has removed ‘ugettext_lazy`(from django.utils.translation > import ugettext_lazy as _) from Django version 4.

How to import UGETTEXT_LAZY ON DJANGO 4.0

2021-12-09 Thread ngallen4
It seems Django has removed 'ugettext_lazy`(from django.utils.translation import ugettext_lazy as _) from Django version 4.0.x How can I handle translation on Django version 4.0.x? -- You received this message because you are subscribed to the Google Groups "Django users&

Django Import Export, Filter ForeignKey objects connected to users

2021-11-17 Thread Gianmaria Di Fronzo
I'm building an import excel files system for every leads whit import export library. In the Website each user must be able to import his leads and make sure that they are viewed only by him. In all other cases I filtered the "organisation" field linked to a UserProfile mo

Join Two fields during Import

2021-11-15 Thread Yogesh Pawar
Hello Team, I am importing a CSV file from the admin panel, during import I Want to Create a Unique ID by combing other three to four fields and storing it into the id column how to combine columns during import of CSV or excel Thanks and Regards -- You received this message because you

Re: Import issue

2021-10-02 Thread Sophia Iroegbu
Thanks it works On Sat, Oct 2, 2021, 11:47 AM Vineet Kothari wrote: > Hi, > Did you check in python manage.py shell then try to import it and > check. > > Thanks & Regards, > Vineet Kothari > > On Sat, 2 Oct 2021, 10:12 am Malcolm MacKinnon, > wrote: >

Re: Import issue

2021-10-02 Thread Vineet Kothari
Hi, Did you check in python manage.py shell then try to import it and check. Thanks & Regards, Vineet Kothari On Sat, 2 Oct 2021, 10:12 am Malcolm MacKinnon, wrote: > Is your module included in your installed apps in the settings.py file? > > On Fri, Oct 1, 2021 at 8:09 PM S

Re: Import issue

2021-10-01 Thread Malcolm MacKinnon
Is your module included in your installed apps in the settings.py file? On Fri, Oct 1, 2021 at 8:09 PM Sophia Iroegbu wrote: > > I noticed that each time I download a python package and import it. > It imports, it works but once I run my code it runs into an error. > >

Import issue

2021-10-01 Thread Sophia Iroegbu
I noticed that each time I download a python package and import it. It imports, it works but once I run my code it runs into an error. Error message: ModuleNotFoundError. What do I do? -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Error on import psycopg2

2021-09-19 Thread Felix Orinda
/Users/maryam.yousaf/Documents/venv/lib/python3.8/site-packages/psycopg2/__init__.py", > line 51, in > from psycopg2._psycopg import ( # noqa > ImportError: > dlopen(/Users/maryam.yousaf/Documents/venv/lib/python3.8/site-packages/psycopg2/_ > psycopg.cpyt

Re: Error on import psycopg2

2021-09-17 Thread Aashish Kumar
getting below error. I tried everything on internet but it still there. > Kindly help me out. > > Error: > "File > "/Users/maryam.yousaf/Documents/venv/lib/python3.8/site-packages/psycopg2/__init__.py", > line 51, in > from psycopg2._psycopg import (

Re: Error on import psycopg2

2021-09-17 Thread 'Maryam Yousaf' via Django users
Thank you all. It was resolved by making new virtual environment and installing it again On Fri, Sep 17, 2021, 6:47 PM Vinay Bagare wrote: > Try > > >> psycopg2-binary > > Best, > Vinay Bagare > > Sent from my iPhone > > > On Sep 15, 2021, at 12:15 PM, Kasper Laudrup > wrote: > > > > On 15/09/

Re: Error on import psycopg2

2021-09-17 Thread Vinay Bagare
Try >> psycopg2-binary Best, Vinay Bagare Sent from my iPhone > On Sep 15, 2021, at 12:15 PM, Kasper Laudrup wrote: > > On 15/09/2021 16.40, 'Maryam Yousaf' via Django users wrote: >> Hello, >> I need psycopg2 for postgres database in django. While installing it, I am >> getting below erro

Re: Error on import psycopg2

2021-09-15 Thread FIRDOUS BHAT
Try installing this package, pip install psycopg2-binary On Wed, Sep 15, 2021 at 10:45 PM Kasper Laudrup wrote: > On 15/09/2021 16.40, 'Maryam Yousaf' via Django users wrote: > > Hello, > > > > I need psycopg2 for postgres database in django. While installing it, I > > am getting below error. I

Re: Error on import psycopg2

2021-09-15 Thread Kasper Laudrup
On 15/09/2021 16.40, 'Maryam Yousaf' via Django users wrote: Hello, I need psycopg2 for postgres database in django. While installing it, I am getting below error. I tried everything on internet but it still there. Kindly help me out. Did you try this: https://stackoverflow.com/questions/

Error on import psycopg2

2021-09-15 Thread 'Maryam Yousaf' via Django users
, line 51, in from psycopg2._psycopg import ( # noqa ImportError: dlopen(/Users/maryam.yousaf/Documents/venv/lib/python3.8/site-packages/psycopg2/_psycopg.cpython-38-darwin.so, 2): Symbol not found: _PQbackendPID Referenced from: /Users/maryam.yousaf/Documents/venv/lib

Re: os module import error

2021-05-31 Thread Avi shah
you could just add "import os" in settings.py file On Mon, May 31, 2021 at 8:32 PM James Ndubuisi wrote: > Good afternoon. > It seems on creating the Django project using django-admin startproject > command , the os module isn't imported by default, causing an error. &g

Re: os module import error

2021-05-31 Thread Antonis Christofides
Hi! Could you show exactly which command(s) you are running, and the exact error message? Regards, Antonis Christofides +30-6979924665 (mobile) On 31/05/2021 17.57, James Ndubuisi wrote: Good afternoon. It seems on creating the Django project using django-admin startproject command , the o

os module import error

2021-05-31 Thread James Ndubuisi
Good afternoon. It seems on creating the Django project using django-admin startproject command , the os module isn't imported by default, causing an error. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Django Import and Export

2021-02-10 Thread www.forum-gh.com
Hi, I am using the django_import_export package but i am not been able to import files, the tables are related. Please find the attached files(models, resources and admin) for your reference. Please help me -- You received this message because you are subscribed to the Google Groups "D

Re: Import Export

2021-01-14 Thread ÖNDER YILMAZ
https://youtu.be/oZQjO0iNOwI 14 Oca 2021 Per 09:14 tarihinde www.forum-gh.com şunu yazdı: > hello, please i have 4 models linked together by foreignkey how do i > perform import using the django import_export package. > > Thanks > > -- > You received this message because

Import Export

2021-01-13 Thread www.forum-gh.com
hello, please i have 4 models linked together by foreignkey how do i perform import using the django import_export package. Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emai

Re: import *

2021-01-10 Thread David Nugent
On 11 January 2021 at 13:14:59, Peter of the Norse (rahmc...@gmail.com<mailto:rahmc...@gmail.com>) wrote: I use multiple settings.py files to do this. Specifically, in my main one, I have what I consider the only acceptable instance of import *. Slightly off-topic (subject changed to r

Re: Conversion and import of a pre-existing database

2021-01-07 Thread gabriela...@gmail.com
eed to change. > > The data is stored into a MS SQL Server database. The new website will use > PostgreSQL, so I need to convert the MSQSQL database and import it into > PostgreSQL. I'm aware of inspectdb but I decided to manually write > models.py from the ground to get acq

Re: Conversion and import of a pre-existing database

2021-01-07 Thread 'Peter van der Does' via Django users
e. The new website will > use PostgreSQL, so I need to convert the MSQSQL database and import it > into PostgreSQL. I'm aware of inspectdb but I decided to manually > write models.py from the ground to get acquainted both with the data > and with django models. > > What I&

Conversion and import of a pre-existing database

2021-01-07 Thread Jérémy Garniaux
a is stored into a MS SQL Server database. The new website will use PostgreSQL, so I need to convert the MSQSQL database and import it into PostgreSQL. I'm aware of inspectdb but I decided to manually write models.py from the ground to get acquainted both with the data and with django mode

ValueError: attempted relative import beyond top-level package

2020-10-17 Thread Abdu-H
Hello, i am getting a value error (from ..accounts.models import User. ValueError: attempted relative import beyond top-level package) while trying to import my custom user model, i have read through some post suggesting i create a root folder for my project, I would like to know if that

Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-16 Thread Salima Begum
: No vk_ls_product_search matches the given query. c:\users\user\appdata\local\programs\python\python38\lib\site-packages\django\shortcuts.py:78: Http404 Please can you help me to solve this error too , Thank you On Fri, Oct 16, 2020 at 4:11 PM Shahprogrammer wrote: > You have created a class n

Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-16 Thread Shahprogrammer
You have created a class named onClickSearch with method ProductDetails . So you can't import a method of a class. To use the method you need to import class. So in place of importing from pages.views import ProductDetails in test_views.py do from pages.views import onClickSearch &

Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-16 Thread Salima Begum
Inside pages folder I already have views.py Thanks ~salima On Fri, Oct 16, 2020 at 1:28 PM Akinfolarin Stephen < akinfolarinsteph...@gmail.com> wrote: > The problem is you are trying to import views from where you have not > created it I guess the page is a folder then create

Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-16 Thread Akinfolarin Stephen
The problem is you are trying to import views from where you have not created it I guess the page is a folder then create the views.py inside of it On Fri, Oct 16, 2020, 08:10 Salima Begum wrote: > urls.py > > path('ProductDetails/', views.onClickSearch.ProductDetails, >

Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-16 Thread Salima Begum
On Fri, Oct 16, 2020 at 12:09 PM Salima Begum < >> salim...@rohteksolutions.com> wrote: >> >>> Hi @Akinfolarin Stephen, >>> >>> >>> >>> On Fri, Oct 16, 2020 at 11:10 AM Akinfolarin Stephen < >>> akinfolarinsteph...@gmail

Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-16 Thread Shahprogrammer
t;> On Fri, Oct 16, 2020, 06:27 Salima Begum >>> wrote: >>> >>>> Hi all, >>>> >>>> I have written test case for views for details page. Here is below code >>>> I have written >>>> >>>> ``` >>>&

Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-16 Thread Dhwanil Shah
gt;>> On Fri, Oct 16, 2020, 06:27 Salima Begum >>> wrote: >>> >>>> Hi all, >>>> >>>> I have written test case for views for details page. Here is below code >>>> I have written >>>> >>>> ``` >>&g

Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-15 Thread Salima Begum
, 06:27 Salima Begum >> wrote: >> >>> Hi all, >>> >>> I have written test case for views for details page. Here is below code >>> I have written >>> >>> ``` >>> from django.test import RequestFactory >>>

Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-15 Thread Salima Begum
; >> On Fri, Oct 16, 2020, 06:27 Salima Begum >> wrote: >> >>> Hi all, >>> >>> I have written test case for views for details page. Here is below code >>> I have written >>> >>> ``` >>> from django.test import Request

Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-15 Thread Salima Begum
;> >> I have written test case for views for details page. Here is below code I >> have written >> >> ``` >> from django.test import RequestFactory >> from django.urls import reverse >> from django.contrib.auth.models import User >> from pages.mod

Re: ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-15 Thread Akinfolarin Stephen
First I will like you to tell me the folder where test.py is and views.py On Fri, Oct 16, 2020, 06:27 Salima Begum wrote: > Hi all, > > I have written test case for views for details page. Here is below code I > have written > > ``` > from django.test import RequestFacto

ImportError: cannot import name 'ProductDetails' from 'pages.views'

2020-10-15 Thread Salima Begum
Hi all, I have written test case for views for details page. Here is below code I have written ``` from django.test import RequestFactory from django.urls import reverse from django.contrib.auth.models import User from pages.models import vk_customer from mixer.backend.django import mixer import

Re: I got this error "ValueError: attempted relative import beyond top-level package "

2020-09-12 Thread dum dum
t;>'django.contrib.sitemaps', >> ] >> >> run migration i.e. >> >>> py manage.py migrateOR python manage.py migrate >> after this step, sites application will be in sync with the database. >> >> create a f

Re: I got this error "ValueError: attempted relative import beyond top-level package "

2020-09-08 Thread hans alexander
i.e. > >>> py manage.py migrateOR python manage.py migrate > after this step, sites application will be in sync with the database. > > create a file sitemaps.py in your blog application. Your sitemap.py seems > okay to me. > > update your main project url

Re: I got this error "ValueError: attempted relative import beyond top-level package "

2020-09-08 Thread coolguy
python manage.py migrate after this step, sites application will be in sync with the database. create a file sitemaps.py in your blog application. Your sitemap.py seems okay to me. update your main project urls.py file from django.contrib.sitemaps.views import sitemap from blog.sit

Re: I got this error "ValueError: attempted relative import beyond top-level package "

2020-09-08 Thread hans alexander
te: > Not sure why you are importing this into your main project urls.py but its > very straight forward > > from blog.sitemaps import BlogPostsSitemap > > question... are you trying to map the application url here? then you > should use path('/' , Include("

Re: I got this error "ValueError: attempted relative import beyond top-level package "

2020-09-08 Thread coolguy
Not sure why you are importing this into your main project urls.py but its very straight forward from blog.sitemaps import BlogPostsSitemap question... are you trying to map the application url here? then you should use path('/' , Include("blog.urls")) On Tuesday,

Re: I got this error "ValueError: attempted relative import beyond top-level package "

2020-09-08 Thread hans alexander
Sorry, point no 1 needs to be revised.. 1. In urls.py, I want to import BlogPostsSitemap -- 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-user

I got this error "ValueError: attempted relative import beyond top-level package "

2020-09-08 Thread hans alexander
my structure is like this: my_project blog sitemaps.py my_project urls.py Inside sitemaps.py : from django.contrib.sitemaps import Sitemap from .models import * class

Re: Import csv file on django view

2020-07-25 Thread Ronaldo Mata
Hi Naresh Jonnala. Yes, it's work to detect delimiter on csv file, But still I don't know how to detect what is the current encoding of csv file 🤔 I need to know how to implement a good uploading csv file view on django -- You received this message because you are subscribed to the Google Gro

Re: Import csv file on django view

2020-07-25 Thread Naresh Jonnala
t;>>> iterating by rows, and i thought it could be encoding (for this >>>>>>>>>> reason i >>>>>>>>>> wanted to prepare the view to use the correct encoding). for that >>>>>>>>>> reason I >

Re: Import csv file on django view

2020-07-24 Thread Liu Zheng
scii as encoding. it seems request.FILES ['file']. read () >>>>>>>>> returns >>>>>>>>> a binary with that encoding. >>>>>>>>> >>>>>>>>> 2) In the end I realized that the pr

Re: Import csv file on django view

2020-07-24 Thread Ronaldo Mata
blem. >>>>>>>> >>>>>>>> Anyway, it was a task that I had to do and that was my >>>>>>>> limitation. I think there must be a library that does all this, >>>>>>>> uploading a >>>&

Re: Import csv file on django view

2020-07-24 Thread Jani Tiainen
e must be a library that does all this, uploading a csv file >>>>>>> is >>>>>>> common practice in many web apps. >>>>>>> >>>>>>> El mar., 21 jul. 2020 a las 13:47, Liu Zheng (< >>>>>>>

Re: Import csv file on django view

2020-07-24 Thread Ronaldo Mata
her information. See the answer in this SO post: >>>>>>> https://stackoverflow.com/questions/436220/how-to-determine-the-encoding-of-text >>>>>>> There >>>>>>> are many packages and tools to help detect encoding format, but keep

Re: Import csv file on django view

2020-07-22 Thread Liu Zheng
gt;>>>> mind that they are only giving educated guesses. (Most of the time, the >>>>>> guess is correct, but do check the dev page to see whether there are >>>>>> known >>>>>> issues related to your problem.) >>>>>>

Re: Import csv file on django view

2020-07-22 Thread Ronaldo Mata
of the time, the >>>>> guess is correct, but do check the dev page to see whether there are known >>>>> issues related to your problem.) >>>>> >>>>> Now let's say you have decided to use chardet. Check its doc page for >>>

Re: How to trace circular import error Django never solved!! Please sort this out.

2020-07-22 Thread Chaitanya Sai
o you use > ‘reverse’ function anywhere in covid app? If so, here’s a circular import: > > urls.py imports covid urls -> covid urls import covid views -> one covid > view uses reverse -> reverse import urls.py of the project (to look up the > url with the end point name). > >

Re: How to trace circular import error Django never solved!! Please sort this out.

2020-07-22 Thread Liu Zheng
Hi, Probably not enough to look at urls.py files only. My guess: Do you use ‘reverse’ function anywhere in covid app? If so, here’s a circular import: urls.py imports covid urls -> covid urls import covid views -> one covid view uses reverse -> reverse import urls.py of the project (t

Re: Import csv file on django view

2020-07-22 Thread Liu Zheng
/usage.html#usage >>>>> You'll >>>>> have more than one solutions. Here are some examples: >>>>> >>>>> 1. If the files uploaded to your server are all expected to be small >>>>> csv files (less than a few MB and not many

Re: Import csv file on django view

2020-07-22 Thread Liu Zheng
e for >>>> the usage: https://chardet.readthedocs.io/en/latest/usage.html#usage You'll >>>> have more than one solutions. Here are some examples: >>>> >>>> 1. If the files uploaded to your server are all expected to be small >>>> csv files (le

Re: Import csv file on django view

2020-07-22 Thread Kovy Jacob
ne solutions. Here are some examples: >>>> >>>> 1. If the files uploaded to your server are all expected to be small csv >>>> files (less than a few MB and not many users do it concurrently), you can >>>> do the following: >>>> >>>&

Re: Import csv file on django view

2020-07-22 Thread Kovy Jacob
e than one solutions. Here are some examples: >>>> >>>> 1. If the files uploaded to your server are all expected to be small csv >>>> files (less than a few MB and not many users do it concurrently), you can >>>> do the following: >>>

Re: Import csv file on django view

2020-07-22 Thread Kovy Jacob
e examples: >>> >>> 1. If the files uploaded to your server are all expected to be small csv >>> files (less than a few MB and not many users do it concurrently), you can >>> do the following: >>> >>> #in the view to handle the uploaded file: (assu

Re: Import csv file on django view

2020-07-22 Thread Kovy Jacob
rently), you can do >> the following: >> >> #in the view to handle the uploaded file: (assume file input name is just >> "file") >> file_content = request.FILES['file'].read() >> chardet.detect(file_content) >> >> 2. Als

Re: Import csv file on django view

2020-07-22 Thread Ronaldo Mata
ver are all expected to be small csv >>> files (less than a few MB and not many users do it concurrently), you can >>> do the following: >>> >>> #in the view to handle the uploaded file: (assume file input name is >>> just "file") >>> file_co

Re: Import csv file on django view

2020-07-22 Thread Kovy Jacob
it concurrently), you can do >> the following: >> >> #in the view to handle the uploaded file: (assume file input name is just >> "file") >> file_content = request.FILES['file'].read() >> chardet.detect(file_content) >>

  1   2   3   4   5   6   7   8   9   10   >