Re: __init__ method called every time on same APIView object

2019-10-30 Thread Juan Pablo Romero Bernal
Hi,
Show some example of code 

On Wed, Oct 30, 2019 at 5:08 PM Diana María Bedoya Ramírez <
dbed...@ikono.com.co> wrote:

> Hello,
>
> I have an APIView object with an __init__method. In that __init__ I have a
> loop that extends a class list variable. Every time I make a POST to the
> url that calls the APIView, the items in the loop items are added to the
> old ones in the list, duplicating the item number every time.
>
> Why is the __init__ method called on the same object with every request?
> How can assure a new object with every requesdt I make?
>
>
> --
> 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/452af061-bf26-4a2a-9437-eea482f951e1%40googlegroups.com
> 
> .
>


-- 
Juan

-- 
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/CAJK1Jg2%2BzY%3DiEqWbYJuAZkXkoCsr%3Dj_jbY5J9TAA-ird4yH5UA%40mail.gmail.com.


Re: Making a scheduling app/programm for recurring treatment

2019-10-30 Thread Nithin Bhaskar
Hey,
Thanks.
What would be the right time to call you?

On Wed, 30 Oct 2019 at 22:36, Motaz Hejaze  wrote:

> I can cooperate with you ..
> Talk to me on skype : m3tz-hjze
>
> On Wed, 30 Oct 2019, 6:43 pm Uzama Zaid Mohammed Jaward, <
> uzamajaw...@gmail.com> wrote:
>
>> I think you don’t get any answer for these like questions in here. This
>> is a forum to discuss about Django and Support. First you have to design
>> the system. Then onwards you can use Django. You might get answer for this
>> if you will post this in stack overflow
>>
>> On Wed, Oct 30, 2019 at 19:34, Nithin Bhaskar 
>> wrote:
>>
>>> Well to be frank, I am stuck right at the beginning itself.
>>>
>>> I am working in a public sector with limiter resources and a huge
>>> patient load and almost no funding. I was thinking of making patient
>>> scheduling a bit manageable and easy in my hospital.
>>>
>>> I have not yet figured out how to go about with it. I know its too
>>> naive, but i could really use some help starting from the core basics. I
>>> have just made an app called scheduler1.
>>> 1. How do i progam treatments in the  7 scheduling rooms and block them
>>> for the next 7 weeks.
>>> 2. Certain procedures are done only in room 1 and 2. So in option 4
>>> (modality of treatment), if i have chosen them, the patients have to be
>>> scheduled in these rooms.
>>>
>>> But before this, I need to start with the basic layout of the app.
>>>
>>> I understand that you may find it similar to teaching a kindergarten
>>> kid, but I would be really grateful if you could help me put
>>>
>>> Thanking you
>>>
>>> Regards..
>>>
>>>
>>>
>>> On Wed, 30 Oct 2019 at 18:59, Kasper Laudrup 
>>> wrote:
>>>
 Hi Nithin,

 On 30/10/2019 08.19, Nithin Bhaskar wrote:
 >
 > I am completely new to django and python and don't have a background
 in
 > programming
 > I have taught myself a bit of python and django and use PyCharm
 >
 > Kindly help me out
 >

 What exactly do you need help with? What have you done so far? Where
 are
 you stuck?

 You need to be more specific.

 Kind regards,

 Kasper Laudrup

 --
 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/e4a53cf5-2dd4-49cb-a6a2-b59cdaf93ce3%40stacktrace.dk
 .

>>> --
>>> 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/CAKJvVH0v-Ar%2BOct%2BNX2oCX89vbOX4RBWXqYTEbZMXumschS9_g%40mail.gmail.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/CAOHA2_3nsSstXkQBp6oWRu7PiYNCfTO0FYCh5T36%3DhFFUBTdeg%40mail.gmail.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/CAHV4E-eT3%3DX019DVOpDWUqi-YYFJsJTHBy_NPewMOOU7L%3DhH_w%40mail.gmail.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/CAKJvVH0Y8hpOAz9D5Mac%3Dmug6Qqd8FDkjrvcGt_mvNH1FuMEQQ%40mail.gmail.com.


Re: Alternatives to django ajax select

2019-10-30 Thread carlos
https://github.com/yourlabs/django-autocomplete-light

On Wed, Oct 30, 2019 at 3:35 PM Luis Zárate  wrote:

> Hi Guys,
>
> Do you know any alternative to django-ajax-selects, I am using it in a
> project in django 2.2 but docs says that support <=2.1 and also has some
> problems with the version on jquery used, so I am looking something that
> help to remplace this lib.
>
> https://github.com/crucialfelix/django-ajax-selects
>
> Thanks
> --
> "La utopía sirve para caminar" Fernando Birri
>
>
> --
> 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/CAG%2B5VyPzuPpPpm1QByKGjChPtN1-AnPcYkrNFfOR%2B203Hw43-Q%40mail.gmail.com
> 
> .
>


-- 
att.
Carlos Rocha

-- 
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/CAM-7rO1U4oEVLknkZGfgNdMGQipHmDVPWvp9QDrHZ%2BjUZiKrEw%40mail.gmail.com.


Re: django-extra-views

2019-10-30 Thread Elias Coutinho
Sorted out!

path('nova/', views.CreatePerson.as_view(), name='CreatePerson'),


Em qua, 30 de out de 2019 às 14:27, Elias Coutinho 
escreveu:

> Good afternoon friends!
>
> I need your help on this issue.
>
> I'm trying to use this lib:
>
> https://github.com/AndrewIngram/django-extra-views
>
> Specifically CreateWithInlinesView or UpdateWithInlinesView
>
> Then I created the view like this:
>
> from extra_views import CreateWithInlinesView, InlineFormSetFactory
>
> class FilesDocumentsInline (InlineFormSetFactory):
>   model = FilesDocuments
>   fields = ['id', 'kynd', 'file_document']
>
>
> class ContactInline (InlineFormSetFactory):
>   model = Contact
>   fields = ['kynd', 'description', 'contact']
>
>
> class CreatePerson (CreateWithInlinesView):
>   model = Person
>   inlines = [ContactInline, FilesDocumentsInline]
>   fields = ['name', 'phone', 'cpf_cnpj', 'email', 'birth', 'rg', 'cep'
> , 'backyard', 'number', 'neighborhood',
> 'city State']
>   template_name = 'person_create_contact.html'
>
>I'm calling in the url like this:
>
>
> path ('nova /', views.CreatePerson, name = 'CreatePerson'),
>
>
>
>
> And the terminal is returning an argument error.
>
> *response = wrapped_callback (request, * callback_args, **
> callback_kwargs)*
> *TypeError: __init __ () takes 1 positional argument but 2 were given*
>
> How can you? This is virtually identical to the example!
>
> I will post this same text in some forums to try to solve too.
>
> What am I doing wrong in this example?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/m7cXAuwS4bQ/unsubscribe.
> To unsubscribe from this group and all its topics, 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/f7cd09d7-201e-4874-a296-c996569c7b45%40googlegroups.com
> 
> .
>


-- 
Elias Coutinho.
Aprender sobre alguns assuntos é fundamental.
Aprender sobre Deus é indiscutivelmente o melhor conteúdo.

-- 
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/CALgom8rwr6uDtt-zwA%2BcoOOt8P9GptsvFPixYDv4ntE4q88r_w%40mail.gmail.com.


__init__ method called every time on same APIView object

2019-10-30 Thread Diana María Bedoya Ramírez
Hello,

I have an APIView object with an __init__method. In that __init__ I have a 
loop that extends a class list variable. Every time I make a POST to the 
url that calls the APIView, the items in the loop items are added to the 
old ones in the list, duplicating the item number every time. 

Why is the __init__ method called on the same object with every request? 
How can assure a new object with every requesdt I make?


-- 
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/452af061-bf26-4a2a-9437-eea482f951e1%40googlegroups.com.


Re: Fedora 30 server (Configuring Postgresql with Django)

2019-10-30 Thread hari49pf
Thank U, it is working. 



On Wednesday, October 30, 2019 at 11:02:22 PM UTC+5:30, sacrac wrote:
>
> man you just have the user variable in the configuration of the bd 
> misspelled, change USERS for USER
>
> On Wed, Oct 30, 2019 at 11:16 AM hari49pf > 
> wrote:
>
>> yes harish.b is OS user, db user is harishb.
>> DB: ourscomputerlearning
>>
>>
>> On Wednesday, October 30, 2019 at 10:10:42 AM UTC+5:30, Kevin Jay wrote:
>>>
>>> I meant to type ‘harish.b’
>>>
>>> On Tue, Oct 29, 2019 at 11:37 PM Kevin Jay  wrote:
>>>
 Does the user ‘garish.b’ have a system password?

 On Tue, Oct 29, 2019 at 10:38 PM hari49pf  wrote:

> Hi sir,
> I didn't understood, can u elaborate, I am new to django, Plz, help me 
> out.
>
> regards.
> Harish.Bheemanpaly
>
> On Wednesday, October 30, 2019 at 1:21:50 AM UTC+5:30, sacrac wrote:
>>
>> Hi i see one error
>> USERS is incorrect
>> see the doc
>> https://docs.djangoproject.com/en/2.2/ref/databases/#id12
>>
>> On Mon, Oct 28, 2019 at 11:15 PM Harish Bheemanpally <
>> hari...@gmail.com> wrote:
>>
>
>>> Hi,
>>>
>>> Please find the attachment, below are the screen shots of the 
>>> setting & DB permissions please help me
>>>
>>>
>>> [image: Screenshot from 2019-10-29 10-40-47.png]
>>>
>>>
>>> [image: Screenshot from 2019-10-29 10-40-40.png]
>>>
>>>
>>> On Monday, October 28, 2019 at 7:57:47 PM UTC+5:30, sacrac wrote:

 You can show the settings and permissions of the DB, because the 
 user harish.b and harishb are different!

 On Mon, Oct 28, 2019 at 5:00 AM Motaz Hejaze  
 wrote:

> did you install all required packages for postgresql ?
>
>
> On Mon, Oct 28, 2019 at 12:55 PM Harish Bheemanpally <
> hari...@gmail.com> wrote:
>
>> Yes it was running perfectly in sqllie & Mysql. But in postgresql 
>> i am unable to configure Djanog  
>> the postger server screen shot
>>
>> please let me know for any information requried
>>
>>
>> Postgresql image with djanog 
>>
>> [image: Screenshot from 2019-10-28 10-28-38.png]
>>
>>
>> On Monday, October 28, 2019 at 2:12:08 PM UTC+5:30, Motaz Hejaze 
>> wrote:
>>>
>>> Does it run on sqlite ??
>>> You need to show the code
>>>
>>> On Mon, 28 Oct 2019, 8:10 am Harish Bheemanpally, <
>>> hari...@gmail.com> wrote:
>>>
 There is not user with harish in *DB*(postgresql)

 [image: Screenshot from 2019-10-28 16-20-04.png]
 the harish is the user of *OS*.

 As suggested by sacrac:

 I have created a new user in DB with the name harishb who is 
 the owner of the DB and changed the setting.py still raising same 
 error
 when i am trying to run migrate or run the django

 PLZ Help me.

 On Monday, October 28, 2019 at 9:04:03 AM UTC+5:30, sacrac 
 wrote:
>
> Hi, Maybe you need change permission role user harish
> #ALTER ROLE harish CREATEROLE CREATEDB; or SUPERUSER;
>
> On Sun, Oct 27, 2019 at 11:58 AM Harish Bheemanpally <
> hari...@gmail.com> wrote:
>
>> OS: Fedora30 server X64
>> DB: Postgesql-12
>> Django version:2.2.5 
>> connector: psycopg2.binary
>>
>> [image: Screenshot from 2019-10-27 13-20-35.png]
>>
>> i have configured the settings file in django folder, but 
>> unable to resolve the issue, 
>> need help.
>>
>> -- 
>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/d1eebb46-834f-4ee6-be50-7882ca72cbfd%40googlegroups.com
>>  
>> 
>> .
>>
>
>
> -- 
> att.
> Carlos Rocha
>
 -- 
 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...@googlegroups.com.

Alternatives to django ajax select

2019-10-30 Thread Luis Zárate
Hi Guys,

Do you know any alternative to django-ajax-selects, I am using it in a
project in django 2.2 but docs says that support <=2.1 and also has some
problems with the version on jquery used, so I am looking something that
help to remplace this lib.

https://github.com/crucialfelix/django-ajax-selects

Thanks
-- 
"La utopía sirve para caminar" Fernando Birri

-- 
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/CAG%2B5VyPzuPpPpm1QByKGjChPtN1-AnPcYkrNFfOR%2B203Hw43-Q%40mail.gmail.com.


data is not saved in admin

2019-10-30 Thread Bishal adhikari


def pure(request):
   form_dj = new()
   if request.method=="POST":
form_dj=new(request.POST)
   context={
  "form":form_dj
   }
   return render(request,"new/new1.html",context)

everything is good but when i opened the admin the data is not saved there help 
me


-- 
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/9f852a92-659e-4fc4-95eb-b98a17ab2663%40googlegroups.com.


Django admin

2019-10-30 Thread Oyekanmi Akande
I am currently building an application that require a module for
registration and sign in as a different user on the platform. The user can
also sign in as an admin. Do I need to override the existing django admin
or wat. Thanks as you contribute

-- 
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/CAJv%3DoBZOHxW-XFbw0T1sgnawhoUZi-N%3DvwkG%3DSnMdtHSQZHiZA%40mail.gmail.com.


Re: Django leaflet

2019-10-30 Thread Jani Tiainen
Also I did workshop on last DjangoCon EU where I used leaflet without
additional magic.

You can find short docs and code at http://dceu2019.tiainen.cc

su 27. lokak. 2019 klo 2.42 Perceval Maturure 
kirjoitti:

>
> Hi all
> How do u wire your template and view to display maps in Django leaflet
>
> Sent from my iPhone
>
> --
> 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/EF3DE386-7F05-472A-A2CA-D7E29F388DCD%40gmail.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/CAHn91of1DbOEVoYTuymY9hcOy9LbDS87%3DWFJaab-VarP6CABGQ%40mail.gmail.com.


Re: django.contrib.gis for Windows 10

2019-10-30 Thread Jani Tiainen
Hi.

First postgis should bring all necessary libs since it uses very same
geospatial libs as osgeo.

Very important thing is to make sure that if you have 32bit libs you use
32bit python and same with 64bits. You just can't mix libs with different
bit sizes.

In linux this is much easier since it makes way harder to mix bit sizes.

But like many others having native geospatial in windows is a pain. Some of
my colleagues have been doing that since geodjango has even existed.

to 13. kesäk. 2019 klo 21.24 Thanasis  kirjoitti:

> Hello.
> I want to use the GeoDjango application. I begun with the tutorial GIS
> Tutorial .
> I installed properly the PostgreSQL and PostGis for Windows 10. In
> addition, I follow the steps and I installed the OSGeo4W
> 
> in order to get the geospartial libraries. I foolowed the steps in order to
> create the environment variables GDA L_DATA and PROJ_LIB. So, I continued
> with the tutorial
> https://docs.djangoproject.com/en/2.2/ref/contrib/gis/tutorial/#use-ogrinfo-to-examine-spatial-data
>  which
> this command works properly. I make a geographic model and try to make a
> migration in the database. Although, I get a big traceback
>
> Traceback (most recent call last):
>   File "manage.py", line 21, in 
> main()
>   File "manage.py", line 17, in main
> execute_from_command_line(sys.argv)
>   File
> "C:\Users\examples\vent\lib\site-packages\django\core\management\__init__.py"
> , line 381, in execute_from_command_line
> utility.execute()
>   File
> "C:\Users\examples\vent\lib\site-packages\django\core\management\__init__.py"
> , line 357, in execute
> django.setup()
>   File "C:\Users\examples\vent\lib\site-packages\django\__init__.py",
> line 24, in setup
> apps.populate(settings.INSTALLED_APPS)
>   File "C:\Users\examples\vent\lib\site-packages\django\apps\registry.py",
> line 122, in populate
> app_config.ready()
>   File
> "C:\Users\examples\vent\lib\site-packages\django\contrib\admin\apps.py",
> line 24, in ready
> self.module.autodiscover()
>   File
> "C:\Users\examples\vent\lib\site-packages\django\contrib\admin\__init__.py"
> , line 26, in autodiscover
> autodiscover_modules('admin', register_to=site)
>   File
> "C:\Users\examples\vent\lib\site-packages\django\utils\module_loading.py",
> line 47, in autodiscover_modules
> import_module('%s.%s' % (app_config.name, module_to_search))
>   File "C:\Users\examples\vent\lib\importlib\__init__.py", line 127, in
> import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 1006, in _gcd_import
>   File "", line 983, in _find_and_load
>   File "", line 967, in
> _find_and_load_unlocked
>   File "", line 677, in _load_unlocked
>   File "", line 728, in exec_module
>   File "", line 219, in
> _call_with_frames_removed
>   File
> "C:\Users\examples\vent\lib\site-packages\django\contrib\gis\admin\__init__.py"
> , line 5, in 
> from django.contrib.gis.admin.options import GeoModelAdmin,
> OSMGeoAdmin
>   File
> "C:\Users\examples\vent\lib\site-packages\django\contrib\gis\admin\options.py"
> , line 2, in 
> from django.contrib.gis.admin.widgets import OpenLayersWidget
>   File
> "C:\Users\examples\vent\lib\site-packages\django\contrib\gis\admin\widgets.py"
> , line 3, in 
> from django.contrib.gis.gdal import GDALException
>   File
> "C:\Users\examples\vent\lib\site-packages\django\contrib\gis\gdal\__init__.py"
> , line 28, in 
> from django.contrib.gis.gdal.datasource import DataSource
>   File
> "C:\Users\examples\vent\lib\site-packages\django\contrib\gis\gdal\datasource.py"
> , line 39, in 
> from django.contrib.gis.gdal.driver import Driver
>   File
> "C:\Users\examples\vent\lib\site-packages\django\contrib\gis\gdal\driver.py"
> , line 5, in 
> from django.contrib.gis.gdal.prototypes import ds as vcapi, raster as
> rcapi
>   File
> "C:\Users\examples\vent\lib\site-packages\django\contrib\gis\gdal\prototypes\ds.py"
> , line 9, in 
> from django.contrib.gis.gdal.libgdal import GDAL_VERSION, lgdal
>   File "C:\Users\examples\
> vent\lib\site-packages\django\contrib\gis\gdal\libgdal.py", line 47, in
> 
> lgdal = CDLL(lib_path)
>   File "c:\program files (x86)\python37-32\Lib\ctypes\__init__.py", line
> 356, in __init__
> self._handle = _dlopen(self._name, mode)
> OSError: [WinError 193] %1 is not a valid Win32 applicationEnter code here
> ...
>
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> 

Re: Fedora 30 server (Configuring Postgresql with Django)

2019-10-30 Thread carlos
man you just have the user variable in the configuration of the bd
misspelled, change USERS for USER

On Wed, Oct 30, 2019 at 11:16 AM hari49pf  wrote:

> yes harish.b is OS user, db user is harishb.
> DB: ourscomputerlearning
>
>
> On Wednesday, October 30, 2019 at 10:10:42 AM UTC+5:30, Kevin Jay wrote:
>>
>> I meant to type ‘harish.b’
>>
>> On Tue, Oct 29, 2019 at 11:37 PM Kevin Jay  wrote:
>>
>>> Does the user ‘garish.b’ have a system password?
>>>
>>> On Tue, Oct 29, 2019 at 10:38 PM hari49pf  wrote:
>>>
 Hi sir,
 I didn't understood, can u elaborate, I am new to django, Plz, help me
 out.

 regards.
 Harish.Bheemanpaly

 On Wednesday, October 30, 2019 at 1:21:50 AM UTC+5:30, sacrac wrote:
>
> Hi i see one error
> USERS is incorrect
> see the doc
> https://docs.djangoproject.com/en/2.2/ref/databases/#id12
>
> On Mon, Oct 28, 2019 at 11:15 PM Harish Bheemanpally <
> hari...@gmail.com> wrote:
>

>> Hi,
>>
>> Please find the attachment, below are the screen shots of the setting
>> & DB permissions please help me
>>
>>
>> [image: Screenshot from 2019-10-29 10-40-47.png]
>>
>>
>> [image: Screenshot from 2019-10-29 10-40-40.png]
>>
>>
>> On Monday, October 28, 2019 at 7:57:47 PM UTC+5:30, sacrac wrote:
>>>
>>> You can show the settings and permissions of the DB, because the
>>> user harish.b and harishb are different!
>>>
>>> On Mon, Oct 28, 2019 at 5:00 AM Motaz Hejaze 
>>> wrote:
>>>
 did you install all required packages for postgresql ?


 On Mon, Oct 28, 2019 at 12:55 PM Harish Bheemanpally <
 hari...@gmail.com> wrote:

> Yes it was running perfectly in sqllie & Mysql. But in postgresql
> i am unable to configure Djanog
> the postger server screen shot
>
> please let me know for any information requried
>
>
> Postgresql image with djanog
>
> [image: Screenshot from 2019-10-28 10-28-38.png]
>
>
> On Monday, October 28, 2019 at 2:12:08 PM UTC+5:30, Motaz Hejaze
> wrote:
>>
>> Does it run on sqlite ??
>> You need to show the code
>>
>> On Mon, 28 Oct 2019, 8:10 am Harish Bheemanpally, <
>> hari...@gmail.com> wrote:
>>
>>> There is not user with harish in *DB*(postgresql)
>>>
>>> [image: Screenshot from 2019-10-28 16-20-04.png]
>>> the harish is the user of *OS*.
>>>
>>> As suggested by sacrac:
>>>
>>> I have created a new user in DB with the name harishb who is the
>>> owner of the DB and changed the setting.py still raising same error
>>> when i am trying to run migrate or run the django
>>>
>>> PLZ Help me.
>>>
>>> On Monday, October 28, 2019 at 9:04:03 AM UTC+5:30, sacrac wrote:

 Hi, Maybe you need change permission role user harish
 #ALTER ROLE harish CREATEROLE CREATEDB; or SUPERUSER;

 On Sun, Oct 27, 2019 at 11:58 AM Harish Bheemanpally <
 hari...@gmail.com> wrote:

> OS: Fedora30 server X64
> DB: Postgesql-12
> Django version:2.2.5
> connector: psycopg2.binary
>
> [image: Screenshot from 2019-10-27 13-20-35.png]
>
> i have configured the settings file in django folder, but
> unable to resolve the issue,
> need help.
>
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d1eebb46-834f-4ee6-be50-7882ca72cbfd%40googlegroups.com
> 
> .
>


 --
 att.
 Carlos Rocha

>>> --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/3217ae2e-d0c7-4b6f-a06d-b1504ba29aa2%40googlegroups.com
>>> 

UNIQUE constraint failed on adding a new model field

2019-10-30 Thread Vahid Asadi


HI . when i want to add a new field called "slug" to my "Post" model, the 
migrate command will raise UNIQUE constraint failed: new__chat_post.slug

after that i remove that field from my model but the problem still exists. 
why?? and how to resolve this problem without deleting my whole table 
datas. thanks ..

the model:


class Post(models.Model):
title = models.TextField(max_length=100)
context = models.TextField(max_length=255)
creation_date  = models.DateTimeField(default = timezone.now)
author = models.ForeignKey(settings.AUTH_USER_MODEL,on_delete = models.
CASCADE)
slug = models.SlugField(default=["title"],unique=True)

-- 
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/be29e076-3727-469e-9621-b4ca09dc7c6b%40googlegroups.com.


django-extra-views

2019-10-30 Thread Elias Coutinho
Good afternoon friends!

I need your help on this issue.

I'm trying to use this lib:

https://github.com/AndrewIngram/django-extra-views

Specifically CreateWithInlinesView or UpdateWithInlinesView

Then I created the view like this:

from extra_views import CreateWithInlinesView, InlineFormSetFactory

class FilesDocumentsInline (InlineFormSetFactory):
  model = FilesDocuments
  fields = ['id', 'kynd', 'file_document']


class ContactInline (InlineFormSetFactory):
  model = Contact
  fields = ['kynd', 'description', 'contact']


class CreatePerson (CreateWithInlinesView):
  model = Person
  inlines = [ContactInline, FilesDocumentsInline]
  fields = ['name', 'phone', 'cpf_cnpj', 'email', 'birth', 'rg', 'cep', 
'backyard', 'number', 'neighborhood',
'city State']
  template_name = 'person_create_contact.html'

   I'm calling in the url like this:


path ('nova /', views.CreatePerson, name = 'CreatePerson'),




And the terminal is returning an argument error.

*response = wrapped_callback (request, * callback_args, ** 
callback_kwargs)*
*TypeError: __init __ () takes 1 positional argument but 2 were given*

How can you? This is virtually identical to the example!

I will post this same text in some forums to try to solve too.

What am I doing wrong in this example?

-- 
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/f7cd09d7-201e-4874-a296-c996569c7b45%40googlegroups.com.


Re: Fedora 30 server (Configuring Postgresql with Django)

2019-10-30 Thread hari49pf
yes harish.b is OS user, db user is harishb.
DB: ourscomputerlearning


On Wednesday, October 30, 2019 at 10:10:42 AM UTC+5:30, Kevin Jay wrote:
>
> I meant to type ‘harish.b’
>
> On Tue, Oct 29, 2019 at 11:37 PM Kevin Jay > 
> wrote:
>
>> Does the user ‘garish.b’ have a system password?
>>
>> On Tue, Oct 29, 2019 at 10:38 PM hari49pf > > wrote:
>>
>>> Hi sir,
>>> I didn't understood, can u elaborate, I am new to django, Plz, help me 
>>> out.
>>>
>>> regards.
>>> Harish.Bheemanpaly
>>>
>>> On Wednesday, October 30, 2019 at 1:21:50 AM UTC+5:30, sacrac wrote:

 Hi i see one error
 USERS is incorrect
 see the doc
 https://docs.djangoproject.com/en/2.2/ref/databases/#id12

 On Mon, Oct 28, 2019 at 11:15 PM Harish Bheemanpally  
 wrote:

>>>
> Hi,
>
> Please find the attachment, below are the screen shots of the setting 
> & DB permissions please help me
>
>
> [image: Screenshot from 2019-10-29 10-40-47.png]
>
>
> [image: Screenshot from 2019-10-29 10-40-40.png]
>
>
> On Monday, October 28, 2019 at 7:57:47 PM UTC+5:30, sacrac wrote:
>>
>> You can show the settings and permissions of the DB, because the user 
>> harish.b and harishb are different!
>>
>> On Mon, Oct 28, 2019 at 5:00 AM Motaz Hejaze  
>> wrote:
>>
>>> did you install all required packages for postgresql ?
>>>
>>>
>>> On Mon, Oct 28, 2019 at 12:55 PM Harish Bheemanpally <
>>> hari...@gmail.com> wrote:
>>>
 Yes it was running perfectly in sqllie & Mysql. But in postgresql i 
 am unable to configure Djanog  
 the postger server screen shot

 please let me know for any information requried


 Postgresql image with djanog 

 [image: Screenshot from 2019-10-28 10-28-38.png]


 On Monday, October 28, 2019 at 2:12:08 PM UTC+5:30, Motaz Hejaze 
 wrote:
>
> Does it run on sqlite ??
> You need to show the code
>
> On Mon, 28 Oct 2019, 8:10 am Harish Bheemanpally, <
> hari...@gmail.com> wrote:
>
>> There is not user with harish in *DB*(postgresql)
>>
>> [image: Screenshot from 2019-10-28 16-20-04.png]
>> the harish is the user of *OS*.
>>
>> As suggested by sacrac:
>>
>> I have created a new user in DB with the name harishb who is the 
>> owner of the DB and changed the setting.py still raising same error
>> when i am trying to run migrate or run the django
>>
>> PLZ Help me.
>>
>> On Monday, October 28, 2019 at 9:04:03 AM UTC+5:30, sacrac wrote:
>>>
>>> Hi, Maybe you need change permission role user harish
>>> #ALTER ROLE harish CREATEROLE CREATEDB; or SUPERUSER;
>>>
>>> On Sun, Oct 27, 2019 at 11:58 AM Harish Bheemanpally <
>>> hari...@gmail.com> wrote:
>>>
 OS: Fedora30 server X64
 DB: Postgesql-12
 Django version:2.2.5 
 connector: psycopg2.binary

 [image: Screenshot from 2019-10-27 13-20-35.png]

 i have configured the settings file in django folder, but 
 unable to resolve the issue, 
 need help.

 -- 
 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...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/django-users/d1eebb46-834f-4ee6-be50-7882ca72cbfd%40googlegroups.com
  
 
 .

>>>
>>>
>>> -- 
>>> att.
>>> Carlos Rocha
>>>
>> -- 
>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/3217ae2e-d0c7-4b6f-a06d-b1504ba29aa2%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 

Re: Making a scheduling app/programm for recurring treatment

2019-10-30 Thread Motaz Hejaze
I can cooperate with you ..
Talk to me on skype : m3tz-hjze

On Wed, 30 Oct 2019, 6:43 pm Uzama Zaid Mohammed Jaward, <
uzamajaw...@gmail.com> wrote:

> I think you don’t get any answer for these like questions in here. This is
> a forum to discuss about Django and Support. First you have to design the
> system. Then onwards you can use Django. You might get answer for this if
> you will post this in stack overflow
>
> On Wed, Oct 30, 2019 at 19:34, Nithin Bhaskar 
> wrote:
>
>> Well to be frank, I am stuck right at the beginning itself.
>>
>> I am working in a public sector with limiter resources and a huge patient
>> load and almost no funding. I was thinking of making patient scheduling a
>> bit manageable and easy in my hospital.
>>
>> I have not yet figured out how to go about with it. I know its too naive,
>> but i could really use some help starting from the core basics. I have just
>> made an app called scheduler1.
>> 1. How do i progam treatments in the  7 scheduling rooms and block them
>> for the next 7 weeks.
>> 2. Certain procedures are done only in room 1 and 2. So in option 4
>> (modality of treatment), if i have chosen them, the patients have to be
>> scheduled in these rooms.
>>
>> But before this, I need to start with the basic layout of the app.
>>
>> I understand that you may find it similar to teaching a kindergarten kid,
>> but I would be really grateful if you could help me put
>>
>> Thanking you
>>
>> Regards..
>>
>>
>>
>> On Wed, 30 Oct 2019 at 18:59, Kasper Laudrup 
>> wrote:
>>
>>> Hi Nithin,
>>>
>>> On 30/10/2019 08.19, Nithin Bhaskar wrote:
>>> >
>>> > I am completely new to django and python and don't have a background
>>> in
>>> > programming
>>> > I have taught myself a bit of python and django and use PyCharm
>>> >
>>> > Kindly help me out
>>> >
>>>
>>> What exactly do you need help with? What have you done so far? Where are
>>> you stuck?
>>>
>>> You need to be more specific.
>>>
>>> Kind regards,
>>>
>>> Kasper Laudrup
>>>
>>> --
>>> 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/e4a53cf5-2dd4-49cb-a6a2-b59cdaf93ce3%40stacktrace.dk
>>> .
>>>
>> --
>> 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/CAKJvVH0v-Ar%2BOct%2BNX2oCX89vbOX4RBWXqYTEbZMXumschS9_g%40mail.gmail.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/CAOHA2_3nsSstXkQBp6oWRu7PiYNCfTO0FYCh5T36%3DhFFUBTdeg%40mail.gmail.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/CAHV4E-eT3%3DX019DVOpDWUqi-YYFJsJTHBy_NPewMOOU7L%3DhH_w%40mail.gmail.com.


Re: OSError: [WinError 126] The specified module could not be found

2019-10-30 Thread Adam Starrh
I just solved this for myself by switching to 32-bit versions of Python and 
OSGeo4Win

On Thursday, April 11, 2019 at 8:31:47 AM UTC-7, Dieu Donne Megnassan wrote:
>
> I need help to figure this out. I'm a GeoDjango newbie and I've been 
> trying to setup the geograpic libraries to no avail.I am following the 
> documentation for windows all right, but everytime I runserver after 
> setting GDAL_LIBRARY_PATH, I get this error:
>
> PS C:\users\charming\desktop\web\heritage\muina> python manage.py runserver
> Unhandled exception in thread started by  check_errors..wrapper at 0x02B4FE44AEA0>
> Traceback (most recent call last):
>   File 
> "C:\Users\Charming\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\autoreload.py",
>  
> line 225, in wrapper
> fn(*args, **kwargs)
>   File 
> "C:\Users\Charming\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\commands\runserver.py",
>  
> line 109, in inner_run
> autoreload.raise_last_exception()
>   File 
> "C:\Users\Charming\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\autoreload.py",
>  
> line 248, in raise_last_exception
> raise _exception[1]
>   File 
> "C:\Users\Charming\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\__init__.py",
>  
> line 337, in execute
> autoreload.check_errors(django.setup)()
>   File 
> "C:\Users\Charming\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\autoreload.py",
>  
> line 225, in wrapper
> fn(*args, **kwargs)
>   File 
> "C:\Users\Charming\AppData\Local\Programs\Python\Python37\lib\site-packages\django\__init__.py",
>  
> line 24, in setup
> apps.populate(settings.INSTALLED_APPS)
>   File 
> "C:\Users\Charming\AppData\Local\Programs\Python\Python37\lib\site-packages\django\apps\registry.py",
>  
> line 120, in populate
> app_config.ready()
>   File 
> "C:\Users\Charming\AppData\Local\Programs\Python\Python37\lib\site-packages\django\contrib\admin\apps.py",
>  
> line 24, in ready
> self.module.autodiscover()
>   File 
> "C:\Users\Charming\AppData\Local\Programs\Python\Python37\lib\site-packages\django\contrib\admin\__init__.py",
>  
> line 26, in autodiscover
> autodiscover_modules('admin', register_to=site)
>   File 
> "C:\Users\Charming\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\module_loading.py",
>  
> line 47, in autodiscover_modules
> import_module('%s.%s' % (app_config.name, module_to_search))
>   File 
> "C:\Users\Charming\AppData\Local\Programs\Python\Python37\lib\importlib\__init__.py",
>  
> line 127, in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 1006, in _gcd_import
>   File "", line 983, in _find_and_load
>   File "", line 967, in 
> _find_and_load_unlocked
>   File "", line 677, in _load_unlocked
>   File "", line 728, in exec_module
>   File "", line 219, in 
> _call_with_frames_removed
>   File 
> "C:\Users\Charming\AppData\Local\Programs\Python\Python37\lib\site-packages\django\contrib\gis\admin\__init__.py",
>  
> line 5, in 
> from django.contrib.gis.admin.options import GeoModelAdmin, OSMGeoAdmin
>   File 
> "C:\Users\Charming\AppData\Local\Programs\Python\Python37\lib\site-packages\django\contrib\gis\admin\options.py",
>  
> line 2, in 
> from django.contrib.gis.admin.widgets import OpenLayersWidget
>   File 
> "C:\Users\Charming\AppData\Local\Programs\Python\Python37\lib\site-packages\django\contrib\gis\admin\widgets.py",
>  
> line 3, in 
> from django.contrib.gis.gdal import GDALException
>   File 
> "C:\Users\Charming\AppData\Local\Programs\Python\Python37\lib\site-packages\django\contrib\gis\gdal\__init__.py",
>  
> line 28, in 
> from django.contrib.gis.gdal.datasource import DataSource
>   File 
> "C:\Users\Charming\AppData\Local\Programs\Python\Python37\lib\site-packages\django\contrib\gis\gdal\datasource.py",
>  
> line 39, in 
> from django.contrib.gis.gdal.driver import Driver
>   File 
> "C:\Users\Charming\AppData\Local\Programs\Python\Python37\lib\site-packages\django\contrib\gis\gdal\driver.py",
>  
> line 5, in 
> from django.contrib.gis.gdal.prototypes import ds as vcapi, raster as 
> rcapi
>   File 
> "C:\Users\Charming\AppData\Local\Programs\Python\Python37\lib\site-packages\django\contrib\gis\gdal\prototypes\ds.py",
>  
> line 9, in 
> from django.contrib.gis.gdal.libgdal import GDAL_VERSION, lgdal
>   File 
> "C:\Users\Charming\AppData\Local\Programs\Python\Python37\lib\site-packages\django\contrib\gis\gdal\libgdal.py",
>  
> line 47, in 
> lgdal = CDLL(lib_path)
>   File 
> "C:\Users\Charming\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py",
>  
> line 356, in __init__
> self._handle = _dlopen(self._name, mode)
> OSError: [WinError 126] The specified module could not be found
>
>
>
> I think it has something to do with my python, idk.
>

-- 
You received this message because you are 

Re: django.contrib.gis for Windows 10

2019-10-30 Thread Adam Starrh
For future reference, make sure you are using 32-bit versions of Python and 
OSGeo4Win. GDAL doesn't seem to work otherwise.

On Thursday, June 13, 2019 at 12:45:32 PM UTC-7, RyuCoder wrote:
>
> Hey,
>
> I had a similar issue with one of the projects I was working on. 
>
> GDAL was not working properly in windows 10, it was not getting detected 
> for some reason. 
> I never figured out why and how to fix that. 
>
> I ended up using Ubuntu to fix the issue. It worked like a charm!
>
>  
> Regards,
> Chetan Ganji
> +91-900-483-4183
> ganji...@gmail.com 
> http://ryucoder.in
>
>
> On Thu, Jun 13, 2019 at 11:54 PM Thanasis  > wrote:
>
>> Hello. 
>> I want to use the GeoDjango application. I begun with the tutorial GIS 
>> Tutorial 
>> . I 
>> installed properly the PostgreSQL and PostGis for Windows 10. In addition, 
>> I follow the steps and I installed the OSGeo4W 
>>  
>> in order to get the geospartial libraries. I foolowed the steps in order to 
>> create the environment variables GDA L_DATA and PROJ_LIB. So, I 
>> continued with the tutorial 
>> https://docs.djangoproject.com/en/2.2/ref/contrib/gis/tutorial/#use-ogrinfo-to-examine-spatial-data
>>  which 
>> this command works properly. I make a geographic model and try to make a 
>> migration in the database. Although, I get a big traceback 
>>
>> Traceback (most recent call last):
>>   File "manage.py", line 21, in 
>> main()
>>   File "manage.py", line 17, in main
>> execute_from_command_line(sys.argv)
>>   File 
>> "C:\Users\examples\vent\lib\site-packages\django\core\management\__init__.py"
>> , line 381, in execute_from_command_line
>> utility.execute()
>>   File 
>> "C:\Users\examples\vent\lib\site-packages\django\core\management\__init__.py"
>> , line 357, in execute
>> django.setup()
>>   File "C:\Users\examples\vent\lib\site-packages\django\__init__.py", 
>> line 24, in setup
>> apps.populate(settings.INSTALLED_APPS)
>>   File "C:\Users\examples\vent\lib\site-packages\django\apps\registry.py"
>> , line 122, in populate
>> app_config.ready()
>>   File 
>> "C:\Users\examples\vent\lib\site-packages\django\contrib\admin\apps.py", 
>> line 24, in ready
>> self.module.autodiscover()
>>   File 
>> "C:\Users\examples\vent\lib\site-packages\django\contrib\admin\__init__.py"
>> , line 26, in autodiscover
>> autodiscover_modules('admin', register_to=site)
>>   File 
>> "C:\Users\examples\vent\lib\site-packages\django\utils\module_loading.py"
>> , line 47, in autodiscover_modules
>> import_module('%s.%s' % (app_config.name, module_to_search))
>>   File "C:\Users\examples\vent\lib\importlib\__init__.py", line 127, in 
>> import_module
>> return _bootstrap._gcd_import(name[level:], package, level)
>>   File "", line 1006, in _gcd_import
>>   File "", line 983, in _find_and_load
>>   File "", line 967, in 
>> _find_and_load_unlocked
>>   File "", line 677, in _load_unlocked
>>   File "", line 728, in exec_module
>>   File "", line 219, in 
>> _call_with_frames_removed
>>   File 
>> "C:\Users\examples\vent\lib\site-packages\django\contrib\gis\admin\__init__.py"
>> , line 5, in 
>> from django.contrib.gis.admin.options import GeoModelAdmin, 
>> OSMGeoAdmin
>>   File 
>> "C:\Users\examples\vent\lib\site-packages\django\contrib\gis\admin\options.py"
>> , line 2, in 
>> from django.contrib.gis.admin.widgets import OpenLayersWidget
>>   File 
>> "C:\Users\examples\vent\lib\site-packages\django\contrib\gis\admin\widgets.py"
>> , line 3, in 
>> from django.contrib.gis.gdal import GDALException
>>   File 
>> "C:\Users\examples\vent\lib\site-packages\django\contrib\gis\gdal\__init__.py"
>> , line 28, in 
>> from django.contrib.gis.gdal.datasource import DataSource
>>   File 
>> "C:\Users\examples\vent\lib\site-packages\django\contrib\gis\gdal\datasource.py"
>> , line 39, in 
>> from django.contrib.gis.gdal.driver import Driver
>>   File 
>> "C:\Users\examples\vent\lib\site-packages\django\contrib\gis\gdal\driver.py"
>> , line 5, in 
>> from django.contrib.gis.gdal.prototypes import ds as vcapi, raster as 
>> rcapi
>>   File 
>> "C:\Users\examples\vent\lib\site-packages\django\contrib\gis\gdal\prototypes\ds.py"
>> , line 9, in 
>> from django.contrib.gis.gdal.libgdal import GDAL_VERSION, lgdal
>>   File "C:\Users\examples\
>> vent\lib\site-packages\django\contrib\gis\gdal\libgdal.py", line 47, in 
>> 
>> lgdal = CDLL(lib_path)
>>   File "c:\program files (x86)\python37-32\Lib\ctypes\__init__.py", line 
>> 356, in __init__
>> self._handle = _dlopen(self._name, mode)
>> OSError: [WinError 193] %1 is not a valid Win32 applicationEnter code 
>> here...
>>
>>
>> -- 
>> 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 

Re: How to migrate and copy Data from sqlite to Postgresql

2019-10-30 Thread Uzama Zaid Mohammed Jaward
This link was found in a previous email

https://justinmi.me/blog/2017/04/28/migrating-sql-databases

On Wed, Oct 30, 2019 at 19:44, Balaji Shetty  wrote:

> Hi
>
> Can anyone please provide me help or any website providing help of DB
> Migration.
>
> Already I have deployed Application on pythonanywhere .
>
> There are 250 records already created and relational database with 5
> models present in Application.
>
> Default DB is Sqlite and I have to switch to Postgresql with all old
> Records. I have support of Postgresql in Application.
>
> Thanks in advance.
>
>
> --
> Mr Shetty Balaji
> Asst. Prof.
> IT Department
> SGGS I
> Nanded. My. India
>
> --
> 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/CAECSbOvH_ZSQmMCnOvHRahePo4hcYPe2Ny96k4BNQ5XMt3brQg%40mail.gmail.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/CAOHA2_2Sb1utEF0ay5oK7CjPoB4oMYh8gFtGt_VBP%3DyF-hJp0A%40mail.gmail.com.


Re: Making a scheduling app/programm for recurring treatment

2019-10-30 Thread Uzama Zaid Mohammed Jaward
I think you don’t get any answer for these like questions in here. This is
a forum to discuss about Django and Support. First you have to design the
system. Then onwards you can use Django. You might get answer for this if
you will post this in stack overflow

On Wed, Oct 30, 2019 at 19:34, Nithin Bhaskar 
wrote:

> Well to be frank, I am stuck right at the beginning itself.
>
> I am working in a public sector with limiter resources and a huge patient
> load and almost no funding. I was thinking of making patient scheduling a
> bit manageable and easy in my hospital.
>
> I have not yet figured out how to go about with it. I know its too naive,
> but i could really use some help starting from the core basics. I have just
> made an app called scheduler1.
> 1. How do i progam treatments in the  7 scheduling rooms and block them
> for the next 7 weeks.
> 2. Certain procedures are done only in room 1 and 2. So in option 4
> (modality of treatment), if i have chosen them, the patients have to be
> scheduled in these rooms.
>
> But before this, I need to start with the basic layout of the app.
>
> I understand that you may find it similar to teaching a kindergarten kid,
> but I would be really grateful if you could help me put
>
> Thanking you
>
> Regards..
>
>
>
> On Wed, 30 Oct 2019 at 18:59, Kasper Laudrup 
> wrote:
>
>> Hi Nithin,
>>
>> On 30/10/2019 08.19, Nithin Bhaskar wrote:
>> >
>> > I am completely new to django and python and don't have a background in
>> > programming
>> > I have taught myself a bit of python and django and use PyCharm
>> >
>> > Kindly help me out
>> >
>>
>> What exactly do you need help with? What have you done so far? Where are
>> you stuck?
>>
>> You need to be more specific.
>>
>> Kind regards,
>>
>> Kasper Laudrup
>>
>> --
>> 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/e4a53cf5-2dd4-49cb-a6a2-b59cdaf93ce3%40stacktrace.dk
>> .
>>
> --
> 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/CAKJvVH0v-Ar%2BOct%2BNX2oCX89vbOX4RBWXqYTEbZMXumschS9_g%40mail.gmail.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/CAOHA2_3nsSstXkQBp6oWRu7PiYNCfTO0FYCh5T36%3DhFFUBTdeg%40mail.gmail.com.


Re: Django Channels persistent DB connection

2019-10-30 Thread BR
I should add: My interest would be to have a DB connection that lasts the 
lifetime of the parent consumer. Does it already do this, and am I 
imagining things?

On Wednesday, October 30, 2019 at 12:17:54 PM UTC-4, BR wrote:
>
> I moved from a local sqlite3 DB file to a shared remote (local LAN) 
> MariaDB server and noticed a bit of a slow down. On top of the DB now being 
> remote, I'm also using SSL to encrypt the DB information. Based on the 
> description of *database_sync_to_async* it sounds like the connection is 
> closed/cleaned up on each call.
>
> Is there an option for a persistent DB connection in Channels?
>

-- 
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/bcacfbad-e250-4133-be15-4de78a3fe555%40googlegroups.com.


Django Channels persistent DB connection

2019-10-30 Thread BR
I moved from a local sqlite3 DB file to a shared remote (local LAN) MariaDB 
server and noticed a bit of a slow down. On top of the DB now being remote, 
I'm also using SSL to encrypt the DB information. Based on the description 
of *database_sync_to_async* it sounds like the connection is closed/cleaned 
up on each call.

Is there an option for a persistent DB connection in Channels?

-- 
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/713d292b-def8-4339-a277-f356ba7f23fc%40googlegroups.com.


How to migrate and copy Data from sqlite to Postgresql

2019-10-30 Thread Balaji Shetty
Hi

Can anyone please provide me help or any website providing help of DB
Migration.

Already I have deployed Application on pythonanywhere .

There are 250 records already created and relational database with 5 models
present in Application.

Default DB is Sqlite and I have to switch to Postgresql with all old
Records. I have support of Postgresql in Application.

Thanks in advance.


-- 
Mr Shetty Balaji
Asst. Prof.
IT Department
SGGS I
Nanded. My. India

-- 
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/CAECSbOvH_ZSQmMCnOvHRahePo4hcYPe2Ny96k4BNQ5XMt3brQg%40mail.gmail.com.


Re: Making a scheduling app/programm for recurring treatment

2019-10-30 Thread Nithin Bhaskar
Well to be frank, I am stuck right at the beginning itself.

I am working in a public sector with limiter resources and a huge patient
load and almost no funding. I was thinking of making patient scheduling a
bit manageable and easy in my hospital.

I have not yet figured out how to go about with it. I know its too naive,
but i could really use some help starting from the core basics. I have just
made an app called scheduler1.
1. How do i progam treatments in the  7 scheduling rooms and block them for
the next 7 weeks.
2. Certain procedures are done only in room 1 and 2. So in option 4
(modality of treatment), if i have chosen them, the patients have to be
scheduled in these rooms.

But before this, I need to start with the basic layout of the app.

I understand that you may find it similar to teaching a kindergarten kid,
but I would be really grateful if you could help me put

Thanking you

Regards..



On Wed, 30 Oct 2019 at 18:59, Kasper Laudrup  wrote:

> Hi Nithin,
>
> On 30/10/2019 08.19, Nithin Bhaskar wrote:
> >
> > I am completely new to django and python and don't have a background in
> > programming
> > I have taught myself a bit of python and django and use PyCharm
> >
> > Kindly help me out
> >
>
> What exactly do you need help with? What have you done so far? Where are
> you stuck?
>
> You need to be more specific.
>
> Kind regards,
>
> Kasper Laudrup
>
> --
> 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/e4a53cf5-2dd4-49cb-a6a2-b59cdaf93ce3%40stacktrace.dk
> .
>

-- 
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/CAKJvVH0v-Ar%2BOct%2BNX2oCX89vbOX4RBWXqYTEbZMXumschS9_g%40mail.gmail.com.


Re: Multiple Database Setup

2019-10-30 Thread DANIEL URBANO DE LA RUA
https://docs.djangoproject.com/en/2.2/topics/db/multi-db/

On Wed, 30 Oct 2019, 14:39 Rajat Chopra,  wrote:

> I wish to create a project with 2 apps.  Each app will have its own
> database - one for payments and another for statements.
>
> I have created a set of models within the models.py for the payments app
> and another set of models inside within the models.py for the statements
> app.
>
> When I run the command "python manage.py migrate --database=statements"
> how will Django know to look at the models.py file inside of the statements
> app and create those tables in the statements database ?
>
> In other words where do I put the code that connects the models inside of
> an app (statements/models.py) to the database that those models should be
> created and stored in?
> What would be an example of what this code will look like?
>
> --
> 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/06bf4cc7-7261-4ac8-95fb-d523528c77e2%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/CAO_yRT0aZjK%3D0AHU0U2wp1U16%3D1fH5MXx%3D6FpgxX0sVfNDnxeg%40mail.gmail.com.


Multiple Database Setup

2019-10-30 Thread Rajat Chopra
I wish to create a project with 2 apps.  Each app will have its own 
database - one for payments and another for statements. 

I have created a set of models within the models.py for the payments app 
and another set of models inside within the models.py for the statements 
app.

When I run the command "python manage.py migrate --database=statements" how 
will Django know to look at the models.py file inside of the statements app 
and create those tables in the statements database ?   

In other words where do I put the code that connects the models inside of 
an app (statements/models.py) to the database that those models should be 
created and stored in?
What would be an example of what this code will look like?

-- 
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/06bf4cc7-7261-4ac8-95fb-d523528c77e2%40googlegroups.com.


Re: Making a scheduling app/programm for recurring treatment

2019-10-30 Thread Kasper Laudrup

Hi Nithin,

On 30/10/2019 08.19, Nithin Bhaskar wrote:


I am completely new to django and python and don't have a background in 
programming

I have taught myself a bit of python and django and use PyCharm

Kindly help me out



What exactly do you need help with? What have you done so far? Where are 
you stuck?


You need to be more specific.

Kind regards,

Kasper Laudrup

--
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/e4a53cf5-2dd4-49cb-a6a2-b59cdaf93ce3%40stacktrace.dk.


Re: ayudaaa

2019-10-30 Thread Kasper Laudrup

Hi Priscila,

On 30/10/2019 06.14, Priscila Moreno wrote:
Good evening, I would like you to help me in django how to change colors 
in the admin




It's described in the official documentation here:

https://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-admin-templates

Kind regards,

Kasper Laudrup

--
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/80aa2500-d636-8554-d2cc-4207511fbc2e%40stacktrace.dk.


Re: Fedora 30 server (Configuring Postgresql with Django)

2019-10-30 Thread hari49pf
i am using *postgresql*, not *oracle*.

please help me out 



On Wednesday, October 30, 2019 at 4:39:18 PM UTC+5:30, Siratim Mustaquim 
wrote:
>
> Can You please check your DB configuration @hari49pf. As @carlos mentioned 
> there might be an error there.
>
> [image: database.png]
>
>
>
>
> On Wed, Oct 30, 2019 at 10:40 AM Kevin Jay > 
> wrote:
>
>> I meant to type ‘harish.b’
>>
>> On Tue, Oct 29, 2019 at 11:37 PM Kevin Jay > > wrote:
>>
>>> Does the user ‘garish.b’ have a system password?
>>>
>>> On Tue, Oct 29, 2019 at 10:38 PM hari49pf >> > wrote:
>>>
 Hi sir,
 I didn't understood, can u elaborate, I am new to django, Plz, help me 
 out.

 regards.
 Harish.Bheemanpaly

 On Wednesday, October 30, 2019 at 1:21:50 AM UTC+5:30, sacrac wrote:
>
> Hi i see one error
> USERS is incorrect
> see the doc
> https://docs.djangoproject.com/en/2.2/ref/databases/#id12
>
> On Mon, Oct 28, 2019 at 11:15 PM Harish Bheemanpally <
> hari...@gmail.com> wrote:
>

>> Hi,
>>
>> Please find the attachment, below are the screen shots of the setting 
>> & DB permissions please help me
>>
>>
>> [image: Screenshot from 2019-10-29 10-40-47.png]
>>
>>
>> [image: Screenshot from 2019-10-29 10-40-40.png]
>>
>>
>> On Monday, October 28, 2019 at 7:57:47 PM UTC+5:30, sacrac wrote:
>>>
>>> You can show the settings and permissions of the DB, because the 
>>> user harish.b and harishb are different!
>>>
>>> On Mon, Oct 28, 2019 at 5:00 AM Motaz Hejaze  
>>> wrote:
>>>
 did you install all required packages for postgresql ?


 On Mon, Oct 28, 2019 at 12:55 PM Harish Bheemanpally <
 hari...@gmail.com> wrote:

> Yes it was running perfectly in sqllie & Mysql. But in postgresql 
> i am unable to configure Djanog  
> the postger server screen shot
>
> please let me know for any information requried
>
>
> Postgresql image with djanog 
>
> [image: Screenshot from 2019-10-28 10-28-38.png]
>
>
> On Monday, October 28, 2019 at 2:12:08 PM UTC+5:30, Motaz Hejaze 
> wrote:
>>
>> Does it run on sqlite ??
>> You need to show the code
>>
>> On Mon, 28 Oct 2019, 8:10 am Harish Bheemanpally, <
>> hari...@gmail.com> wrote:
>>
>>> There is not user with harish in *DB*(postgresql)
>>>
>>> [image: Screenshot from 2019-10-28 16-20-04.png]
>>> the harish is the user of *OS*.
>>>
>>> As suggested by sacrac:
>>>
>>> I have created a new user in DB with the name harishb who is the 
>>> owner of the DB and changed the setting.py still raising same error
>>> when i am trying to run migrate or run the django
>>>
>>> PLZ Help me.
>>>
>>> On Monday, October 28, 2019 at 9:04:03 AM UTC+5:30, sacrac wrote:

 Hi, Maybe you need change permission role user harish
 #ALTER ROLE harish CREATEROLE CREATEDB; or SUPERUSER;

 On Sun, Oct 27, 2019 at 11:58 AM Harish Bheemanpally <
 hari...@gmail.com> wrote:

> OS: Fedora30 server X64
> DB: Postgesql-12
> Django version:2.2.5 
> connector: psycopg2.binary
>
> [image: Screenshot from 2019-10-27 13-20-35.png]
>
> i have configured the settings file in django folder, but 
> unable to resolve the issue, 
> need help.
>
> -- 
> 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...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/d1eebb46-834f-4ee6-be50-7882ca72cbfd%40googlegroups.com
>  
> 
> .
>


 -- 
 att.
 Carlos Rocha

>>> -- 
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/3217ae2e-d0c7-4b6f-a06d-b1504ba29aa2%40googlegroups.com
>>>  
>>> 

ayudaaa

2019-10-30 Thread Priscila Moreno


Good evening, I would like you to help me in django how to change colors in the 
admin

-- 
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/c69b7ae0-2ed2-4af5-9696-dd55868ff01c%40googlegroups.com.


Re: Serving non-referenced static files

2019-10-30 Thread ahanor nosa
Create a folder call static in your project directory and paste your JS
files there.



On Tuesday, October 29, 2019, Jack Sundberg 
wrote:

> Hello again,
>
> I could use some help on loading static files in development mode.
> Specifically, I'd like to tell Django to serve additional files that are
> not explicitly loaded in the html with {% load static %}. My issue is
> actually identical to this post
> ,
> where I could use some extra explanation on their suggested fix. To restate
> the issue, I load a static javascript file within my myapp/index.html:
>
> {% load static %}
> 
>
> The javascript file (myscript_1.js) references another javascript file
> (myscript_2.js) as well as some other media (e.g. a number of *.png, *.css,
> *.json files). However, Django doesn't serve these files because they are
> not directly loaded in the html, and a 404 error is thrown when trying to
> find myscript_2.js - along with the other files. How do I get Django to
> serve these files as well?
>
> It looks like Django is searching for the files at http://127.0.0.1:8000/
> myapp/myscript_2.js. Could I forward this path to
> http://127.0.0.1:8000/static/myapp/myscript_2.js? I'm trying to do this
> with the following in my urls.py (in projects urls.py - not the myapp
> urls.py):
>
> from django.conf import settings
> from django.conf.urls.static import static
> urlpatterns += static(path=settings.STATIC_URL, document_root=settings.
> STATIC_ROOT)
>
> and in my settings.py:
>
> STATIC_ROOT =  os.path.join(BASE_DIR, 'static')
> STATIC_URL = /static/
>
> This isn't working for me though, and I think I'm using the static()
> function incorrectly. Could someone offer some guidance on how to set this
> up for development testing?
>
> Thanks in advance,
> Jack
>
>
> --
> 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/9de51c2c-4dca-454a-8057-db9c0e8c8b37%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/CAMLYDLEoNsQG56uYjBsw_BQawK4zD7gb7rYOsft_YF96paniQA%40mail.gmail.com.


Making a scheduling app/programm for recurring treatment

2019-10-30 Thread Nithin Bhaskar
I am trying to make a scheduling app/program for recurring treatments..ie.. 
for patients requiring treatments daily (5 days a week) for about 6-7 weeks.

Scheduling has to happen for 6-7 rooms with each room accommodating 50 
patients each per day, and each treatment slot extending anywhere between 
20-40min (based on the site and type of treatment)

My idea is to have the following data in the front end:

   1. patient name
   2. Hospital ID
   3. Site of treatment
   4. modality of treatment
   5. Expected starting date
   6. No of fractions (no. of recurrences)

Based on the data on 3-6 above, the room has to be allotted for the patient 
and also further booking for the next 6-7weeks (based on the no. of 
fractions) has to be blocked for him [except on saturdays and sundays] 
against his name and ID.

I am completely new to django and python and don't have a background in 
programming
I have taught myself a bit of python and django and use PyCharm

Kindly help me out

Thanks.

-- 
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/257b2fd2-3b93-4370-8bd4-f07b47f64d5a%40googlegroups.com.


Creating Shopify webhook using pipeline

2019-10-30 Thread Saswat Ray
Hi Guys,

I need to create one webhook in shopify(order/product) but using *pipeline
function*.I did the app authentication and got the access taken.

In settings.py i added this

SOCIAL_AUTH_SHOPIFY_WEBHOOK_PIPELINE = (
'social_core.pipeline.social_auth.social_uid',
'social_core.pipeline.social_auth.auth_allowed',
*'apps.integrations.pipelines.shopify_webhook_order_create',*
'social_core.pipeline.social_auth.social_user',
'social_core.pipeline.social_auth.associate_user',
'social_core.pipeline.social_auth.load_extra_data',
'social_core.pipeline.user.user_details',
)

I wanted to do something like this inside "*shopify_webhook_order_create"*
def register_webhook():
headers = {
"X-Shopify-Access-Token": session.get("access_token"),
"Content-Type": "application/json"
}

payload = {
"webhook": {
"topic": "draft_orders/create",
"address": "https://{0}/webhook".format(HOST),
"format": "json"
}
}
response = requests.post("https://; + session.get("shop")
 + "/admin/webhooks.json",
 data=json.dumps(payload), headers=headers)

if response.status_code == 201:

return render_template('register_webhook.html',

 webhook_response=json.loads(response.text))
else:
return Response(response="{0} -
{1}".format(response.status_code,
response.text),
status=200)


but pipeline is having some specific format like below :

*"def slack_webhook_social_user(backend, uid, user=None, *args, **kwargs):*







*provider = backend.name social =
backend.strategy.storage.user.get_social_auth(provider, uid)if social
and not user:user = social.userreturn {'social': social,
'user': user,'is_new': user is None,
'new_association': social is None}"*



*My Question is how can i create webhook using pipeline function.*

*Thanks*,
*Saswat*

-- 
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/CAEhPkLGOAMO4SXXt2Fw8Pu_iEZkc7bx8XOJEQb6dKcepK8XQGA%40mail.gmail.com.


Re: Fedora 30 server (Configuring Postgresql with Django)

2019-10-30 Thread Siratim Mustaquim
Can You please check your DB configuration @hari49pf. As @carlos mentioned
there might be an error there.

[image: database.png]




On Wed, Oct 30, 2019 at 10:40 AM Kevin Jay  wrote:

> I meant to type ‘harish.b’
>
> On Tue, Oct 29, 2019 at 11:37 PM Kevin Jay  wrote:
>
>> Does the user ‘garish.b’ have a system password?
>>
>> On Tue, Oct 29, 2019 at 10:38 PM hari49pf  wrote:
>>
>>> Hi sir,
>>> I didn't understood, can u elaborate, I am new to django, Plz, help me
>>> out.
>>>
>>> regards.
>>> Harish.Bheemanpaly
>>>
>>> On Wednesday, October 30, 2019 at 1:21:50 AM UTC+5:30, sacrac wrote:

 Hi i see one error
 USERS is incorrect
 see the doc
 https://docs.djangoproject.com/en/2.2/ref/databases/#id12

 On Mon, Oct 28, 2019 at 11:15 PM Harish Bheemanpally 
 wrote:

>>>
> Hi,
>
> Please find the attachment, below are the screen shots of the setting
> & DB permissions please help me
>
>
> [image: Screenshot from 2019-10-29 10-40-47.png]
>
>
> [image: Screenshot from 2019-10-29 10-40-40.png]
>
>
> On Monday, October 28, 2019 at 7:57:47 PM UTC+5:30, sacrac wrote:
>>
>> You can show the settings and permissions of the DB, because the user
>> harish.b and harishb are different!
>>
>> On Mon, Oct 28, 2019 at 5:00 AM Motaz Hejaze 
>> wrote:
>>
>>> did you install all required packages for postgresql ?
>>>
>>>
>>> On Mon, Oct 28, 2019 at 12:55 PM Harish Bheemanpally <
>>> hari...@gmail.com> wrote:
>>>
 Yes it was running perfectly in sqllie & Mysql. But in postgresql i
 am unable to configure Djanog
 the postger server screen shot

 please let me know for any information requried


 Postgresql image with djanog

 [image: Screenshot from 2019-10-28 10-28-38.png]


 On Monday, October 28, 2019 at 2:12:08 PM UTC+5:30, Motaz Hejaze
 wrote:
>
> Does it run on sqlite ??
> You need to show the code
>
> On Mon, 28 Oct 2019, 8:10 am Harish Bheemanpally, <
> hari...@gmail.com> wrote:
>
>> There is not user with harish in *DB*(postgresql)
>>
>> [image: Screenshot from 2019-10-28 16-20-04.png]
>> the harish is the user of *OS*.
>>
>> As suggested by sacrac:
>>
>> I have created a new user in DB with the name harishb who is the
>> owner of the DB and changed the setting.py still raising same error
>> when i am trying to run migrate or run the django
>>
>> PLZ Help me.
>>
>> On Monday, October 28, 2019 at 9:04:03 AM UTC+5:30, sacrac wrote:
>>>
>>> Hi, Maybe you need change permission role user harish
>>> #ALTER ROLE harish CREATEROLE CREATEDB; or SUPERUSER;
>>>
>>> On Sun, Oct 27, 2019 at 11:58 AM Harish Bheemanpally <
>>> hari...@gmail.com> wrote:
>>>
 OS: Fedora30 server X64
 DB: Postgesql-12
 Django version:2.2.5
 connector: psycopg2.binary

 [image: Screenshot from 2019-10-27 13-20-35.png]

 i have configured the settings file in django folder, but
 unable to resolve the issue,
 need help.

 --
 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...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/d1eebb46-834f-4ee6-be50-7882ca72cbfd%40googlegroups.com
 
 .

>>>
>>>
>>> --
>>> att.
>>> Carlos Rocha
>>>
>> --
>> 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...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/3217ae2e-d0c7-4b6f-a06d-b1504ba29aa2%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 

Re: Query regarding Jija templates with django project

2019-10-30 Thread 'Amitesh Sahay' via Django users
Hey Red, 

Thank you for your reply.
Your suggestion did the trick. 
Now I am facing issues with static files, especially for CSS files. There were 
issues for images files, but I got that rectified. I know that the location 
that I have mentioned in the HTML pages has the CSS files. Still  I am getting 
the below error:

Not Found: /blog/contact/%{ static 'CSS/tooplate_style.css' %}
Not Found: /blog/contact/%{ static 'CSS/ddsmoothmenu.css' %}
[30/Oct/2019 10:41:07] "GET 
/blog/contact/%%7B%20static%20'CSS/tooplate_style.css'%20%%7D HTTP/1.1" 404 3124
[30/Oct/2019 10:41:07] "GET 
/blog/contact/%%7B%20static%20'CSS/ddsmoothmenu.css'%20%%7D HTTP/1.1" 404 3118
Not Found: /blog/contact/%{ static 'CSS/ddsmoothmenu.css' %}
[30/Oct/2019 10:41:07] "GET 
/blog/contact/%%7B%20static%20'CSS/ddsmoothmenu.css'%20%%7D HTTP/1.1" 404 3118

Below is the snippet of my static file settings:
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATICFILES_DIRS = (
   os.path.join(BASE_DIR, 'static'),
   )Below is my static dir structure as seen in my pycharm.


I went through below stackoverflow web link, but the suggestion don't seem to 
be working for me.
Django - Static file not found

| 
| 
| 
|  |  |

 |

 |
| 
|  | 
Django - Static file not found

I've seen several posts for this issue but didn't found my solution. I'm trying 
to serve static files within my...
 |

 |

 |




It would great if you could suggest .



Regards,
Amitesh
 

On Saturday, 26 October, 2019, 4:42:05 AM IST, red  
wrote:  
 
  
Hello,
 
Your views have a 'name' attribute. You can also give a name to an app in the 
urls.py file of the app, right above your urlpatterns list:
 app_name = "myappname"

urlpatterns = [
path('', views.index, name='index'),
path('about', views.about, name='about'),
path('blog', views.blog, name='blog'),

] 

 
 
Then, when you need to put a link to a another page in your template, use the 
following syntax:
 Home
About Us 
Regards,
 
 
Red
 On 25/10/2019 21:01, 'Amitesh Sahay' via Django users wrote:
  
 
  Hello Team, 
  
  I am kind of new to software development, and trying to find my feat. I have 
a queries which could be quite dumb to most of you, but I need to know.   As 
far as I know, we need Jija templates in the HTML files, so that we can assign 
correct path of the static files. 
  
  Its a general practice to create base.html and extend this in other HTML 
files. Since, I am new to development, so I want to do things in a stupid way, 
I have a HTML templates, and I do not wish to create base.html for now. 
Therefore, if I want to render the html page, I need to create views.py , 
urls.py, and modify the HTML pages to use 'static' any where required. Below 
are the snippet of my test environment. 
  views.py 
from django.shortcuts import render, get_object_or_404


def index(request):
return render(request, 'index.html')


def blog(request):
return render(request, 'blog.html')


def about(request):
return render(request, 'about.html')
  project/urls.py 
from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
path('admin/', admin.site.urls),
path('blog/', include('BLOG.urls'))
]

if settings.DEBUG:
   urlpatterns += static(settings.STATIC_URL, 
document_root=settings.STATIC_ROOT)  APP/urls.py 
from django.urls import path
from django.conf import settings
from . import views

urlpatterns = [
path('', views.index, name='index'),
path('about', views.about, name='about'),
path('blog', views.blog, name='blog'),

]  below is the HTML(index.html) file, which I modified as per my limited 
understanding. 
{% load staticfiles %}
{% block content %}

http://www.w3.org/1999/xhtml;>


Orange Theme - Free Website Template







   var flashvars = {};
   flashvars.xml_file = "photo_list.xml";
   var params = {};
   params.wmode = "transparent";
   var attributes = {};
   attributes.id = "slider";
   swfobject.embedSWF("flash_slider.swf", "flash_grid_slider", "440", "220", 
"9.0.0", false, flashvars, params, attributes);







/***
* Smooth Navigational Menu- (c) Dynamic Drive DHTML code library 
(www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***/





ddsmoothmenu.init({
   mainmenuid: "tooplate_menu", //menu DIV id
   orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
   classname: 'ddsmoothmenu', //class added to menu's outer DIV
   //customtheme: ["#1c5a80", "#18374a"],
   contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})







   
   
   Orange HTML Template


  
   
   Home
   

Re: Django leaflet

2019-10-30 Thread Derek
Have a look at https://django-leaflet.readthedocs.io/en/latest/


On Sunday, 27 October 2019 01:42:24 UTC+2, Perceval Maturure wrote:
>
>
> Hi all 
> How do u wire your template and view to display maps in Django leaflet 
>
> Sent from my iPhone 
>

-- 
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/1adcd73c-c39d-4c60-ae4d-26a7cf7dd68c%40googlegroups.com.


Re: Add filter to admin add page?

2019-10-30 Thread Derek
It is not clear if those fields can be used in the admin list interface 
drop-down filters - is there a link to documentation for that?

On Wednesday, 23 October 2019 16:13:13 UTC+2, Nelson Varela wrote:
>
> Or even better... whu not use django's own auto complete feature in the 
> admin: 
> https://docs.djangoproject.com/en/2.2/ref/contrib/admin/#django.contrib.admin.ModelAdmin.autocomplete_fields
>
> Op dinsdag 22 oktober 2019 00:07:40 UTC+2 schreef Wil Moskal:
>>
>> I have a model registered to the admin page, AuthUserFilePermissions, 
>> which consists of 2 foreign keys, a key to the defined groups, and a key to 
>> the filepatterns. Within the add AuthUserFilePermissions, there is a select 
>> for each. For the group this is fine, as there is only like 7-8. for the 
>> file patterns this is not good, as there are over 1000 file patterns. What 
>> I am trying to do is implement a search filter for the file pattern entry, 
>> similar to how in the add group page there is a filter for the permissions, 
>> around the select. Any Idea how I could complete this?
>>
>> On a side note, the fields that I am entering within my modelAdmins are 
>> not appearing on the add page, so it would also be good to know why not. 
>>
>

-- 
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/f1ba3570-dfdc-4b2e-b503-96112ba7aee3%40googlegroups.com.