Re: Improving your Stack Overflow score

2023-03-22 Thread ALBERT ASHABA AHEEBWA
Hahaha 藍,
You are not alone my friend.
There's a whole YouTube video about it here:

https://youtu.be/N7v0yvdkIHg

Take a look and rest assured you are not alone.


Best Regards,

Albert Ashaba Aheebwa
+256 781 435857

On Thu, 23 Mar 2023, 03:13 Michael Starr,  wrote:

> I don't get that website. There are assholes in the thousands, and
> good-intentioned people like me at <10.
> What is the deal? I don't even know what that site is for sometimes. The
> questions with good ratings are usually stupid and don't explain things
> correctly, with bad answers.
> It's a conspiracy!
> ;)
> Mike
>
> --
> 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/71ee6d23-b7d3-4e3d-8dd5-335ad3bfc3den%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/CAAQecPdvqU1%3Di%2B4kKB8cV6qJX6naqyv9nwmX0akOQoWwRNTbvw%40mail.gmail.com.


Improving your Stack Overflow score

2023-03-22 Thread Michael Starr
I don't get that website. There are assholes in the thousands, and 
good-intentioned people like me at <10.
What is the deal? I don't even know what that site is for sometimes. The 
questions with good ratings are usually stupid and don't explain things 
correctly, with bad answers.
It's a conspiracy!
;)
Mike

-- 
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/71ee6d23-b7d3-4e3d-8dd5-335ad3bfc3den%40googlegroups.com.


Re: Error: name 'include' is not defined

2023-03-22 Thread Larry Stevens
Perfect, problem solved.
Thank you so much Jeman, Harouna, and Robinson.
Greatly appreciated.

On Wednesday, March 22, 2023 at 11:16:58 AM UTC-4 Robinson wrote:

> import path, include
>
>
> On Wed, Mar 22, 2023 at 4:49 PM Harouna Diallo  wrote:
>
>> You must Import include : from django.urls import path, include
>>
>> On Wed, Mar 22, 2023 at 12:53 PM Larry Stevens  
>> wrote:
>>
>>> Hello,
>>>
>>> I'm brand new to Django taking an online course in Python.
>>> I created a project named 'django_test' and I'm in the process of 
>>> creating a very simple app named 'Hello_World'.
>>>
>>> I'm trying to modify the urls.py file in my 'django_test' project for 
>>> the app 'hello_world'.
>>> My code in urls.py follows:
>>> from django.contrib import admin
>>> from django.urls import path
>>> urlpatterns = [
>>> path('admin/', admin.site.urls),
>>> path('hello_world/', include('hello_world.urls'))
>>> ]
>>>
>>> The return error is name 'include' is not defined
>>>
>>> I tried to import include with the statement from django.conf.urls 
>>> import include
>>> which also failed.
>>>
>>> Thank you for reading my post.
>>>
>>> Larry Stevens
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to django-users...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/4e2c7426-b451-4542-9629-52d4f4707a94n%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...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CAO73PDopg--cbbBgX3OQuNwfp%3DyMpSf_Uzga894CXvzOAy1mAA%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/9d071aa8-0bec-4b1d-82a7-e34169bbd96bn%40googlegroups.com.


Re: Error: name 'include' is not defined

2023-03-22 Thread Robinson
import path, include


On Wed, Mar 22, 2023 at 4:49 PM Harouna Diallo 
wrote:

> You must Import include : from django.urls import path, include
>
> On Wed, Mar 22, 2023 at 12:53 PM Larry Stevens 
> wrote:
>
>> Hello,
>>
>> I'm brand new to Django taking an online course in Python.
>> I created a project named 'django_test' and I'm in the process of
>> creating a very simple app named 'Hello_World'.
>>
>> I'm trying to modify the urls.py file in my 'django_test' project for the
>> app 'hello_world'.
>> My code in urls.py follows:
>> from django.contrib import admin
>> from django.urls import path
>> urlpatterns = [
>> path('admin/', admin.site.urls),
>> path('hello_world/', include('hello_world.urls'))
>> ]
>>
>> The return error is name 'include' is not defined
>>
>> I tried to import include with the statement from django.conf.urls
>> import include
>> which also failed.
>>
>> Thank you for reading my post.
>>
>> Larry Stevens
>>
>> --
>> 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/4e2c7426-b451-4542-9629-52d4f4707a94n%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/CAO73PDopg--cbbBgX3OQuNwfp%3DyMpSf_Uzga894CXvzOAy1mAA%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/CAHs-6w6_shg-DEfGn_ASxdcXAJqFkZ3xO_YD7LTX1N-1U-CRnQ%40mail.gmail.com.


Re: Help on Django + Plotly integration

2023-03-22 Thread 'Kasper Laudrup' via Django users

On 22/03/2023 15.29, Praveen Kumar wrote:

Hi Team,

I need help in implementing Plotly with Django for interactive dashboards.

Please suggest.



Try following this:

https://googlethatforyou.com?q=plotly%20django

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/93cd0647-cf85-e209-07f0-580c72a84cc2%40stacktrace.dk.


OpenPGP_0xE5D9CAC64AAA55EB.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Help on Django + Plotly integration

2023-03-22 Thread Praveen Kumar
Hi Team,

I need help in implementing Plotly with Django for interactive dashboards.

Please suggest.

Thanks & Regards,
Praveen

-- 
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/f4a11d66-f269-4e02-b3fe-a056d4a972ecn%40googlegroups.com.


Clickable link in django admin Panel

2023-03-22 Thread Gurami Tchumburidze


I have problem to display clickable link in django admin panel next to 
'icon' field or add help_text witch will be clickable and if i click on it, 
it must open this 'https://fonts.google.com/icons?icon.set=Material+Icons' 
website in new window of browther .

[image: .PNG]

link example : https://fonts.google.com/icons?icon.set=Material+Icons

I tried this but nothing happens, it shows just normal models without link 
and text.

**admin.py **
from .models import RaffleGame from django.utils.html import format_html 
from django.urls import reverse from django.contrib import admin class 
RaffleGameAdmin(admin.ModelAdmin): list_display = ('icon', 'link_to_google') 
def link_to_google(self, obj): url = 
'https://fonts.google.com/icons?icon.set=Material+Icons' link_text = 'click 
me for more info' return format_html('{}', url, link_text) 
link_to_google.short_description = 'Mehr Icons findest du hier' 
admin.site.register(RaffleGame, RaffleGameAdmin) 

*models.py*
class RaffleGame(models.Model): class GameStatus(models.TextChoices): 
scheduled = 'scheduled' announced = 'announced' draw_day = 'draw_day' drawn 
= 'drawn' finished = 'finished' class IconColor(models.TextChoices): red = 
'red' yellow = 'yellow' black = 'black' green = 'green' title = models.
CharField(max_length=500, default='PiA-Gewinnspiel', verbose_name='Titel') 
status = models.CharField(max_length=100, choices=GameStatus.choices, 
default=GameStatus.scheduled, verbose_name='Status', editable=False) 
announcement_date = models.DateField(verbose_name='Spiel ankündigen ab') 
draw_date = models.DateTimeField(verbose_name='Zeitpunkt der Auslosung') 
finished_date = models.DateField(verbose_name='Gewinner anzeigen bis') icon 
= models.CharField(max_length=100, default='park', verbose_name='Icon') 
icon_color = models.CharField(max_length=100, choices=IconColor.choices, 
default=IconColor.black, verbose_name='Icon Farbe') icon_outlined = models.
BooleanField(default=False, verbose_name='Icon outlined') class Meta: 
db_table = "RaffleGame" def __str__(self): return self.title

-- 
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/634c7481-842c-4eb7-b198-57c7d5bc3a66n%40googlegroups.com.


Re: Error: name 'include' is not defined

2023-03-22 Thread Harouna Diallo
You must Import include : from django.urls import path, include

On Wed, Mar 22, 2023 at 12:53 PM Larry Stevens 
wrote:

> Hello,
>
> I'm brand new to Django taking an online course in Python.
> I created a project named 'django_test' and I'm in the process of creating
> a very simple app named 'Hello_World'.
>
> I'm trying to modify the urls.py file in my 'django_test' project for the
> app 'hello_world'.
> My code in urls.py follows:
> from django.contrib import admin
> from django.urls import path
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('hello_world/', include('hello_world.urls'))
> ]
>
> The return error is name 'include' is not defined
>
> I tried to import include with the statement from django.conf.urls
> import include
> which also failed.
>
> Thank you for reading my post.
>
> Larry Stevens
>
> --
> 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/4e2c7426-b451-4542-9629-52d4f4707a94n%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/CAO73PDopg--cbbBgX3OQuNwfp%3DyMpSf_Uzga894CXvzOAy1mAA%40mail.gmail.com.


Re: Error: name 'include' is not defined

2023-03-22 Thread Jeman Kumar
hi, replace the line "from django.urls import path" to "from django.urls
import path, include"

On Wed, 22 Mar, 2023, 6:22 pm Larry Stevens,  wrote:

> Hello,
>
> I'm brand new to Django taking an online course in Python.
> I created a project named 'django_test' and I'm in the process of creating
> a very simple app named 'Hello_World'.
>
> I'm trying to modify the urls.py file in my 'django_test' project for the
> app 'hello_world'.
> My code in urls.py follows:
> from django.contrib import admin
> from django.urls import path
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('hello_world/', include('hello_world.urls'))
> ]
>
> The return error is name 'include' is not defined
>
> I tried to import include with the statement from django.conf.urls
> import include
> which also failed.
>
> Thank you for reading my post.
>
> Larry Stevens
>
> --
> 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/4e2c7426-b451-4542-9629-52d4f4707a94n%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/CALmE1TsP%2BkUP8XKc8-h-ambaiX7mkHfF%3DqSWOFzTY0iqFG4q9w%40mail.gmail.com.


Re: Django error while running

2023-03-22 Thread James Kalu
I think it ushould be 'rest_framework' in settings.py under installed apps.


On Wednesday, March 22, 2023 at 4:50:30 AM UTC+3 David Nugent wrote:

> Any traceback with this at the end:
>
>   _bootstrap._gcd_import(name[level..], package, level)
>
> Is almost always is due to a problem with your settings INSTALLED_APPS, 
> particularly if django\apps\registry.py Is further up the trace.
>
> A missing comma between items, perhaps?
>
> It would indeed be nice if Django would output a more sensible error 
> message for issues like this  
> Hmm, an idea for a useful PR right there. Seems to be common issue (since 
> the very next message I read in this mail list is exactly the same thing).
>
> Regards,
> David
>
>
> "Chandresh . T"  writes
>
> Recently I was running a git clone (
> https://github.com/divanov11/StudyBud.git)
>
> after doing required steps like migrations, etc. I started to run it by 
> (python manage.py runserver) but I got this error.
>
> can anyone help me with this, please?
>
>
>
>

-- 
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/c8c4bdcf-b242-4104-b5f5-ecc235790366n%40googlegroups.com.


Error: name 'include' is not defined

2023-03-22 Thread Larry Stevens
Hello,

I'm brand new to Django taking an online course in Python.
I created a project named 'django_test' and I'm in the process of creating 
a very simple app named 'Hello_World'.

I'm trying to modify the urls.py file in my 'django_test' project for the 
app 'hello_world'.
My code in urls.py follows:
from django.contrib import admin
from django.urls import path
urlpatterns = [
path('admin/', admin.site.urls),
path('hello_world/', include('hello_world.urls'))
]

The return error is name 'include' is not defined

I tried to import include with the statement from django.conf.urls 
import include
which also failed.

Thank you for reading my post.

Larry Stevens

-- 
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/4e2c7426-b451-4542-9629-52d4f4707a94n%40googlegroups.com.


Re: Django Channels 2 Group_send to channel layer causes runtime error: "got Future attached to a different loop"

2023-03-22 Thread raed
how did you test it ? did you use a specific cmd to excute ?

Le vendredi 16 février 2018 à 22:08:55 UTC+1, Luke Hebert a écrit :

> Trying to call the "alert_receive" consumer method
>
> import json
> from channels.consumer import SyncConsumer
> from channels.exceptions import StopConsumer
> from asgiref.sync import async_to_sync
> from channels.layers import get_channel_layer
>
> class ClientAlertPtrConsumer(SyncConsumer): 
> def websocket_connect(self, event):
> async_to_sync(self.channel_layer.group_add)("AlertReceivers", self
> .channel_name)
> self.send({
> "type": "websocket.accept",
> })
> 
> def websocket_receive(self, event):
> content = json.dumps("received")
> async_to_sync(self.channel_layer.group_send)("AlertReceivers", {
> "type":"alert.receive"})
> 
> def websocket_disconnect(self, event):
> async_to_sync(self.channel_layer.group_discard)("AlertReceivers", 
> self.channel_name)
> raise StopConsumer
> 
> def alert_receive(self, event): # Get a message on 
> the alert.receive type
> content = json.dumps("Group send working")
> self.send({
> "type":"websocket.send",# then send a message 
> out on websocket protocol to whatever the 'self' channel is. 
> "text":content,
> })
>
> from *outside this consumer class *using the approach in documentation 
> like this
>
> from asgiref.sync import async_to_sync
> from channels.layers import get_channel_layer
> channel_layer = get_channel_layer()
>
> async_to_sync(channel_layer.group_send)("AlertReceivers", 
> {'type':"alert.receive"})
>
>
> and getting the following traceback having to do with the 
> concurrent.futures module:
>
> Traceback (most recent call last):
>   File "/usr/lib/python3.5/code.py", line 91, in runcode
> exec(code, self.locals)
>   File "", line 1, in 
>   File "/usr/local/lib/python3.5/dist-packages/asgiref/sync.py", line 49, 
> in __call__
> return call_result.result()
>   File "/usr/lib/python3.5/concurrent/futures/_base.py", line 398, in 
> result
> return self.__get_result()
>   File "/usr/lib/python3.5/concurrent/futures/_base.py", line 357, in 
> __get_result
> raise self._exception
>   File "/usr/local/lib/python3.5/dist-packages/asgiref/sync.py", line 63, 
> in main_wrap
> result = await self.awaitable(*args, **kwargs)
>   File "/usr/local/lib/python3.5/dist-packages/channels_redis/core.py", 
> line 313, in group_send
> pool = await self.connection(self.consistent_hash(group))
>   File "/usr/local/lib/python3.5/dist-packages/channels_redis/core.py", 
> line 377, in connection
> self.pools[index] = await 
> aioredis.create_redis_pool(**self.hosts[index])
>   File 
> "/usr/local/lib/python3.5/dist-packages/aioredis/commands/__init__.py", 
> line 197, in create_redis_pool
> loop=loop)
>   File "/usr/local/lib/python3.5/dist-packages/aioredis/pool.py", line 59, 
> in create_pool
> await pool.wait_closed()
>   File "/usr/local/lib/python3.5/dist-packages/aioredis/pool.py", line 
> 177, in wait_closed
> await asyncio.shield(self._close_waiter, loop=self._loop)
>   File "/usr/lib/python3.5/asyncio/futures.py", line 361, in __iter__
> yield self  # This tells Task to wait for completion.
> RuntimeError: Task  /usr/local/lib/python3.5/dist-packages/asgiref/sync.py:63> 
> cb=[_run_until_complete_cb() at 
> /usr/lib/python3.5/asyncio/base_events.py:164]> got Future  
> attached to a different loop
>
>
>
> Note that the 
> async_to_sync(channel_layer.group_send)("AlertReceivers", {'type':
> "alert.receive"})
>
> *within the websocket_receive method of the consumer class *works well*, 
> *sending 
> the event out onto redis-based channel layers and then sending json encoded 
> "Group send working" WS message to client. 
>
>
>

-- 
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/e53418ed-daea-41fc-88e5-cdf5602d5859n%40googlegroups.com.


Re: Django error while running

2023-03-22 Thread Chandresh . T
I just added apps and templates, static file locations.


On Wed, 22 Mar 2023 at 17:36, Ahmad Abdulnasir Shuaib <
ahmadabdulnas...@gmail.com> wrote:

> It looks like you mistakenly alter your settings, check your
> INSTALLED_APPS in settings.py
>
> ModuleNotFoundError: No module named 'rest_frameworkdjango'
>
> There should be a comma between rest_framework and django
>
> On Wed, Mar 22, 2023, 12:18 PM Chandresh . T 
> wrote:
>
>> Hello all! This is the setting file of the project and I actually
>> installed requirement.txt already. In that it said "already installed
>> rest_framework" but while running it shows an error that no module called
>> rest_framework is installed.
>>
>> On Wed, 22 Mar 2023 at 07:20, David Nugent  wrote:
>>
>>> Any traceback with this at the end:
>>>
>>>   _bootstrap._gcd_import(name[level..], package, level)
>>>
>>> Is almost always is due to a problem with your settings INSTALLED_APPS,
>>> particularly if django\apps\registry.py Is further up the trace.
>>>
>>> A missing comma between items, perhaps?
>>>
>>> It would indeed be nice if Django would output a more sensible error
>>> message for issues like this 
>>> Hmm, an idea for a useful PR right there. Seems to be common issue
>>> (since the very next message I read in this mail list is exactly the same
>>> thing).
>>>
>>> Regards,
>>> David
>>>
>>>
>>> "Chandresh . T"  writes
>>>
>>> Recently I was running a git clone (
>>> https://github.com/divanov11/StudyBud.git)
>>>
>>> after doing required steps like migrations, etc. I started to run it by
>>> (python manage.py runserver) but I got this error.
>>>
>>> can anyone help me with this, please?
>>>
>>>
>>>
>>> --
>>> 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/em0481748f-3902-4383-be37-4f591c38c5c5%4090728edb.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/CA%2BPOfqNs%2B9ih8ehTKq%2BoyG%3DZyK70WOWi4XJidGA9OY9rt2gqwQ%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/CAE9AdkY%2B6vKjY2b6Ag5Xr3pbHYWGZh8FT4_7P%2BYM_EiFzbcs-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/CA%2BPOfqNNANuQUnb34gk8XF2Dx4vKLJ24LWsn_%3D97Hfh-duvrbQ%40mail.gmail.com.


Re: Django error while running

2023-03-22 Thread Ahmad Abdulnasir Shuaib
It looks like you mistakenly alter your settings, check your INSTALLED_APPS
in settings.py

ModuleNotFoundError: No module named 'rest_frameworkdjango'

There should be a comma between rest_framework and django

On Wed, Mar 22, 2023, 12:18 PM Chandresh . T 
wrote:

> Hello all! This is the setting file of the project and I actually
> installed requirement.txt already. In that it said "already installed
> rest_framework" but while running it shows an error that no module called
> rest_framework is installed.
>
> On Wed, 22 Mar 2023 at 07:20, David Nugent  wrote:
>
>> Any traceback with this at the end:
>>
>>   _bootstrap._gcd_import(name[level..], package, level)
>>
>> Is almost always is due to a problem with your settings INSTALLED_APPS,
>> particularly if django\apps\registry.py Is further up the trace.
>>
>> A missing comma between items, perhaps?
>>
>> It would indeed be nice if Django would output a more sensible error
>> message for issues like this 
>> Hmm, an idea for a useful PR right there. Seems to be common issue (since
>> the very next message I read in this mail list is exactly the same thing).
>>
>> Regards,
>> David
>>
>>
>> "Chandresh . T"  writes
>>
>> Recently I was running a git clone (
>> https://github.com/divanov11/StudyBud.git)
>>
>> after doing required steps like migrations, etc. I started to run it by
>> (python manage.py runserver) but I got this error.
>>
>> can anyone help me with this, please?
>>
>>
>>
>> --
>> 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/em0481748f-3902-4383-be37-4f591c38c5c5%4090728edb.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/CA%2BPOfqNs%2B9ih8ehTKq%2BoyG%3DZyK70WOWi4XJidGA9OY9rt2gqwQ%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/CAE9AdkY%2B6vKjY2b6Ag5Xr3pbHYWGZh8FT4_7P%2BYM_EiFzbcs-g%40mail.gmail.com.


Re: Django error while running

2023-03-22 Thread Chandresh . T
Hello all! This is the setting file of the project and I actually installed
requirement.txt already. In that it said "already installed rest_framework"
but while running it shows an error that no module called rest_framework is
installed.

On Wed, 22 Mar 2023 at 07:20, David Nugent  wrote:

> Any traceback with this at the end:
>
>   _bootstrap._gcd_import(name[level..], package, level)
>
> Is almost always is due to a problem with your settings INSTALLED_APPS,
> particularly if django\apps\registry.py Is further up the trace.
>
> A missing comma between items, perhaps?
>
> It would indeed be nice if Django would output a more sensible error
> message for issues like this 
> Hmm, an idea for a useful PR right there. Seems to be common issue (since
> the very next message I read in this mail list is exactly the same thing).
>
> Regards,
> David
>
>
> "Chandresh . T"  writes
>
> Recently I was running a git clone (
> https://github.com/divanov11/StudyBud.git)
>
> after doing required steps like migrations, etc. I started to run it by
> (python manage.py runserver) but I got this error.
>
> can anyone help me with this, please?
>
>
>
> --
> 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/em0481748f-3902-4383-be37-4f591c38c5c5%4090728edb.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/CA%2BPOfqNs%2B9ih8ehTKq%2BoyG%3DZyK70WOWi4XJidGA9OY9rt2gqwQ%40mail.gmail.com.
"""
Django settings for studybud project.

Generated by 'django-admin startproject' using Django 3.2.7.

For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""

from pathlib import Path

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-3#av2c6nptlbbb6^muqkchu$t2+g$v!ir-f5%doocb'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',

'base.apps.BaseConfig',

'rest_framework',
"corsheaders",
]

AUTH_USER_MODEL = 'base.User'

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',

"corsheaders.middleware.CorsMiddleware",

'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'studybud.urls'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
BASE_DIR / 'templates'
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]

WSGI_APPLICATION = 'studybud.wsgi.application'


# Database
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}


# Password validation
# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME':