Re: why get_object_or_404 error is not using translation?

2024-05-19 Thread Natraj Kavander
Thank you

On Sun, May 19, 2024, 1:48 AM Hossein Mahdavipour 
wrote:

> Hi.
> I am using DRF with django. In views  I use get_object_or_404. When I get
> a 404, the exception detail is "No %s matches the given query."
> You can see the code here:
> https://github.com/django/django/blob/8f205acea94e93a463109e08814f78c09307f2b9/django/shortcuts.py#L88
> My question is why it does not use translation? I searched the web but I
> found nothing on why it does not use translation.
> Also I like to know, how can I use a workaround to get a translated error
> when getting 404 without try except in all views.
>
> Thanks in advanced.
>
> --
> 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/d1b93300-9f52-4c24-9ab9-dcfc5038200bn%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/d1b93300-9f52-4c24-9ab9-dcfc5038200bn%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAHZhoBOGYXm6qdKJRtpWFVHPdods3FQDQotbJMdY7A-9KudMsA%40mail.gmail.com.


why get_object_or_404 error is not using translation?

2024-05-18 Thread Hossein Mahdavipour
Hi.
I am using DRF with django. In views  I use get_object_or_404. When I get a 
404, the exception detail is "No %s matches the given query."
You can see the code here: 
https://github.com/django/django/blob/8f205acea94e93a463109e08814f78c09307f2b9/django/shortcuts.py#L88
My question is why it does not use translation? I searched the web but I 
found nothing on why it does not use translation.
Also I like to know, how can I use a workaround to get a translated error 
when getting 404 without try except in all views.

Thanks in advanced.

-- 
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/d1b93300-9f52-4c24-9ab9-dcfc5038200bn%40googlegroups.com.


DO you know that error I been trying to fox it since 6 hours with no udaptes

2024-05-12 Thread Yann
 TemplateDoesNotExist at /login/ usagers/login.html 
Request Method: 
GET 
Request URL: 
http://127.0.0.1:8000/login/ 
Django Version: 
4.0.3 
Exception Type: 
TemplateDoesNotExist 
Exception Value: 
usagers/login.html 
Exception Location: 
C:\Users\Yann\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\template\loader.py,
 
line 47, in select_template 
Python Executable: 
C:\Users\Yann\AppData\Local\Programs\Python\Python312\python.exe 
Python Version: 
3.12.1 
Python Path: 
['C:\\Pwd-H2024\\critiques_gastronomiques', 
'C:\\Users\\Yann\\AppData\\Local\\Programs\\Python\\Python312\\python312.zip', 
'C:\\Users\\Yann\\AppData\\Local\\Programs\\Python\\Python312\\DLLs', 
'C:\\Users\\Yann\\AppData\\Local\\Programs\\Python\\Python312\\Lib', 
'C:\\Users\\Yann\\AppData\\Local\\Programs\\Python\\Python312', 
'C:\\Users\\Yann\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-packages']
 

Server time: 
Sun, 12 May 2024 13:03:44 + 
Template-loader postmortem 

Django tried loading these templates, in this order:

Using engine django:

   - django.template.loaders.filesystem.Loader: 
   
C:\Pwd-H2024\critiques_gastronomiques\critique_gastronomiques\templates\usagers\login.html
 
   (Source does not exist) 
   - django.template.loaders.filesystem.Loader: 
   
C:\Pwd-H2024\critiques_gastronomiques\restaurants\templates\usagers\login.html 
   (Source does not exist) 
   - django.template.loaders.app_directories.Loader: 
   
C:\Users\Yann\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\contrib\admin\templates\usagers\login.html
 
   (Source does not exist) 
   - django.template.loaders.app_directories.Loader: 
   
C:\Users\Yann\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\contrib\auth\templates\usagers\login.html
 
   (Source does not exist) 
   - django.template.loaders.app_directories.Loader: 
   
C:\Pwd-H2024\critiques_gastronomiques\restaurants\templates\usagers\login.html 
   (Source does not exist)
   - 
   

-- 
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/c2726951-bcb7-421f-9f5e-9562f726f564n%40googlegroups.com.


Re: Problem to style form fields with error

2024-04-25 Thread Guido Luis Dalla Vecchia
Here I attach the relevant parts of the files "views.py", "index.html" and 
"forms.py" so you can check them out.

Thanks!

El jueves, 25 de abril de 2024 a las 11:36:03 UTC-3, Ryan Nowakowski 
escribió:

> Can you share some code snippets?
>
>
> On April 24, 2024 6:28:18 PM CDT, Guido Luis Dalla Vecchia <
> gld...@gmail.com> wrote:
>
>> Hello! I'm building my first website with Django and I've been stuck for 
>> the past two months with a problem I can't figure out.
>> My website has a form with three fields that allow the user to input his 
>> first name, last name and email.
>> In my "forms.py" file, I've declared "clean" methods for each field, that 
>> add the "error" class to them if they don't pass the validation.
>> In my CSS file, I declared a rule that applies the "background-color: 
>> lightcoral" to all elements with the class ".error".
>> The problem is that, when I fill in the "last name" field with invalid 
>> data, the "first name" field gets marked as invalid too.
>> I've tried everything I could think of, and nothing has worked. It's 
>> driving me crazy!! Has anyone ever seen something like this?
>>
>> Pleas 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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0e076efc-5da3-4020-8b80-d9a9b7b4b861n%40googlegroups.com.
from django.shortcuts import render
from .forms import AppointmentForm

def home(request):

if request.method == "POST":
form = AppointmentForm(request.POST)

if form.is_valid():
form.save()
return render(request, "home/index2.html", {"form": form})
   

else:

form = AppointmentForm()

return render(request, "home/index2.html", {"form": form})

{% csrf_token %}

{{ form.non_field_errors }}
   



{{ form.name }}



{{ form.last_name }}



{{ form.email }}


from django import forms
from .models import Appointment

class AppointmentForm(forms.ModelForm):

class Meta:
model = Appointment
fields = ['name', 'last_name', 'email']
widgets = {
"name": forms.TextInput(attrs={"class": "form-control"}),
"last_name": forms.TextInput(attrs={"class": "form-control"}),
"email": forms.EmailInput(attrs={"class": "form-control"}),
}

def clean_name(self):
name = self.cleaned_data['name']

if not name.isalpha():
self.fields['name'].widget.attrs['class'] += ' error'
raise forms.ValidationError("Please, input only letters", code="carac_esp")


return name

def clean_last_name(self):
last_name = self.cleaned_data["last_name"]

if not last_name.isalpha():
self.fields['last_name'].widget.attrs['class'] += ' error'
    raise forms.ValidationError("Please, input only letters", code="carac_esp")

return last_name

def clean_email(self):
email = self.cleaned_data["email"]
allowed_domains = ['gmail.com', 'hotmail.com', 'yahoo.com']

if not any(email.endswith(dominio) for dominio in allowed_domains):
self.fields['email'].widget.attrs['class'] += ' error'
raise forms.ValidationError("Please, input a valid email address", code="invalid_email")

return email


Problem to style form fields with error

2024-04-24 Thread Guido Luis Dalla Vecchia
Hello! I'm building my first website with Django and I've been stuck for 
the past two months with a problem I can't figure out.
My website has a form with three fields that allow the user to input his 
first name, last name and email.
In my "forms.py" file, I've declared "clean" methods for each field, that 
add the "error" class to them if they don't pass the validation.
In my CSS file, I declared a rule that applies the "background-color: 
lightcoral" to all elements with the class ".error".
The problem is that, when I fill in the "last name" field with invalid 
data, the "first name" field gets marked as invalid too.
I've tried everything I could think of, and nothing has worked. It's 
driving me crazy!! Has anyone ever seen something like this?

Pleas 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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/27559637-bab0-4d96-80f8-dd2a565fccd8n%40googlegroups.com.


RESET PASSWORD ERROR IN DJNAGO

2024-02-08 Thread Benjamini Athanas
Hellow , guys how to fix this problem  NoReverseMatch at 
/auth/reset/OTM/set-password/Reverse for 'password_reset_complete' not 
found. 'password_reset_complete' is not a valid view function or pattern 
name.

-- 
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/2e99f77b-f4d8-42a8-a6fd-b57a009cd233n%40googlegroups.com.


Re: Error while running '$ python manage.py collectstatic --noinput'.

2023-12-19 Thread ram.mu...@gmail.com
Hi Ihor,

Thank you for your email. We do not have any reference to heroku but 
Digital Oceanś App platform is using heroku. We resolved  the above error 
by adding this environment variable:

DISABLE_COLLECTSTATIC = 1
But we are planning to enable this once the main deployment is done.

Best Regards,
~Ram


On Monday, December 18, 2023 at 3:02:47 PM UTC-7 Ihor Dmytrenko wrote:

> Why you have heroku in your log? Remove all old dependency configs in your 
> settings first and then you need specify 
>
> ```python
> STATICFILES_DIRS = [
> os.path.join(BASE_DIR, 'static'),
> ]
>
> STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
> STATIC_URL = '/static/'
>
> HOME_DIRECTORY_SELF_STORAGE = os.path.expanduser('~')
> MEDIA_ROOT = os.path.join(HOME_DIRECTORY_SELF_STORAGE, 'public_html/')
> MEDIA_URL = '/media/'
> DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
> ```
>

-- 
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/dd8bd37a-b000-4872-b56b-06487410665an%40googlegroups.com.


Re: Error while running '$ python manage.py collectstatic --noinput'.

2023-12-18 Thread Ihor Dmytrenko
Why you have heroku in your log? Remove all old dependency configs in your 
settings first and then you need specify 

```python
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
]

STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATIC_URL = '/static/'

HOME_DIRECTORY_SELF_STORAGE = os.path.expanduser('~')
MEDIA_ROOT = os.path.join(HOME_DIRECTORY_SELF_STORAGE, 'public_html/')
MEDIA_URL = '/media/'
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
```

-- 
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/0b8908fe-76da-4712-9f73-7ce73499de4dn%40googlegroups.com.


Re: Error while running '$ python manage.py collectstatic --noinput'.

2023-12-16 Thread ram.mu...@gmail.com
Here is the static files setting that we have in our settings.py file:


*STATIC_URL = '/static/'STATIC_ROOT = os.path.join(BASE_DIR, 'static')*
On Saturday, December 16, 2023 at 7:02:46 PM UTC-7 Ram wrote:

> Hi,
>
> Did anyone hit this error before during production server or any type of 
> deployment. We tried deployment using Digital Oceanś App platform as a 
> pre-prod deployment to check whether this App platform is feasible for our 
> Django web site, but we are hitting this error no matter what ever 
> modification we change in settings.py to avoid this error. Tried a lot of 
> Google search results to address this issue, but no luck so far. We are 
> wondering whether anyone has any recommendations on this error. If you did 
> not try Digital Oceanś app platform, what would be your recommendation for 
> production server deployment? We are planning to use only app platforms to 
> avoid infrastructure overhead.
>
>
>> [2023-12-17 01:40:06] │ -> $ python manage.py collectstatic --noinput
>> [2023-12-17 01:40:06] │Traceback (most recent call last):
>> [2023-12-17 01:40:06] │  File "/workspace/manage.py", line 23, in 
>> 
>> [2023-12-17 01:40:06] │execute_from_command_line(sys.argv)
>> [2023-12-17 01:40:06] │  File 
>> "/app/.heroku/python/lib/python3.11/site-packages/django/core/management/__init__.py",
>>  
>> line 446, in execute_from_command_line
>> [2023-12-17 01:40:06] │utility.execute()
>> [2023-12-17 01:40:06] │  File 
>> "/app/.heroku/python/lib/python3.11/site-packages/django/core/management/__init__.py",
>>  
>> line 420, in execute
>> [2023-12-17 01:40:06] │django.setup()
>> [2023-12-17 01:40:06] │  File 
>> "/app/.heroku/python/lib/python3.11/site-packages/django/__init__.py", line 
>> 24, in setup
>> [2023-12-17 01:40:06] │apps.populate(settings.INSTALLED_APPS)
>> [2023-12-17 01:40:06] │  File 
>> "/app/.heroku/python/lib/python3.11/site-packages/django/apps/registry.py", 
>> line 91, in populate
>> [2023-12-17 01:40:06] │app_config = AppConfig.create(entry)
>> [2023-12-17 01:40:06] │ ^^^
>> [2023-12-17 01:40:06] │  File 
>> "/app/.heroku/python/lib/python3.11/site-packages/django/apps/config.py", 
>> line 228, in create
>> [2023-12-17 01:40:06] │import_module(entry)
>> [2023-12-17 01:40:06] │  File 
>> "/app/.heroku/python/lib/python3.11/importlib/__init__.py", line 126, in 
>> import_module
>> [2023-12-17 01:40:06] │return 
>> _bootstrap._gcd_import(name[level:], package, level)
>> [2023-12-17 01:40:06] │   
>> 
>> [2023-12-17 01:40:06] │  File "", 
>> line 1204, in _gcd_import
>> [2023-12-17 01:40:06] │  File "", 
>> line 1176, in _find_and_load
>> [2023-12-17 01:40:06] │  File "", 
>> line 1147, in _find_and_load_unlocked
>> [2023-12-17 01:40:06] │  File "", 
>> line 690, in _load_unlocked
>> [2023-12-17 01:40:06] │  File "> importlib._bootstrap_external>", line 940, in exec_module
>> [2023-12-17 01:40:06] │  File "", 
>> line 241, in _call_with_frames_removed
>> [2023-12-17 01:40:06] │  File 
>> "/app/.heroku/python/lib/python3.11/site-packages/django_tables2/__init__.py",
>>  
>> line 1, in 
>> [2023-12-17 01:40:06] │from .columns import (
>> [2023-12-17 01:40:06] │  File 
>> "/app/.heroku/python/lib/python3.11/site-packages/django_tables2/columns/__init__.py",
>>  
>> line 8, in 
>> [2023-12-17 01:40:06] │from .jsoncolumn import JSONColumn
>> [2023-12-17 01:40:06] │  File 
>> "/app/.heroku/python/lib/python3.11/site-packages/django_tables2/columns/jsoncolumn.py",
>>  
>> line 11, in 
>> [2023-12-17 01:40:06] │from django.contrib.postgres.fields 
>> import HStoreField
>> [2023-12-17 01:40:06] │  File 
>> "/app/.heroku/python/lib/python3.11/site-packages/django/contrib/postgres/fields/__init__.py",
>>  
>> line 1, in 
>> [2023-12-17 01:40:06] │from .array import *  # NOQA
>> [2023-12-17 01:40:06] │
>> [2023-12-17 01:40:06] │  File 
>> "/app/.heroku/python/lib/python3.11/site-packages/django/contrib/postgres/fields/array.py&q

Error while running '$ python manage.py collectstatic --noinput'.

2023-12-16 Thread Ram
Hi,

Did anyone hit this error before during production server or any type of
deployment. We tried deployment using Digital Oceanś App platform as a
pre-prod deployment to check whether this App platform is feasible for our
Django web site, but we are hitting this error no matter what ever
modification we change in settings.py to avoid this error. Tried a lot of
Google search results to address this issue, but no luck so far. We are
wondering whether anyone has any recommendations on this error. If you did
not try Digital Oceanś app platform, what would be your recommendation for
production server deployment? We are planning to use only app platforms to
avoid infrastructure overhead.


> [2023-12-17 01:40:06] │ -> $ python manage.py collectstatic --noinput
> [2023-12-17 01:40:06] │Traceback (most recent call last):
> [2023-12-17 01:40:06] │  File "/workspace/manage.py", line 23, in
> 
> [2023-12-17 01:40:06] │execute_from_command_line(sys.argv)
> [2023-12-17 01:40:06] │  File
> "/app/.heroku/python/lib/python3.11/site-packages/django/core/management/__init__.py",
> line 446, in execute_from_command_line
> [2023-12-17 01:40:06] │utility.execute()
> [2023-12-17 01:40:06] │  File
> "/app/.heroku/python/lib/python3.11/site-packages/django/core/management/__init__.py",
> line 420, in execute
> [2023-12-17 01:40:06] │django.setup()
> [2023-12-17 01:40:06] │  File
> "/app/.heroku/python/lib/python3.11/site-packages/django/__init__.py", line
> 24, in setup
> [2023-12-17 01:40:06] │apps.populate(settings.INSTALLED_APPS)
> [2023-12-17 01:40:06] │  File
> "/app/.heroku/python/lib/python3.11/site-packages/django/apps/registry.py",
> line 91, in populate
> [2023-12-17 01:40:06] │app_config = AppConfig.create(entry)
> [2023-12-17 01:40:06] │ ^^^
> [2023-12-17 01:40:06] │  File
> "/app/.heroku/python/lib/python3.11/site-packages/django/apps/config.py",
> line 228, in create
> [2023-12-17 01:40:06] │import_module(entry)
> [2023-12-17 01:40:06] │  File
> "/app/.heroku/python/lib/python3.11/importlib/__init__.py", line 126, in
> import_module
> [2023-12-17 01:40:06] │return
> _bootstrap._gcd_import(name[level:], package, level)
> [2023-12-17 01:40:06] │
> 
> [2023-12-17 01:40:06] │  File "",
> line 1204, in _gcd_import
> [2023-12-17 01:40:06] │  File "",
> line 1176, in _find_and_load
> [2023-12-17 01:40:06] │  File "",
> line 1147, in _find_and_load_unlocked
> [2023-12-17 01:40:06] │  File "",
> line 690, in _load_unlocked
> [2023-12-17 01:40:06] │  File " importlib._bootstrap_external>", line 940, in exec_module
> [2023-12-17 01:40:06] │  File "",
> line 241, in _call_with_frames_removed
> [2023-12-17 01:40:06] │  File
> "/app/.heroku/python/lib/python3.11/site-packages/django_tables2/__init__.py",
> line 1, in 
> [2023-12-17 01:40:06] │from .columns import (
> [2023-12-17 01:40:06] │  File
> "/app/.heroku/python/lib/python3.11/site-packages/django_tables2/columns/__init__.py",
> line 8, in 
> [2023-12-17 01:40:06] │from .jsoncolumn import JSONColumn
> [2023-12-17 01:40:06] │  File
> "/app/.heroku/python/lib/python3.11/site-packages/django_tables2/columns/jsoncolumn.py",
> line 11, in 
> [2023-12-17 01:40:06] │from django.contrib.postgres.fields
> import HStoreField
> [2023-12-17 01:40:06] │  File
> "/app/.heroku/python/lib/python3.11/site-packages/django/contrib/postgres/fields/__init__.py",
> line 1, in 
> [2023-12-17 01:40:06] │from .array import *  # NOQA
> [2023-12-17 01:40:06] │
> [2023-12-17 01:40:06] │  File
> "/app/.heroku/python/lib/python3.11/site-packages/django/contrib/postgres/fields/array.py",
> line 3, in 
> [2023-12-17 01:40:06] │from django.contrib.postgres import
> lookups
> [2023-12-17 01:40:06] │  File
> "/app/.heroku/python/lib/python3.11/site-packages/django/contrib/postgres/lookups.py",
> line 4, in 
> [2023-12-17 01:40:06] │from .search import SearchVector,
> SearchVectorExact, SearchVectorField
> [2023-12-17 01:40:06] │  File
> "/app/.heroku/python/lib/python3.11/site-packages/django/contrib/postgres/search.py",
> line 1, in 
> [2023-12-17 01:40:06] │import psycopg2
> [2023-12-17 01:40:06] │  

Re: Help with DRF error

2023-12-16 Thread Larry Martell
On Sat, Dec 16, 2023 at 1:10 PM Reddy Tintaya  wrote:

> Can't you just use
> workitem = serializers.PrimaryKeyRelatedField(
> queryset=WorkItem.objects.all())
> instead of workitem_id?
>

No because workitem_id is what is sent in the request.


>
> On Sat, Dec 16, 2023 at 10:00 AM Larry Martell 
> wrote:
>
>> I have a DRF API. It is throwing an error that I have not been able to
>> fix.
>>
>> Here is my view and serializer:
>>
>> class CreateNotations(CreateAPIView):
>> permission_classes = [IsAuthenticated]
>> serializer_class = NotationListSerializer
>>
>> def post(self, request, *args, **kwargs):
>> return super().post(request, *args, **kwargs)
>>
>> class NotationListSerializer(serializers.Serializer):
>> workitem_id =
>> serializers.PrimaryKeyRelatedField(queryset=WorkItem.objects.all(),
>> source="workitem")
>> notations = NotationSerializer(many=True)
>>
>> def create(self, validated_data):
>> workitem = validated_data["workitem"]
>>
>> IncompleteAnalysis.objects.filter(workitem=workitem).delete()
>>
>> data = []
>> for notation in validated_data["notations"]:
>> data.append({
>> 'workitem': workitem,
>> 'incomplete_analysis_reason': notation["reason"],
>> 'vessel_affected': notation["vessel"],
>> 'user': self.context['request'].user,
>> 'timestamp': datetime.now().isoformat()
>> })
>>
>> return
>> IncompleteAnalysis.objects.bulk_create([IncompleteAnalysis(**d) for d in
>> data])
>>
>> The body of the request received is:
>>
>> {'workitem_id': 244, 'notations': [{'reason_id": 4, 'vessel_id': 6}]}
>>
>> It fails with this:
>>
>> AttributeError: Got AttributeError when attempting to get a value for
>> field `workitem_id` on serializer `NotationListSerializer`.
>> The serializer field might be named incorrectly and not match any
>> attribute or key on the `list` instance.
>> Original exception text was: 'list' object has no attribute 'workitem'.
>>
>> Here is the stack trace:
>>
>> ERRORdjango.request:log.py:241 Internal Server Error: /api/notations/
>> Traceback (most recent call last):
>>   File
>> "/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/fields.py",
>> line 446, in get_attribute
>> return get_attribute(instance, self.source_attrs)
>>   File
>> "/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/fields.py",
>> line 96, in get_attribute
>> instance = getattr(instance, attr)
>> AttributeError: 'list' object has no attribute 'workitem'
>>
>> During handling of the above exception, another exception occurred:
>>
>> Traceback (most recent call last):
>>   File
>> "/home/larrymartell/.local/lib/python3.8/site-packages/django/core/handlers/exception.py",
>> line 56, in inner
>> response = get_response(request)
>>   File
>> "/home/larrymartell/.local/lib/python3.8/site-packages/django/core/handlers/base.py",
>> line 197, in _get_response
>> response = wrapped_callback(request, *callback_args,
>> **callback_kwargs)
>>   File
>> "/home/larrymartell/.local/lib/python3.8/site-packages/django/views/decorators/csrf.py",
>> line 55, in wrapped_view
>> return view_func(*args, **kwargs)
>>   File
>> "/home/larrymartell/.local/lib/python3.8/site-packages/django/views/generic/base.py",
>> line 103, in view
>> return self.dispatch(request, *args, **kwargs)
>>   File
>> "/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/views.py",
>> line 509, in dispatch
>> response = self.handle_exception(exc)
>>   File
>> "/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/views.py",
>> line 469, in handle_exception
>> self.raise_uncaught_exception(exc)
>>   File
>> "/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/views.py",
>> line 480, in raise_uncaught_exception
>> raise exc
>>   File
>> "/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/views.py",
>> line 506, in dispatch
>> response = handler(request, *args, **kwargs)
>>   File "/inst/martell/EVServer/app/CAPgraph/createevapi/views.py", line
>> 1270, in

Re: Help with DRF error

2023-12-16 Thread Reddy Tintaya
Can't you just use
workitem = serializers.PrimaryKeyRelatedField(
queryset=WorkItem.objects.all())
instead of workitem_id?

On Sat, Dec 16, 2023 at 10:00 AM Larry Martell 
wrote:

> I have a DRF API. It is throwing an error that I have not been able to fix.
>
> Here is my view and serializer:
>
> class CreateNotations(CreateAPIView):
> permission_classes = [IsAuthenticated]
> serializer_class = NotationListSerializer
>
> def post(self, request, *args, **kwargs):
> return super().post(request, *args, **kwargs)
>
> class NotationListSerializer(serializers.Serializer):
> workitem_id =
> serializers.PrimaryKeyRelatedField(queryset=WorkItem.objects.all(),
> source="workitem")
> notations = NotationSerializer(many=True)
>
> def create(self, validated_data):
> workitem = validated_data["workitem"]
>
> IncompleteAnalysis.objects.filter(workitem=workitem).delete()
>
> data = []
> for notation in validated_data["notations"]:
> data.append({
> 'workitem': workitem,
> 'incomplete_analysis_reason': notation["reason"],
> 'vessel_affected': notation["vessel"],
> 'user': self.context['request'].user,
> 'timestamp': datetime.now().isoformat()
> })
>
> return
> IncompleteAnalysis.objects.bulk_create([IncompleteAnalysis(**d) for d in
> data])
>
> The body of the request received is:
>
> {'workitem_id': 244, 'notations': [{'reason_id": 4, 'vessel_id': 6}]}
>
> It fails with this:
>
> AttributeError: Got AttributeError when attempting to get a value for
> field `workitem_id` on serializer `NotationListSerializer`.
> The serializer field might be named incorrectly and not match any
> attribute or key on the `list` instance.
> Original exception text was: 'list' object has no attribute 'workitem'.
>
> Here is the stack trace:
>
> ERRORdjango.request:log.py:241 Internal Server Error: /api/notations/
> Traceback (most recent call last):
>   File
> "/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/fields.py",
> line 446, in get_attribute
> return get_attribute(instance, self.source_attrs)
>   File
> "/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/fields.py",
> line 96, in get_attribute
> instance = getattr(instance, attr)
> AttributeError: 'list' object has no attribute 'workitem'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File
> "/home/larrymartell/.local/lib/python3.8/site-packages/django/core/handlers/exception.py",
> line 56, in inner
> response = get_response(request)
>   File
> "/home/larrymartell/.local/lib/python3.8/site-packages/django/core/handlers/base.py",
> line 197, in _get_response
> response = wrapped_callback(request, *callback_args, **callback_kwargs)
>   File
> "/home/larrymartell/.local/lib/python3.8/site-packages/django/views/decorators/csrf.py",
> line 55, in wrapped_view
> return view_func(*args, **kwargs)
>   File
> "/home/larrymartell/.local/lib/python3.8/site-packages/django/views/generic/base.py",
> line 103, in view
> return self.dispatch(request, *args, **kwargs)
>   File
> "/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/views.py",
> line 509, in dispatch
> response = self.handle_exception(exc)
>   File
> "/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/views.py",
> line 469, in handle_exception
> self.raise_uncaught_exception(exc)
>   File
> "/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/views.py",
> line 480, in raise_uncaught_exception
> raise exc
>   File
> "/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/views.py",
> line 506, in dispatch
> response = handler(request, *args, **kwargs)
>   File "/inst/martell/EVServer/app/CAPgraph/createevapi/views.py", line
> 1270, in post
> return super().post(request, *args, **kwargs)
>   File
> "/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/generics.py",
> line 190, in post
> return self.create(request, *args, **kwargs)
>   File
> "/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/mixins.py",
> line 20, in create
> headers = self.get_success_headers(serializer.data)
>   File
> "/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/serializers.py",
> line 5

Help with DRF error

2023-12-16 Thread Larry Martell
I have a DRF API. It is throwing an error that I have not been able to fix.

Here is my view and serializer:

class CreateNotations(CreateAPIView):
permission_classes = [IsAuthenticated]
serializer_class = NotationListSerializer

def post(self, request, *args, **kwargs):
return super().post(request, *args, **kwargs)

class NotationListSerializer(serializers.Serializer):
workitem_id =
serializers.PrimaryKeyRelatedField(queryset=WorkItem.objects.all(),
source="workitem")
notations = NotationSerializer(many=True)

def create(self, validated_data):
workitem = validated_data["workitem"]

IncompleteAnalysis.objects.filter(workitem=workitem).delete()

data = []
for notation in validated_data["notations"]:
data.append({
'workitem': workitem,
'incomplete_analysis_reason': notation["reason"],
'vessel_affected': notation["vessel"],
'user': self.context['request'].user,
'timestamp': datetime.now().isoformat()
})

return
IncompleteAnalysis.objects.bulk_create([IncompleteAnalysis(**d) for d in
data])

The body of the request received is:

{'workitem_id': 244, 'notations': [{'reason_id": 4, 'vessel_id': 6}]}

It fails with this:

AttributeError: Got AttributeError when attempting to get a value for field
`workitem_id` on serializer `NotationListSerializer`.
The serializer field might be named incorrectly and not match any attribute
or key on the `list` instance.
Original exception text was: 'list' object has no attribute 'workitem'.

Here is the stack trace:

ERRORdjango.request:log.py:241 Internal Server Error: /api/notations/
Traceback (most recent call last):
  File
"/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/fields.py",
line 446, in get_attribute
return get_attribute(instance, self.source_attrs)
  File
"/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/fields.py",
line 96, in get_attribute
instance = getattr(instance, attr)
AttributeError: 'list' object has no attribute 'workitem'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File
"/home/larrymartell/.local/lib/python3.8/site-packages/django/core/handlers/exception.py",
line 56, in inner
response = get_response(request)
  File
"/home/larrymartell/.local/lib/python3.8/site-packages/django/core/handlers/base.py",
line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File
"/home/larrymartell/.local/lib/python3.8/site-packages/django/views/decorators/csrf.py",
line 55, in wrapped_view
return view_func(*args, **kwargs)
  File
"/home/larrymartell/.local/lib/python3.8/site-packages/django/views/generic/base.py",
line 103, in view
return self.dispatch(request, *args, **kwargs)
  File
"/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/views.py",
line 509, in dispatch
response = self.handle_exception(exc)
  File
"/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/views.py",
line 469, in handle_exception
self.raise_uncaught_exception(exc)
  File
"/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/views.py",
line 480, in raise_uncaught_exception
raise exc
  File
"/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/views.py",
line 506, in dispatch
response = handler(request, *args, **kwargs)
  File "/inst/martell/EVServer/app/CAPgraph/createevapi/views.py", line
1270, in post
return super().post(request, *args, **kwargs)
  File
"/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/generics.py",
line 190, in post
return self.create(request, *args, **kwargs)
  File
"/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/mixins.py",
line 20, in create
headers = self.get_success_headers(serializer.data)
  File
"/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/serializers.py",
line 555, in data
ret = super().data
  File
"/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/serializers.py",
line 253, in data
self._data = self.to_representation(self.instance)
  File
"/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/serializers.py",
line 509, in to_representation
attribute = field.get_attribute(instance)
  File
"/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/relations.py",
line 190, in get_attribute
return super().get_attribute(instance)
  File
"/home/larrymartell/.local/lib/python3.8/site-packages/rest_framework/fields.py",
line 479, in get_attribute
raise type(exc)(msg)
AttributeE

Re: Launching Our Django Developers' Error Resolution Group 

2023-12-07 Thread o1bigtenor
On Thu, Dec 7, 2023 at 6:41 AM Kani Sbt  wrote:
>
> Dear Django and RestFrameWork Community Members,
>
> I hope this message finds you well! We're thrilled to announce the launch of 
> a new initiative within our community — the Django Developers' Error 
> Resolution Group.
>
> In this group, we aim to foster collaboration and knowledge-sharing among our 
> talented developers. If you encounter any challenges or errors while working 
> on Django projects, this is the perfect space to seek assistance and share 
> your expertise with others.
>
> Whether you're a seasoned Django pro or just starting out, everyone is 
> encouraged to participate. Together, we can build a supportive environment 
> where we learn from each other's experiences and collectively overcome 
> obstacles.
>
> To get started, simply post your error or problem in the group, and let the 
> community work its magic. Remember, there's no such thing as a "silly" 
> question, and we're here to help each other grow.
>
> Let's turn challenges into opportunities and make our Django projects even 
> more successful!
>
> Looking forward to seeing you in the group and fostering a collaborative and 
> thriving community.
>
>
> join this Group :
>
> https://chat.whatsapp.com/KrnYaahVEZ8JmNbx4YNqHm
>
> Happy coding!
>


Methought that was what this list was about - - - - or has it become
that with all the job requests
and other that the original intent has been lost.

Please advise soonest.

(Wouldn't join anything on whatsapp on neither a bet nor a dare though
- - - - sorry!)

-- 
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/CAPpdf5-ogFZb1MYyOFCLHLCMYumLJ4WT7e84w1fwGTdLY-wVBA%40mail.gmail.com.


Launching Our Django Developers' Error Resolution Group 

2023-12-07 Thread Kani Sbt


Dear Django and RestFrameWork Community Members,

I hope this message finds you well! We're thrilled to announce the launch 
of a new initiative within our community — the Django Developers' Error 
Resolution Group.

In this group, we aim to foster collaboration and knowledge-sharing among 
our talented developers. If you encounter any challenges or errors while 
working on Django projects, this is the perfect space to seek assistance 
and share your expertise with others.

Whether you're a seasoned Django pro or just starting out, everyone is 
encouraged to participate. Together, we can build a supportive environment 
where we learn from each other's experiences and collectively overcome 
obstacles.

To get started, simply post your error or problem in the group, and let the 
community work its magic. Remember, there's no such thing as a "silly" 
question, and we're here to help each other grow.

Let's turn challenges into opportunities and make our Django projects even 
more successful!

Looking forward to seeing you in the group and fostering a collaborative 
and thriving community.


join this Group : 

https://chat.whatsapp.com/KrnYaahVEZ8JmNbx4YNqHm

Happy coding!

Best regards, B.KANITHKAR SOFTWARE ENGINERR ANJOK TECH 

-- 
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/51c53689-7b54-4bd1-8d29-9e15602ad09fn%40googlegroups.com.


Re: Postgres connection error

2023-10-10 Thread ASAMOAH EMMANUEL
I often come across this issue, run this code but before you do, log in
into the postgres shell with a database with all privileges, let's say
postgre user and switch with your new database created and run: GRANT
CREATE ON SCHEMA public TO your_user;

On Tue, Oct 10, 2023 at 3:47 PM Joyce Mumbi 
wrote:

> Hello i have problem in deploying my back-end work could you kindly help
> me out Thank you
>
>
>
> [image: Mailtrack]
> <https://mailtrack.io?utm_source=gmail_medium=signature_campaign=signaturevirality11;>
>  Sender
> notified by
> Mailtrack
> <https://mailtrack.io?utm_source=gmail_medium=signature_campaign=signaturevirality11;>
>  10/10/23,
> 06:45:45 PM
>
> On Mon, 9 Oct 2023 at 17:15, Nana Bright Atsiatorme <
> nanabrightatsiato...@gmail.com> wrote:
>
>> ENGINE': 'django.db.backends.postgresql_psycopg2',
>> 'NAME': 'knapds',
>> 'USER': 'system',
>> 'PASSWORD': 'password',
>> 'HOST': 'localhost',
>> 'PORT': 5432,
>>
>>
>> Install pgadmin and run with the  setup with the credentials above
>> Make sure the it running the apply the migrations
>> The error is from the port number
>>
>>
>>
>>
>> --
>> 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/CAEdj-JFtG3Yx4D0TvjTGjMTJJeZ-pquJ9CF5D0EHoMdjgULkhQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAEdj-JFtG3Yx4D0TvjTGjMTJJeZ-pquJ9CF5D0EHoMdjgULkhQ%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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/CAPTUz5ngaXhZzQ9cFNxEFAU4kPKtZpGQ%2Bjkhk2Sh2wiAYp_ukg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAPTUz5ngaXhZzQ9cFNxEFAU4kPKtZpGQ%2Bjkhk2Sh2wiAYp_ukg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CABFHQYxF8oa9wOZvsXGqCdeL_WKip%2B9dHCRaw458Vh7K9d6j%3Dw%40mail.gmail.com.


Re: Postgres connection error

2023-10-10 Thread Joyce Mumbi
Hello i have problem in deploying my back-end work could you kindly help me
out Thank you



[image: Mailtrack]
<https://mailtrack.io?utm_source=gmail_medium=signature_campaign=signaturevirality11;>
Sender
notified by
Mailtrack
<https://mailtrack.io?utm_source=gmail_medium=signature_campaign=signaturevirality11;>
10/10/23,
06:45:45 PM

On Mon, 9 Oct 2023 at 17:15, Nana Bright Atsiatorme <
nanabrightatsiato...@gmail.com> wrote:

> ENGINE': 'django.db.backends.postgresql_psycopg2',
> 'NAME': 'knapds',
> 'USER': 'system',
> 'PASSWORD': 'password',
> 'HOST': 'localhost',
> 'PORT': 5432,
>
>
> Install pgadmin and run with the  setup with the credentials above
> Make sure the it running the apply the migrations
> The error is from the port number
>
>
>
>
> --
> 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/CAEdj-JFtG3Yx4D0TvjTGjMTJJeZ-pquJ9CF5D0EHoMdjgULkhQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAEdj-JFtG3Yx4D0TvjTGjMTJJeZ-pquJ9CF5D0EHoMdjgULkhQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAPTUz5ngaXhZzQ9cFNxEFAU4kPKtZpGQ%2Bjkhk2Sh2wiAYp_ukg%40mail.gmail.com.


Re: Postgres connection error

2023-10-09 Thread Nana Bright Atsiatorme
ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'knapds',
'USER': 'system',
'PASSWORD': 'password',
'HOST': 'localhost',
'PORT': 5432,


Install pgadmin and run with the  setup with the credentials above
Make sure the it running the apply the migrations
The error is from the port number

-- 
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/CAEdj-JFtG3Yx4D0TvjTGjMTJJeZ-pquJ9CF5D0EHoMdjgULkhQ%40mail.gmail.com.


Re: Postgres connection error

2023-10-08 Thread Pranav Sawant
Thank you for assistance. 
I just checked and saw that owner of my database was postgres, and thats 
why it was not giving create permission to other users so i changed the 
owner and it worked 

On Monday, October 9, 2023 at 4:00:57 AM UTC+5:30 Mike Dewhirst wrote:

> There is a step missing somewhere if migrations has incorrect permissions.
>
> If Django is correctly installed - as it seems to be - then your settings 
> must be deficient somewhere. The first migration ought to create Django's 
> own tables etc even if you haven't written any of your own models.
>
> I would start again and follow the docs exactly. Perhaps follow the 
> tutorial.
>
> Also, you can happily keep things super-simple if you plan to throw 
> everything away and start fresh after learning the ropes.
>
> Good luck
>
> Mike
>
>
>
> --
> (Unsigned mail from my phone)
>
>
>
>  Original message 
> From: Pranav Sawant  
> Date: 9/10/23 01:24 (GMT+10:00) 
> To: Django users  
> Subject: Postgres connection error 
>
> *Hey all, I am new to django*
> *and i want to connect to postgresql *
>
> *what I have doing:*
>
> *At postgres plsql*
> CREATE DATABASE knapds; CREATE USER system WITH PASSWORD 'password'; ALTER 
> ROLE system SET client_encoding TO 'utf8'; ALTER ROLE system SET 
> default_transaction_isolation TO 'read committed'; ALTER ROLE system SET 
> timezone TO 'Africa/Johannesburg'; GRANT ALL PRIVILEGES ON DATABASE knapds 
> TO system; \q 
> *in settings.py:*
>
> 'ENGINE': 'django.db.backends.postgresql_psycopg2',
> 'NAME': 'knapds',
> 'USER': 'system',
> 'PASSWORD': 'password',
> 'HOST': 'localhost',
> 'PORT': '',
>
> *and I am getting this error:*
>
> django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create 
> the django_migrations table (permission denied for schema public
> LINE 1: CREATE TABLE "django_migrations" ("id" bigint NOT NULL PRIMA...
>
> Please 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-users...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/a9eeca40-befa-4a0b-b1fc-db78924e6218n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/django-users/a9eeca40-befa-4a0b-b1fc-db78924e6218n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/d1183f24-b0a6-4345-8ca5-831e29c02a36n%40googlegroups.com.


Re: Postgres connection error

2023-10-08 Thread Sebastian Jung
GRANT ALL PRIVILEGES ON DATABASE knapds TO system;


Don't give all rights. This is very strange in PostgreSQL

Pranav Sawant  schrieb am So., 8. Okt. 2023,
16:24:

> *Hey all, I am new to django*
> *and i want to connect to postgresql *
>
> *what I have doing:*
>
> *At postgres plsql*
> CREATE DATABASE knapds; CREATE USER system WITH PASSWORD 'password'; ALTER
> ROLE system SET client_encoding TO 'utf8'; ALTER ROLE system SET
> default_transaction_isolation TO 'read committed'; ALTER ROLE system SET
> timezone TO 'Africa/Johannesburg'; GRANT ALL PRIVILEGES ON DATABASE knapds
> TO system; \q
> *in settings.py:*
>
> 'ENGINE': 'django.db.backends.postgresql_psycopg2',
> 'NAME': 'knapds',
> 'USER': 'system',
> 'PASSWORD': 'password',
> 'HOST': 'localhost',
> 'PORT': '',
>
> *and I am getting this error:*
>
> django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create
> the django_migrations table (permission denied for schema public
> LINE 1: CREATE TABLE "django_migrations" ("id" bigint NOT NULL PRIMA...
>
> Please 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-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/a9eeca40-befa-4a0b-b1fc-db78924e6218n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/a9eeca40-befa-4a0b-b1fc-db78924e6218n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAKGT9mzY3BrAhi%3D%3D5TmGEtaE285BZAyjhoEx%3Dcn9AVzS0BgBkg%40mail.gmail.com.


RE: Postgres connection error

2023-10-08 Thread Mike Dewhirst
There is a step missing somewhere if migrations has incorrect permissions.If 
Django is correctly installed - as it seems to be - then your settings must be 
deficient somewhere. The first migration ought to create Django's own tables 
etc even if you haven't written any of your own models.I would start again and 
follow the docs exactly. Perhaps follow the tutorial.Also, you can happily keep 
things super-simple if you plan to throw everything away and start fresh after 
learning the ropes.Good luckMike--(Unsigned mail from my phone)
 Original message From: Pranav Sawant 
 Date: 9/10/23  01:24  (GMT+10:00) To: Django users 
 Subject: Postgres connection error Hey all, I 
am new to djangoand i want to connect to postgresql what I have doing:At 
postgres plsqlCREATE DATABASE knapds;

CREATE USER system WITH PASSWORD 'password';

ALTER ROLE system SET client_encoding TO 'utf8';

ALTER ROLE system SET default_transaction_isolation TO 'read committed';

ALTER ROLE system SET timezone TO 'Africa/Johannesburg';

GRANT ALL PRIVILEGES ON DATABASE knapds TO system;

\q
in settings.py:'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'knapds','USER': 'system','PASSWORD': 'password',   
 'HOST': 'localhost','PORT': '',and I am getting this 
error:django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create 
the django_migrations table (permission denied for schema publicLINE 1: CREATE 
TABLE "django_migrations" ("id" bigint NOT NULL PRIMA...Please 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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a9eeca40-befa-4a0b-b1fc-db78924e6218n%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/65232d78.050a0220.d36b2.8891SMTPIN_ADDED_MISSING%40gmr-mx.google.com.


Postgres connection error

2023-10-08 Thread Pranav Sawant
*Hey all, I am new to django*
*and i want to connect to postgresql *

*what I have doing:*

*At postgres plsql*
CREATE DATABASE knapds; CREATE USER system WITH PASSWORD 'password'; ALTER 
ROLE system SET client_encoding TO 'utf8'; ALTER ROLE system SET 
default_transaction_isolation TO 'read committed'; ALTER ROLE system SET 
timezone TO 'Africa/Johannesburg'; GRANT ALL PRIVILEGES ON DATABASE knapds 
TO system; \q 
*in settings.py:*

'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'knapds',
'USER': 'system',
'PASSWORD': 'password',
'HOST': 'localhost',
'PORT': '',

*and I am getting this error:*

django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create 
the django_migrations table (permission denied for schema public
LINE 1: CREATE TABLE "django_migrations" ("id" bigint NOT NULL PRIMA...

Please 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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a9eeca40-befa-4a0b-b1fc-db78924e6218n%40googlegroups.com.


django form validation error massage not showing. please help me out

2023-09-15 Thread Mohammad Shahidullah
models.py
class Position(models.Model):
title = models.CharField(max_length=50)

def __str__(self):
return self.title

class Department(models.Model):
title = models.CharField(max_length=50)

def __str__(self):
return self.title


class Employee(models.Model):
fullname = models.CharField(max_length=100)
emp_code = models.CharField(max_length=6)
mobile= models.CharField(max_length=11)
email = models.EmailField(max_length=25)
position= models.ForeignKey(Position,on_delete=models.CASCADE)
Department = models.ForeignKey(Department, on_delete=models.CASCADE)
password_first = models.CharField(max_length=25)
password_again = models.CharField(max_length=25)

def __str__ (self):
return self.fullname

forms.py
User = get_user_model()

class EmployeeForm(forms.ModelForm):

class Meta:
model = Employee
fields = ('fullname','mobile','emp_code','position', 'Department',
'email', 'password_first', 'password_again')
labels = {
'fullname':'Full Name',
'emp_code':'Employee Code',
'password_first': 'Password',
'password_again': 'Confirm Password',
}

widgets = {
'password_first': forms.PasswordInput(),
'password_again' : forms.PasswordInput(),
}


def __init__(self, *args, **kwargs):
super(EmployeeForm,self).__init__(*args, **kwargs)
self.fields['position'].empty_label = "Select"
self.fields['Department'].empty_label = "Select"



def clean_username(self):
username = self.cleaned_data.get('emp_code')
qs = User.objects.filter(username=username)
if qs.exists():
raise forms.ValidationError('username already exists')
return username

def clean(self):
cleaned_data = self.cleaned_data
password_first = self.cleaned_data.get('password_first')
password_again = self.cleaned_data.get('password_again')
if password_first and password_again and password_first != 
password_again:
raise forms.ValidationError("Passwords din't match")
return cleaned_data

def clean_email(self):
email_address = self.cleaned_data.get('email')
qs = User.objects.filter(email=email_address)
if qs.exists():
raise forms.ValidationError("This email_id already registered")
return email_address

views.py
def employee_form(request, id=0):
if request.method == "GET":
if id == 0:
form = EmployeeForm()
else:
employee = Employee.objects.get(pk=id)
form = EmployeeForm(instance=employee)
return render(request, "users/employee_form.html", {'form': form})
else:
if id == 0:
form = EmployeeForm(request.POST)
else:
employee = Employee.objects.get(pk=id)
form = EmployeeForm(request.POST,instance= employee)
if form.is_valid():
form.save()
return redirect('/list')


employee_form.html


{% block content %}


{% csrf_token %}
{{form.fullname|as_crispy_field}}
{{form.mobile|as_crispy_field}}
{{form.email|as_crispy_field}}



{{form.emp_code|as_crispy_field}}


{{form.position|as_crispy_field}}


{{form.Department|as_crispy_field}}





{{form.password_first|as_crispy_field}}


{{form.password_again|as_crispy_field}}






<
i class="fas fa-database">
Submit



 Back to list


    


{% if form.error %}
{% for field in form %}
{% for error in field.error %}
 {{ errors }} 
{% endfor %}
{% endfor %}

{% for error in form.non_field_error %}
 {{ error }} 
{% endfor %}
{% endif %}




{% endblock content %}



-- 
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/6ba949b0-0fc4-443c-ba27-136754fbd1f5n%40googlegroups.com.


Error when trying to implement google Oauth sign in using react and django

2023-09-03 Thread david ekechukwu
I am using React and Django to implement an OAuth Google login, however 
whenever I send the request, I receive the access denied error. I am 
handling the request in the backend using the drf-Social-Oauth2 library.
{"error":"access_denied","error_description":"Your credentials aren't 
allowed"}path('api-auth/', include('drf_social_oauth2.urls', 
namespace='drf')),
[image: IMG-20230716-WA0044.jpg][image: IMG-20230716-WA0045.jpg][image: 
IMG-20230716-WA0046.jpg]

-- 
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/012bad24-e7aa-4d3c-8a38-ba53fb0c3606n%40googlegroups.com.


Re: Help on Error while deploying a django app on render.

2023-08-25 Thread Peter Benjamin Ani
Where are you hosting?

On Thu, 24 Aug 2023 at 22:37, ALINDA Fortunate 
wrote:

> Hello family some help i have this error
>
> Aug 25 12:28:30 AM  ImportError: Couldn't import Django. Are you sure it's
> installed and available on your PYTHONPATH environment variable? Did you
> forget to activate a virtual environment?
> Aug 25 12:28:30 AM  ==> Build failed 
>
> Yet this is my requirements file and django is installed
> asgiref==3.6.0
> dj-database-url==2.1.0
> Django==4.2.1
> gunicorn==21.2.0
> packaging==23.1
> psycopg2==2.9.7
> python-dotenv==1.0.0
> sqlparse==0.4.4
> typing_extensions==4.7.1
> tzdata==2023.3
> whitenoise==6.5.0
>
>
> Kindly help me.
> --
>
> ALINDA Fortunate
> Graduate Of Computer Science
> Gulu University
> Passionate about Software Development in Python
> If you can't explain it simply, you don't understand it well enough.
> alindafortuna...@gmail.com .
> +256 774339676 / +256 702910041
> Kagadi.
>
> --
> 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/CAPifpCvYY%3D%2BFuNAYKXgoikghEYGCB90iw_24S1Ctye%3DZEJdNqg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAPifpCvYY%3D%2BFuNAYKXgoikghEYGCB90iw_24S1Ctye%3DZEJdNqg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAPxt_2W%2Bdmt%2BjxXEY%3Dd9MbBCcZ9Dj1VX7KMQiiSiiT%3DgiBbt2A%40mail.gmail.com.


Re: Help on Error while deploying a django app on render.

2023-08-25 Thread ivan harold

Try following these

https://www.freecodecamp.org/news/deploying-a-django-app-to-render/
On Friday, August 25, 2023 at 9:00:08 PM UTC+8 Abdulrahman Abbas wrote:

> Are you using virtual environment?
>
> On Thu, Aug 24, 2023, 22:37 ALINDA Fortunate  
> wrote:
>
>> Hello family some help i have this error
>>
>> Aug 25 12:28:30 AM  ImportError: Couldn't import Django. Are you sure 
>> it's installed and available on your PYTHONPATH environment variable? Did 
>> you forget to activate a virtual environment?
>> Aug 25 12:28:30 AM  ==> Build failed 
>>
>> Yet this is my requirements file and django is installed
>> asgiref==3.6.0
>> dj-database-url==2.1.0
>> Django==4.2.1
>> gunicorn==21.2.0
>> packaging==23.1
>> psycopg2==2.9.7
>> python-dotenv==1.0.0
>> sqlparse==0.4.4
>> typing_extensions==4.7.1
>> tzdata==2023.3
>> whitenoise==6.5.0
>>
>>
>> Kindly help me.
>> --
>>
>> ALINDA Fortunate
>> Graduate Of Computer Science
>> Gulu University
>> Passionate about Software Development in Python
>> If you can't explain it simply, you don't understand it well enough.
>> alindafo...@gmail.com.
>> +256 774339676 <+256%20774%20339676> / +256 702910041 
>> <+256%20702%20910041>
>> Kagadi.
>>
>> -- 
>> 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/CAPifpCvYY%3D%2BFuNAYKXgoikghEYGCB90iw_24S1Ctye%3DZEJdNqg%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/django-users/CAPifpCvYY%3D%2BFuNAYKXgoikghEYGCB90iw_24S1Ctye%3DZEJdNqg%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/2dda8d5e-4f1b-4784-acaa-a44ed555e0cen%40googlegroups.com.


Re: Help on Error while deploying a django app on render.

2023-08-25 Thread ivan harold

https://www.freecodecamp.org/news/deploying-a-django-app-to-render/
On Friday, August 25, 2023 at 9:00:08 PM UTC+8 Abdulrahman Abbas wrote:

> Are you using virtual environment?
>
> On Thu, Aug 24, 2023, 22:37 ALINDA Fortunate  
> wrote:
>
>> Hello family some help i have this error
>>
>> Aug 25 12:28:30 AM  ImportError: Couldn't import Django. Are you sure 
>> it's installed and available on your PYTHONPATH environment variable? Did 
>> you forget to activate a virtual environment?
>> Aug 25 12:28:30 AM  ==> Build failed 
>>
>> Yet this is my requirements file and django is installed
>> asgiref==3.6.0
>> dj-database-url==2.1.0
>> Django==4.2.1
>> gunicorn==21.2.0
>> packaging==23.1
>> psycopg2==2.9.7
>> python-dotenv==1.0.0
>> sqlparse==0.4.4
>> typing_extensions==4.7.1
>> tzdata==2023.3
>> whitenoise==6.5.0
>>
>>
>> Kindly help me.
>> --
>>
>> ALINDA Fortunate
>> Graduate Of Computer Science
>> Gulu University
>> Passionate about Software Development in Python
>> If you can't explain it simply, you don't understand it well enough.
>> alindafo...@gmail.com.
>> +256 774339676 <+256%20774%20339676> / +256 702910041 
>> <+256%20702%20910041>
>> Kagadi.
>>
>> -- 
>> 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/CAPifpCvYY%3D%2BFuNAYKXgoikghEYGCB90iw_24S1Ctye%3DZEJdNqg%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/django-users/CAPifpCvYY%3D%2BFuNAYKXgoikghEYGCB90iw_24S1Ctye%3DZEJdNqg%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/e95a3141-fa1c-4247-86fb-16b8886beeccn%40googlegroups.com.


Re: Help on Error while deploying a django app on render.

2023-08-25 Thread Abdulrahman Abbas
Are you using virtual environment?

On Thu, Aug 24, 2023, 22:37 ALINDA Fortunate 
wrote:

> Hello family some help i have this error
>
> Aug 25 12:28:30 AM  ImportError: Couldn't import Django. Are you sure it's
> installed and available on your PYTHONPATH environment variable? Did you
> forget to activate a virtual environment?
> Aug 25 12:28:30 AM  ==> Build failed 
>
> Yet this is my requirements file and django is installed
> asgiref==3.6.0
> dj-database-url==2.1.0
> Django==4.2.1
> gunicorn==21.2.0
> packaging==23.1
> psycopg2==2.9.7
> python-dotenv==1.0.0
> sqlparse==0.4.4
> typing_extensions==4.7.1
> tzdata==2023.3
> whitenoise==6.5.0
>
>
> Kindly help me.
> --
>
> ALINDA Fortunate
> Graduate Of Computer Science
> Gulu University
> Passionate about Software Development in Python
> If you can't explain it simply, you don't understand it well enough.
> alindafortuna...@gmail.com .
> +256 774339676 / +256 702910041
> Kagadi.
>
> --
> 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/CAPifpCvYY%3D%2BFuNAYKXgoikghEYGCB90iw_24S1Ctye%3DZEJdNqg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAPifpCvYY%3D%2BFuNAYKXgoikghEYGCB90iw_24S1Ctye%3DZEJdNqg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAGGqo0PSZ%2BEmttU3KkZ14EidSxPzM0JSo4Wp6m30FCRRRj8Htw%40mail.gmail.com.


Help on Error while deploying a django app on render.

2023-08-24 Thread ALINDA Fortunate
Hello family some help i have this error

Aug 25 12:28:30 AM  ImportError: Couldn't import Django. Are you sure it's
installed and available on your PYTHONPATH environment variable? Did you
forget to activate a virtual environment?
Aug 25 12:28:30 AM  ==> Build failed 

Yet this is my requirements file and django is installed
asgiref==3.6.0
dj-database-url==2.1.0
Django==4.2.1
gunicorn==21.2.0
packaging==23.1
psycopg2==2.9.7
python-dotenv==1.0.0
sqlparse==0.4.4
typing_extensions==4.7.1
tzdata==2023.3
whitenoise==6.5.0


Kindly help me.
--

ALINDA Fortunate
Graduate Of Computer Science
Gulu University
Passionate about Software Development in Python
If you can't explain it simply, you don't understand it well enough.
alindafortuna...@gmail.com .
+256 774339676 / +256 702910041
Kagadi.

-- 
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/CAPifpCvYY%3D%2BFuNAYKXgoikghEYGCB90iw_24S1Ctye%3DZEJdNqg%40mail.gmail.com.


Re: Error while showing detailed post

2023-08-22 Thread Mvd Raghava
what issue are you facing. please send the error

On Sat, Aug 19, 2023 at 9:03 PM Dhiraj Kumar 
wrote:

> Hi new in Django,
>
> I want to display details post to the template but facing issue while
> trying to fetch post by id on the click of Continue Reading
> ,
> Views.py
>
> def show(request, id):
> print(id)
> try:
> showPost = post.objects.get(id=id)  # Assuming your model is
> named 'post'
> except post.DoesNotExist:
> # Handle the case where the post with the given ID doesn't exist
> raise Http404("Post does not exist")
>
> return render(request, 'show_post.html', {'showPost': showPost})
>
>
>
>
> Urls.py
> from django.urls import path
> from news import views
> from django.conf import settings
> from django.conf.urls.static import static
>
> urlpatterns = [
> path('',views.home, name='home' ),
> path('about', views.about, name="about"),
> path('contact', views.contact, name="contact"),
> path('News_post', views.News_post, name='News_post'),
> path('add_post',views.add_post,name='add_post'),
> path('show//', views.show, name='show')
>
> ]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
>
>
>
>
>
>
>
>
>
>
> Thanks & Regard Dhiraj Kumar
> Mobile No. : 9643843355, EXT: 250
> Email Id: dhi...@nimbusitsolutions.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/CAAdfw9TdfFir%2BiFUyGxAhzWLdpDCtfSZr2ZPhi7DJrUauJUn-w%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAAdfw9TdfFir%2BiFUyGxAhzWLdpDCtfSZr2ZPhi7DJrUauJUn-w%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAFfOSBnje%3DqkUBaa8ZFrLLZ7Fme7-DWE-px1LpbT06b3yvmHKg%40mail.gmail.com.


Error while showing detailed post

2023-08-19 Thread Dhiraj Kumar
Hi new in Django,

I want to display details post to the template but facing issue while
trying to fetch post by id on the click of Continue Reading
,
Views.py

def show(request, id):
print(id)
try:
showPost = post.objects.get(id=id)  # Assuming your model is named
'post'
except post.DoesNotExist:
# Handle the case where the post with the given ID doesn't exist
raise Http404("Post does not exist")

return render(request, 'show_post.html', {'showPost': showPost})




Urls.py
from django.urls import path
from news import views
from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
path('',views.home, name='home' ),
path('about', views.about, name="about"),
path('contact', views.contact, name="contact"),
path('News_post', views.News_post, name='News_post'),
path('add_post',views.add_post,name='add_post'),
path('show//', views.show, name='show')

]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)










Thanks & Regard Dhiraj Kumar
Mobile No. : 9643843355, EXT: 250
Email Id: dhi...@nimbusitsolutions.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/CAAdfw9TdfFir%2BiFUyGxAhzWLdpDCtfSZr2ZPhi7DJrUauJUn-w%40mail.gmail.com.


Re: any any help me to solve below error in my django project

2023-08-07 Thread Brian Gitau
change the naming of the urls like for the login from "login" to something
like "login_page"  because you are causing a clash in the views.py code
since you are importing login and your url name is the same rename the
logout too

hope that helps


On Mon, Aug 7, 2023 at 2:40 PM AKHIL KORE  wrote:

> I got the error in my below existings django files. Please solve this
> error and check all below files code.
>
> File "C:\django2pm\myvenv\lib\site-packages\django\urls\resolvers.py",
> line 725, in url_patterns
>   raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e
> django.core.exceptions.ImproperlyConfigured: The included URLconf
> 'registration1.urls' does not appear to have any patterns in it. If you see
> the 'urlpatterns' variable with valid patterns in the file then the issue
> is probably caused by a circular import.
>
> registration1/settings.py
> 
> 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/4.1/howto/deployment/checklist/
>
> # SECURITY WARNING: keep the secret key used in production secret!
> SECRET_KEY =
> 'django-insecure-bz1vja=h9vcnl_=j!-1*+t(j(fn!qzzx5wgy_nu_f-i5c%t'
>
> # 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',
> 'app1',
> 'crispy_forms',
> 'crispy_bootstrap5',
> 'rest_framework',
> ]
>
> MIDDLEWARE = [
> 'django.middleware.security.SecurityMiddleware',
> '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 = 'registration1.urls'
>
> TEMPLATES = [
> {
> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
> 'DIRS': ['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 = 'registration1.wsgi.application'
>
>
> # Database
> # https://docs.djangoproject.com/en/4.1/ref/settings/#databases
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.mysql',
> 'NAME': 'user_registration',
> 'USER': 'shamiit_database',
> 'PASSWORD': 'shamiit123',
> 'HOST': '183.83.187.12',
> 'PORT': '6013',
> }
> }
>
>
> # Password validation
> #
> https://docs.djangoproject.com/en/4.1/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':
> 'django.contrib.auth.password_validation.NumericPasswordValidator',
> },
> ]
>
>
> # Internationalization
> # https://docs.djangoproject.com/en/4.1/topics/i18n/
>
> LANGUAGE_CODE = 'en-us'
>
> TIME_ZONE = 'UTC'
>
> USE_I18N = True
>
> USE_TZ = True
>
>
> # Static files (CSS, JavaScript, Images)
> # https://docs.djangoproject.com/en/4.1/howto/static-files/
>
> STATIC_URL = 'static/'
> LOGIN_URL = '/login/'
>
> # Default primary key field type
> # https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
>
> DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
>
> CRISPY_TEMPLATE_PACK = 'bootstrap5'
> CRISPY_ALLOWED_TEMPLATE_PACKS = 'bootstrap5'
>
> # Add this line at the bottom of the file
> AUTH_USER_MODEL = 'app1.CustomUser'
>
> EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBac

any any help me to solve below error in my django project

2023-08-07 Thread AKHIL KORE
I got the error in my below existings django files. Please solve this error
and check all below files code.

File "C:\django2pm\myvenv\lib\site-packages\django\urls\resolvers.py", line
725, in url_patterns
  raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e
django.core.exceptions.ImproperlyConfigured: The included URLconf
'registration1.urls' does not appear to have any patterns in it. If you see
the 'urlpatterns' variable with valid patterns in the file then the issue
is probably caused by a circular import.

registration1/settings.py

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/4.1/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY =
'django-insecure-bz1vja=h9vcnl_=j!-1*+t(j(fn!qzzx5wgy_nu_f-i5c%t'

# 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',
'app1',
'crispy_forms',
'crispy_bootstrap5',
'rest_framework',
]

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'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 = 'registration1.urls'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': ['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 = 'registration1.wsgi.application'


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

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'user_registration',
'USER': 'shamiit_database',
'PASSWORD': 'shamiit123',
'HOST': '183.83.187.12',
'PORT': '6013',
}
}


# Password validation
#
https://docs.djangoproject.com/en/4.1/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':
'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]


# Internationalization
# https://docs.djangoproject.com/en/4.1/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.1/howto/static-files/

STATIC_URL = 'static/'
LOGIN_URL = '/login/'

# Default primary key field type
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

CRISPY_TEMPLATE_PACK = 'bootstrap5'
CRISPY_ALLOWED_TEMPLATE_PACKS = 'bootstrap5'

# Add this line at the bottom of the file
AUTH_USER_MODEL = 'app1.CustomUser'

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'  # Change to your email provider's SMTP server
EMAIL_PORT = 587  # Change to your email provider's port
EMAIL_USE_TLS = True  # Change to True if your email provider requires TLS
EMAIL_HOST_USER = 'koreakhi...@gmail.com'  # Your email address
EMAIL_HOST_PASSWORD = 'ngxfvpwoasfumnkc'  # Your email password

from django.utils.translation import gettext_lazy as _

PASSWORD_RESET_SUBJECT = _('Password Reset Request')
PASSWORD_RESET_EMAIL_BODY = _(
'You have requested a password reset. Follow the link below to reset
your password:\n\n'
'{protocol}://{domain}{url}\n\n'
'If you did not request this reset, please ignore this email.\n'
'Your username, in case you\'ve forgotten: {username}'
)

registration1/urls.py
-
from django.contrib import admin
from django.urls import path, include

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

app1/models.py
-
from django.contrib.auth.models import Ab

Re: Error regarding Deployment on Vercel

2023-08-07 Thread krishna soni
how?

On Sunday, 6 August, 2023 at 10:09:37 pm UTC+5:30 Mithilesh Rawani wrote:

> Yes it's easy
>
> On Sun, 6 Aug 2023, 4:36 pm krishna soni,  wrote:
>
>> recently I have deployed a project on vercel  "
>> https://blogstar-web.vercel.app/;
>> giving me error 404 not found can any one tell why this error is coming 
>> ??? I have searched on google regarding this but not found helpful
>>
>> -- 
>> 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/9aa321e4-7bbc-436e-b6d4-7ceddbb8515bn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/9aa321e4-7bbc-436e-b6d4-7ceddbb8515bn%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/c90befaa-a770-40c1-a02a-275f4e02a417n%40googlegroups.com.


Re: Error regarding Deployment on Vercel

2023-08-06 Thread Mithilesh Rawani
Yes it's easy

On Sun, 6 Aug 2023, 4:36 pm krishna soni, 
wrote:

> recently I have deployed a project on vercel  "
> https://blogstar-web.vercel.app/;
> giving me error 404 not found can any one tell why this error is coming
> ??? I have searched on google regarding this but not found helpful
>
> --
> 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/9aa321e4-7bbc-436e-b6d4-7ceddbb8515bn%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/9aa321e4-7bbc-436e-b6d4-7ceddbb8515bn%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAEQ0vnArDJDkcU5fp6K_mVaKOhSskB43HuMfAnT0z6J4V9A%3DbA%40mail.gmail.com.


Error regarding Deployment on Vercel

2023-08-06 Thread krishna soni
recently I have deployed a project on vercel  
"https://blogstar-web.vercel.app/;
giving me error 404 not found can any one tell why this error is coming ??? 
I have searched on google regarding this but not found helpful

-- 
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/9aa321e4-7bbc-436e-b6d4-7ceddbb8515bn%40googlegroups.com.


When i Host i ger=t this error ,i couldn't solve it help me please

2023-08-01 Thread Kani Sbt
  File 
"/home/sbthrmodule/public_html/venv/lib/python3.11/site-packages/MySQLdb/__init__.py",
 
line 121, in Connect
return Connection(*args, **kwargs)
   ^^^
  File 
"/home/sbthrmodule/public_html/venv/lib/python3.11/site-packages/MySQLdb/connections.py",
 
line 193, in __init__
super().__init__(*args, **kwargs2)
TypeError: 'driver' is an invalid keyword argument for connect()

-- 
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/0e4c935b-7246-45c9-8596-2730e4bf39een%40googlegroups.com.


Re: I need your helf, I got this below error, after post the django server 8000 on google browser. Please correct my django project code?

2023-07-24 Thread Fikayo Soetan
Good day,
In the project urlpatterns it's meant to be ""(two quotation marks) instead 
of "(one). 
Also, in the app you have not configured any path to handle the  
http://127.0.0.1:8000/. What you have is for the other views like signup 
and all. You need a base one like path("", ...
Adjust that and see if it works.

On Monday, July 24, 2023 at 6:12:33 AM UTC+1 AKHIL KORE wrote:

> Page not found (404)
> Request Method: GET
> Request URL: http://127.0.0.1:8000/
> Using the URLconf defined in question_post.urls, Django tried these URL 
> patterns, in this order:
>
> 1.admin/
> 2.signup/ [name='signup']
> 3.login/ [name='login']
> 4.logout/ [name='logout']
> 5.post_question/ [name='post_question']
> 6.question_list/ [name='question_list']
> 7.question// [name='question_detail']
> 8.question//post_answer/ [name='post_answer']
> 9.answer//like/ [name='like_answer']
> 10.question_detail// [name='question_detail']
> The empty path didn’t match any of these.
>
> Below are my django project files.
> models.py
> -
> from django.db import models
> from django.contrib.auth.models import User
>
> class UserProfile(models.Model):
> user = models.OneToOneField(User, on_delete=models.CASCADE)
> # Remove the username field from here, as it belongs to the User model.
> first_name = models.CharField(max_length=100, blank=True, null=True)
> last_name = models.CharField(max_length=100, blank=True, null=True)
> email = models.EmailField(blank=True, null=True)
> profile_picture = models.ImageField(
> upload_to='profile_pics/', blank=True, null=True)
>
> def __str__(self):
> return self.user.username
>
> class Question(models.Model):
> user = models.ForeignKey(UserProfile, on_delete=models.CASCADE)
> text = models.TextField()
> created_at = models.DateTimeField(auto_now_add=True)
>
> class Answer(models.Model):
> user = models.ForeignKey(UserProfile, on_delete=models.CASCADE)
> question = models.ForeignKey(Question, on_delete=models.CASCADE)
> text = models.TextField()
> created_at = models.DateTimeField(auto_now_add=True)
>
> class Like(models.Model):
> user = models.ForeignKey(UserProfile, on_delete=models.CASCADE)
> answer = models.ForeignKey(Answer, on_delete=models.CASCADE)
>
> views.py
> 
> from django.shortcuts import render, redirect
> from django.contrib.auth.mixins import LoginRequiredMixin
> from django.views import View
> from django.urls import reverse_lazy
> from django.contrib.auth.forms import UserCreationForm, AuthenticationForm
> from .models import Question, Answer, Like, UserProfile
> from .forms import QuestionForm, AnswerForm, LikeForm, 
> CustomUserCreationForm
>
> class SignupView(View):
> def get(self, request):
> form = UserCreationForm()
> return render(request, 'signup.html', {'form': form})
>
> def post(self, request):
> form = UserCreationForm(request.POST)
> if form.is_valid():
> form.save()
> return redirect('login')
> return render(request, 'signup.html', {'form': form})
>
> class UserLoginView(View):
> def get(self, request):
> form = AuthenticationForm()
> return render(request, 'login.html', {'form': form})
>
> def post(self, request):
> form = AuthenticationForm(request, data=request.POST)
> if form.is_valid():
> username = form.cleaned_data.get('username')
> password = form.cleaned_data.get('password')
> user = authenticate(username=username, password=password)
> if user is not None:
> login(request, user)
> # Redirect to the home page on successful login
> return redirect('home')
> return render(request, 'login.html', {'form': form})
>
> class UserLogoutView(View):
> def get(self, request):
> logout(request)
> return redirect('login')
>
> class QuestionPostView(LoginRequiredMixin, View):
> login_url = reverse_lazy('login')
>
> def get(self, request):
> form = QuestionForm()
> return render(request, 'post_question.html', {'form': form})
>
> def post(self, request):
> form = QuestionForm(request.POST)
> if form.is_valid():
> new_question = form.save(commit=False)
> new_question.user = request.user
> new_question.save()
> return redirect('question_list')
> return render(request, 'post_question.html', {'form': form})
>
> class QuestionListView(View):
> def get(self, request):
> questions = Question.objects.all()
> return render(request, 'question_list.html', {'questions': 
> questions})
>
> class AnswerPostView(LoginRequiredMixin, View):
> login_url = reverse_lazy('login')
>
> def get(self, request, question_id):
> question = Question.objects.get(pk=question_id)
> form = AnswerForm()
> return render(request, 

I need your helf, I got this below error, after post the django server 8000 on google browser. Please correct my django project code?

2023-07-23 Thread AKHIL KORE
Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/
Using the URLconf defined in question_post.urls, Django tried these URL
patterns, in this order:

1.admin/
2.signup/ [name='signup']
3.login/ [name='login']
4.logout/ [name='logout']
5.post_question/ [name='post_question']
6.question_list/ [name='question_list']
7.question// [name='question_detail']
8.question//post_answer/ [name='post_answer']
9.answer//like/ [name='like_answer']
10.question_detail// [name='question_detail']
The empty path didn’t match any of these.

Below are my django project files.
models.py
-
from django.db import models
from django.contrib.auth.models import User

class UserProfile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
# Remove the username field from here, as it belongs to the User model.
first_name = models.CharField(max_length=100, blank=True, null=True)
last_name = models.CharField(max_length=100, blank=True, null=True)
email = models.EmailField(blank=True, null=True)
profile_picture = models.ImageField(
upload_to='profile_pics/', blank=True, null=True)

def __str__(self):
return self.user.username

class Question(models.Model):
user = models.ForeignKey(UserProfile, on_delete=models.CASCADE)
text = models.TextField()
created_at = models.DateTimeField(auto_now_add=True)

class Answer(models.Model):
user = models.ForeignKey(UserProfile, on_delete=models.CASCADE)
question = models.ForeignKey(Question, on_delete=models.CASCADE)
text = models.TextField()
created_at = models.DateTimeField(auto_now_add=True)

class Like(models.Model):
user = models.ForeignKey(UserProfile, on_delete=models.CASCADE)
answer = models.ForeignKey(Answer, on_delete=models.CASCADE)

views.py

from django.shortcuts import render, redirect
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views import View
from django.urls import reverse_lazy
from django.contrib.auth.forms import UserCreationForm, AuthenticationForm
from .models import Question, Answer, Like, UserProfile
from .forms import QuestionForm, AnswerForm, LikeForm,
CustomUserCreationForm

class SignupView(View):
def get(self, request):
form = UserCreationForm()
return render(request, 'signup.html', {'form': form})

def post(self, request):
form = UserCreationForm(request.POST)
if form.is_valid():
form.save()
return redirect('login')
return render(request, 'signup.html', {'form': form})

class UserLoginView(View):
def get(self, request):
form = AuthenticationForm()
return render(request, 'login.html', {'form': form})

def post(self, request):
form = AuthenticationForm(request, data=request.POST)
if form.is_valid():
username = form.cleaned_data.get('username')
password = form.cleaned_data.get('password')
user = authenticate(username=username, password=password)
if user is not None:
login(request, user)
# Redirect to the home page on successful login
return redirect('home')
return render(request, 'login.html', {'form': form})

class UserLogoutView(View):
def get(self, request):
logout(request)
return redirect('login')

class QuestionPostView(LoginRequiredMixin, View):
login_url = reverse_lazy('login')

def get(self, request):
form = QuestionForm()
return render(request, 'post_question.html', {'form': form})

def post(self, request):
form = QuestionForm(request.POST)
if form.is_valid():
new_question = form.save(commit=False)
new_question.user = request.user
new_question.save()
return redirect('question_list')
return render(request, 'post_question.html', {'form': form})

class QuestionListView(View):
def get(self, request):
questions = Question.objects.all()
return render(request, 'question_list.html', {'questions':
questions})

class AnswerPostView(LoginRequiredMixin, View):
login_url = reverse_lazy('login')

def get(self, request, question_id):
question = Question.objects.get(pk=question_id)
form = AnswerForm()
return render(request, 'post_answer.html', {'question': question,
'form': form})

def post(self, request, question_id):
question = Question.objects.get(pk=question_id)
form = AnswerForm(request.POST)
if form.is_valid():
new_answer = form.save(commit=False)
new_answer.user = request.user.userprofile
new_answer.question = question
new_answer.save()
return redirect('question_detail', question_id=question.id)
return render(request, 'post_answer.html', {'question': question,
'form': form})

class LikeAnswerView(LoginRequiredMixin, View):
login_url = 

Re: got url error in app/urls.py file

2023-06-06 Thread Paul Haguet
It's extremely basic error... File urls.py line 3 the import is invalid as 
it say into the trace.

cretae??? Where is this function? I think "create" is the good function 
name: canno't import name crétin from 'audio_api.views...

Le mardi 6 juin 2023 à 14:15:25 UTC+2, AKHIL KORE a écrit :

> I'm creating my assignment django project. When I make migration with the 
> command of python manage.py makemigrations. I got a name_error in the 
> urls.py file. Please help me to remove that error.
>
> The files I mentioned below are .
> 1). views(1) & views(2) are views.py files.
> 2). urls file 
> 3). error on cmd file
>

-- 
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/b8d057b6-329b-4dc9-b275-771f32ebba95n%40googlegroups.com.


RE: Please help me solving this error

2023-05-24 Thread prdpchowdhary
My code is import re iine = “My name is Bahtta. I want to learn”print(re.findall('[aeiou]+', line))And is it is running okSent from Mail for Windows From: Ramesh BhattaSent: Wednesday, May 24, 2023 6:41 AMTo: django-users@googlegroups.comSubject: Please help me solving this error Traceback (most recent call last):  File "C:\users\rudra\desktop\python\client2.py", line 1, in     import urllib.request  File "C:\Users\Rudra\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 84, in     import base64  File "C:\Users\Rudra\AppData\Local\Programs\Python\Python311\Lib\base64.py", line 9, in     import re  File "C:\users\rudra\desktop\python\re.py", line 23    print(re.findall('[aeiou]+',line))                                      ^ --   -- 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/CAHrGOLFQmheaL1frkawv4obMJF5%3DPfmsPxH2nmRrPPwdoCAHeA%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/8D557F9E-04E5-4E55-857D-A6E7B2008640%40hxcore.ol.


Please help me solving this error

2023-05-23 Thread Ramesh Bhatta
Traceback (most recent call last):
  File "C:\users\rudra\desktop\python\client2.py", line 1, in 
import urllib.request
  File
"C:\Users\Rudra\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py",
line 84, in 
import base64
  File
"C:\Users\Rudra\AppData\Local\Programs\Python\Python311\Lib\base64.py",
line 9, in 
import re
  File "C:\users\rudra\desktop\python\re.py", line 23
print(re.findall('[aeiou]+',line))
  ^

--

-- 
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/CAHrGOLFQmheaL1frkawv4obMJF5%3DPfmsPxH2nmRrPPwdoCAHeA%40mail.gmail.com.


Re: i am getting this error when i try to search in admin panel

2023-05-18 Thread Brian Gitau
The issue lies in specifying ForeignKey fields (state, district, and
taluka) within the search_fields. ForeignKey fields cannot be searched
using 'icontains' because it requires a direct string comparison. Instead,
you can search based on the related field's attributes.

To resolve the error, you need to change the search_fields attribute to
search based on related fields' attributes. Assuming State, District, and
Taluka models have a field named name, you can update the search_fields as
follows:

search_fields = ('state__name', 'district__name', 'taluka__name', 'center',)

This modification will search for the related fields' name attributes,
allowing you to perform a case-insensitive substring search on those fields.

Remember to import the related models (State, District, and Taluka) at the
top of your admin.py file for the updated search_fields to work correctly.

On Thu, May 18, 2023 at 2:01 PM Ravindra Magar  wrote:

> i am getting this error when i try to  search in admin panel
>
> FieldError at /admin/school/center/
> Unsupported lookup 'icontains' for ForeignKey or join on the field not
> permitted.
>
> admin.py
> @admin.register(Center)
> class CenterAdmin(ImportExportModelAdmin, admin.ModelAdmin):
> list_display = ('id', 'state', 'district', 'taluka', 'center',)
> list_filter = ('state', 'district', 'taluka','center')
> search_fields = ('state','district', 'taluka','center',)
>
> model.py
> class Center (models.Model):
>
>state = models.ForeignKey(State, on_delete=models.CASCADE)
>district = ChainedForeignKey(District,
>   chained_field='state',
>   chained_model_field='state',show_all=False,
>  auto_choose=True,  sort=True)
>taluka = ChainedForeignKey(Taluka,
>   chained_field='district',
>
> chained_model_field='district',show_all=False, auto_choose=True,  sort=True)
>
>
>center = models.CharField(max_length=200)
>
>def str(self):
> return self.center
>
> --
> 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/CAHMymCAkUmAc%3DGiG2mxmfNJLbT%3DYY7XwtCqsdE5m4M_Lr-hfVA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAHMymCAkUmAc%3DGiG2mxmfNJLbT%3DYY7XwtCqsdE5m4M_Lr-hfVA%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAMJ3z%3D18pL8d5OvNyem4PZes-a63voeKARXExj%3D36vJkrQJdyw%40mail.gmail.com.


i am getting this error when i try to search in admin panel

2023-05-18 Thread Ravindra Magar
i am getting this error when i try to  search in admin panel

FieldError at /admin/school/center/
Unsupported lookup 'icontains' for ForeignKey or join on the field not
permitted.

admin.py
@admin.register(Center)
class CenterAdmin(ImportExportModelAdmin, admin.ModelAdmin):
list_display = ('id', 'state', 'district', 'taluka', 'center',)
list_filter = ('state', 'district', 'taluka','center')
search_fields = ('state','district', 'taluka','center',)

model.py
class Center (models.Model):

   state = models.ForeignKey(State, on_delete=models.CASCADE)
   district = ChainedForeignKey(District,
  chained_field='state',
  chained_model_field='state',show_all=False,
 auto_choose=True,  sort=True)
   taluka = ChainedForeignKey(Taluka,
  chained_field='district',

chained_model_field='district',show_all=False, auto_choose=True,  sort=True)


   center = models.CharField(max_length=200)

   def str(self):
return self.center

-- 
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/CAHMymCAkUmAc%3DGiG2mxmfNJLbT%3DYY7XwtCqsdE5m4M_Lr-hfVA%40mail.gmail.com.


Re: django smtp.gmail error

2023-05-17 Thread Chelsea Fan
thank you ))

On Thu, May 18, 2023 at 9:52 AM Vishesh Mangla 
wrote:

>
> https://medium.com/@manglavishesh64/using-gmail-smtp-with-3rd-party-apps-be3e15f4a7fc
>
> On Wed, 17 May, 2023, 19:50 Chelsea Fan, 
> wrote:
>
>> how can I find your medium stories?
>>
>> On Wed, May 17, 2023 at 7:09 PM Vishesh Mangla 
>> wrote:
>>
>>> You can't use SMTP with Google.
>>> You need to use oauth through Google cloud platform. Actually there is
>>> one way to use SMTP with Google to login through third party apps. Check
>>> out my stories on medium. I had written one for a solution.
>>>
>>> On Wed, 17 May, 2023, 19:36 Vishesh Mangla, 
>>> wrote:
>>>
 Are you logging through Gmail?

 On Wed, 17 May, 2023, 19:35 Chelsea Fan, 
 wrote:

> I deleted all passwords and thhen created new password but nothig was
> happen
>
> On Wed, May 17, 2023 at 6:54 PM Lakshyaraj Dash <
> dashlakshyaraj2...@gmail.com> wrote:
>
>> First verify if the email through which the app password was created
>> is same or different. If different then it will not work.
>> OR
>> Please recreate a new app and copy the password again and enter.
>>
>> Thanks and Regards
>> Lakshyaraj Dash
>>
>> On Wed, May 17, 2023, 19:17 Chelsea Fan <
>> allaberdi16yazha...@gmail.com> wrote:
>>
>>> how can I solve this? I enabled 2fa then created app password but it
>>> does not work.
>>> smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password
>>> not accepted. Learn more at\n5.7.8
>>> https://support.google.com/mail/?p=BadCredentials
>>> ev21-20020a17090729d500b00965b416585bsm12337451ejc.118 - gsmtp')
>>>
>>> --
>>> 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/CAJwZndce5fV-BuwnLUTrU73e%3DvQ_QbArGoyf6qSnQr4wyxHQOw%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/CAF7qQgBwYUz8HaRizz_4AVU4rwNcYUX8v1Au%2BWN-UNqHdc1LdQ%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/CAJwZnddw2dpYE35Ww_5W%2BUCQiDvdTzZ1B7ojNry50aBkH-efzA%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/CACaE8x4165he-ofirdmyqtc-BksB18dEcKWebnzU2j2h6%3Dhymg%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/CAJwZndcYssDjkSc%2BFGCpy%3DWVPp6R%2Bd0a8Lo1puUrvDAubErbhw%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
> 

Re: django smtp.gmail error

2023-05-17 Thread Vishesh Mangla
https://medium.com/@manglavishesh64/using-gmail-smtp-with-3rd-party-apps-be3e15f4a7fc

On Wed, 17 May, 2023, 19:50 Chelsea Fan, 
wrote:

> how can I find your medium stories?
>
> On Wed, May 17, 2023 at 7:09 PM Vishesh Mangla 
> wrote:
>
>> You can't use SMTP with Google.
>> You need to use oauth through Google cloud platform. Actually there is
>> one way to use SMTP with Google to login through third party apps. Check
>> out my stories on medium. I had written one for a solution.
>>
>> On Wed, 17 May, 2023, 19:36 Vishesh Mangla, 
>> wrote:
>>
>>> Are you logging through Gmail?
>>>
>>> On Wed, 17 May, 2023, 19:35 Chelsea Fan, 
>>> wrote:
>>>
 I deleted all passwords and thhen created new password but nothig was
 happen

 On Wed, May 17, 2023 at 6:54 PM Lakshyaraj Dash <
 dashlakshyaraj2...@gmail.com> wrote:

> First verify if the email through which the app password was created
> is same or different. If different then it will not work.
> OR
> Please recreate a new app and copy the password again and enter.
>
> Thanks and Regards
> Lakshyaraj Dash
>
> On Wed, May 17, 2023, 19:17 Chelsea Fan 
> wrote:
>
>> how can I solve this? I enabled 2fa then created app password but it
>> does not work.
>> smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password
>> not accepted. Learn more at\n5.7.8
>> https://support.google.com/mail/?p=BadCredentials
>> ev21-20020a17090729d500b00965b416585bsm12337451ejc.118 - gsmtp')
>>
>> --
>> 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/CAJwZndce5fV-BuwnLUTrU73e%3DvQ_QbArGoyf6qSnQr4wyxHQOw%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/CAF7qQgBwYUz8HaRizz_4AVU4rwNcYUX8v1Au%2BWN-UNqHdc1LdQ%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/CAJwZnddw2dpYE35Ww_5W%2BUCQiDvdTzZ1B7ojNry50aBkH-efzA%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/CACaE8x4165he-ofirdmyqtc-BksB18dEcKWebnzU2j2h6%3Dhymg%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/CAJwZndcYssDjkSc%2BFGCpy%3DWVPp6R%2Bd0a8Lo1puUrvDAubErbhw%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/CACaE8x4Dr%3Dtb_fGKG5TnidLyqo6mApG0autaxyoRuRgM9nevjA%40mail.gmail.com.


Re: django smtp.gmail error

2023-05-17 Thread Lakshyaraj Dash
Dear Vishesh,
You can use SMTP login with 2FA. I've also built many applications using
SMTP

On Wed, May 17, 2023, 19:39 Vishesh Mangla 
wrote:

> You can't use SMTP with Google.
> You need to use oauth through Google cloud platform. Actually there is one
> way to use SMTP with Google to login through third party apps. Check out my
> stories on medium. I had written one for a solution.
>
> On Wed, 17 May, 2023, 19:36 Vishesh Mangla, 
> wrote:
>
>> Are you logging through Gmail?
>>
>> On Wed, 17 May, 2023, 19:35 Chelsea Fan, 
>> wrote:
>>
>>> I deleted all passwords and thhen created new password but nothig was
>>> happen
>>>
>>> On Wed, May 17, 2023 at 6:54 PM Lakshyaraj Dash <
>>> dashlakshyaraj2...@gmail.com> wrote:
>>>
 First verify if the email through which the app password was created is
 same or different. If different then it will not work.
 OR
 Please recreate a new app and copy the password again and enter.

 Thanks and Regards
 Lakshyaraj Dash

 On Wed, May 17, 2023, 19:17 Chelsea Fan 
 wrote:

> how can I solve this? I enabled 2fa then created app password but it
> does not work.
> smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password
> not accepted. Learn more at\n5.7.8
> https://support.google.com/mail/?p=BadCredentials
> ev21-20020a17090729d500b00965b416585bsm12337451ejc.118 - gsmtp')
>
> --
> 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/CAJwZndce5fV-BuwnLUTrU73e%3DvQ_QbArGoyf6qSnQr4wyxHQOw%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/CAF7qQgBwYUz8HaRizz_4AVU4rwNcYUX8v1Au%2BWN-UNqHdc1LdQ%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/CAJwZnddw2dpYE35Ww_5W%2BUCQiDvdTzZ1B7ojNry50aBkH-efzA%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/CACaE8x4165he-ofirdmyqtc-BksB18dEcKWebnzU2j2h6%3Dhymg%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/CAF7qQgCP-98mov9cR6t7Gxdxdr4s1VHPjHUYmHJa9wJV2enM%3DQ%40mail.gmail.com.


Re: django smtp.gmail error

2023-05-17 Thread Lakshyaraj Dash
Bro if so then check the email address with which you created your app
password and the email address used by your application.

Thanks and regards
Lakshyaraj Dash

On Wed, May 17, 2023, 19:35 Chelsea Fan 
wrote:

> I deleted all passwords and thhen created new password but nothig was
> happen
>
> On Wed, May 17, 2023 at 6:54 PM Lakshyaraj Dash <
> dashlakshyaraj2...@gmail.com> wrote:
>
>> First verify if the email through which the app password was created is
>> same or different. If different then it will not work.
>> OR
>> Please recreate a new app and copy the password again and enter.
>>
>> Thanks and Regards
>> Lakshyaraj Dash
>>
>> On Wed, May 17, 2023, 19:17 Chelsea Fan 
>> wrote:
>>
>>> how can I solve this? I enabled 2fa then created app password but it
>>> does not work.
>>> smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not
>>> accepted. Learn more at\n5.7.8
>>> https://support.google.com/mail/?p=BadCredentials
>>> ev21-20020a17090729d500b00965b416585bsm12337451ejc.118 - gsmtp')
>>>
>>> --
>>> 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/CAJwZndce5fV-BuwnLUTrU73e%3DvQ_QbArGoyf6qSnQr4wyxHQOw%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/CAF7qQgBwYUz8HaRizz_4AVU4rwNcYUX8v1Au%2BWN-UNqHdc1LdQ%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/CAJwZnddw2dpYE35Ww_5W%2BUCQiDvdTzZ1B7ojNry50aBkH-efzA%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/CAF7qQgDkuu4zZTPG0Wusee0goZVw5xkSDMP2ACJsHdPwJ5SjEw%40mail.gmail.com.


Re: django smtp.gmail error

2023-05-17 Thread Chelsea Fan
how can I find your medium stories?

On Wed, May 17, 2023 at 7:09 PM Vishesh Mangla 
wrote:

> You can't use SMTP with Google.
> You need to use oauth through Google cloud platform. Actually there is one
> way to use SMTP with Google to login through third party apps. Check out my
> stories on medium. I had written one for a solution.
>
> On Wed, 17 May, 2023, 19:36 Vishesh Mangla, 
> wrote:
>
>> Are you logging through Gmail?
>>
>> On Wed, 17 May, 2023, 19:35 Chelsea Fan, 
>> wrote:
>>
>>> I deleted all passwords and thhen created new password but nothig was
>>> happen
>>>
>>> On Wed, May 17, 2023 at 6:54 PM Lakshyaraj Dash <
>>> dashlakshyaraj2...@gmail.com> wrote:
>>>
 First verify if the email through which the app password was created is
 same or different. If different then it will not work.
 OR
 Please recreate a new app and copy the password again and enter.

 Thanks and Regards
 Lakshyaraj Dash

 On Wed, May 17, 2023, 19:17 Chelsea Fan 
 wrote:

> how can I solve this? I enabled 2fa then created app password but it
> does not work.
> smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password
> not accepted. Learn more at\n5.7.8
> https://support.google.com/mail/?p=BadCredentials
> ev21-20020a17090729d500b00965b416585bsm12337451ejc.118 - gsmtp')
>
> --
> 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/CAJwZndce5fV-BuwnLUTrU73e%3DvQ_QbArGoyf6qSnQr4wyxHQOw%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/CAF7qQgBwYUz8HaRizz_4AVU4rwNcYUX8v1Au%2BWN-UNqHdc1LdQ%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/CAJwZnddw2dpYE35Ww_5W%2BUCQiDvdTzZ1B7ojNry50aBkH-efzA%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/CACaE8x4165he-ofirdmyqtc-BksB18dEcKWebnzU2j2h6%3Dhymg%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/CAJwZndcYssDjkSc%2BFGCpy%3DWVPp6R%2Bd0a8Lo1puUrvDAubErbhw%40mail.gmail.com.


Re: django smtp.gmail error

2023-05-17 Thread Vishesh Mangla
You can't use SMTP with Google.
You need to use oauth through Google cloud platform. Actually there is one
way to use SMTP with Google to login through third party apps. Check out my
stories on medium. I had written one for a solution.

On Wed, 17 May, 2023, 19:36 Vishesh Mangla, 
wrote:

> Are you logging through Gmail?
>
> On Wed, 17 May, 2023, 19:35 Chelsea Fan, 
> wrote:
>
>> I deleted all passwords and thhen created new password but nothig was
>> happen
>>
>> On Wed, May 17, 2023 at 6:54 PM Lakshyaraj Dash <
>> dashlakshyaraj2...@gmail.com> wrote:
>>
>>> First verify if the email through which the app password was created is
>>> same or different. If different then it will not work.
>>> OR
>>> Please recreate a new app and copy the password again and enter.
>>>
>>> Thanks and Regards
>>> Lakshyaraj Dash
>>>
>>> On Wed, May 17, 2023, 19:17 Chelsea Fan 
>>> wrote:
>>>
 how can I solve this? I enabled 2fa then created app password but it
 does not work.
 smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password
 not accepted. Learn more at\n5.7.8
 https://support.google.com/mail/?p=BadCredentials
 ev21-20020a17090729d500b00965b416585bsm12337451ejc.118 - gsmtp')

 --
 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/CAJwZndce5fV-BuwnLUTrU73e%3DvQ_QbArGoyf6qSnQr4wyxHQOw%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/CAF7qQgBwYUz8HaRizz_4AVU4rwNcYUX8v1Au%2BWN-UNqHdc1LdQ%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/CAJwZnddw2dpYE35Ww_5W%2BUCQiDvdTzZ1B7ojNry50aBkH-efzA%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/CACaE8x4165he-ofirdmyqtc-BksB18dEcKWebnzU2j2h6%3Dhymg%40mail.gmail.com.


Re: django smtp.gmail error

2023-05-17 Thread Chelsea Fan
yeah

On Wed, May 17, 2023 at 7:07 PM Vishesh Mangla 
wrote:

> Are you logging through Gmail?
>
> On Wed, 17 May, 2023, 19:35 Chelsea Fan, 
> wrote:
>
>> I deleted all passwords and thhen created new password but nothig was
>> happen
>>
>> On Wed, May 17, 2023 at 6:54 PM Lakshyaraj Dash <
>> dashlakshyaraj2...@gmail.com> wrote:
>>
>>> First verify if the email through which the app password was created is
>>> same or different. If different then it will not work.
>>> OR
>>> Please recreate a new app and copy the password again and enter.
>>>
>>> Thanks and Regards
>>> Lakshyaraj Dash
>>>
>>> On Wed, May 17, 2023, 19:17 Chelsea Fan 
>>> wrote:
>>>
 how can I solve this? I enabled 2fa then created app password but it
 does not work.
 smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password
 not accepted. Learn more at\n5.7.8
 https://support.google.com/mail/?p=BadCredentials
 ev21-20020a17090729d500b00965b416585bsm12337451ejc.118 - gsmtp')

 --
 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/CAJwZndce5fV-BuwnLUTrU73e%3DvQ_QbArGoyf6qSnQr4wyxHQOw%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/CAF7qQgBwYUz8HaRizz_4AVU4rwNcYUX8v1Au%2BWN-UNqHdc1LdQ%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/CAJwZnddw2dpYE35Ww_5W%2BUCQiDvdTzZ1B7ojNry50aBkH-efzA%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/CACaE8x6m0YXk3o%3Df360a5F6x7sWOStSwAqOH7skHYKMGuWj9qg%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/CAJwZndd%2BqUMCwc61atbR%3DR%2BbuUQdKYUkTDrwFn2tAru0T8%3D4Sg%40mail.gmail.com.


Re: django smtp.gmail error

2023-05-17 Thread Vishesh Mangla
Are you logging through Gmail?

On Wed, 17 May, 2023, 19:35 Chelsea Fan, 
wrote:

> I deleted all passwords and thhen created new password but nothig was
> happen
>
> On Wed, May 17, 2023 at 6:54 PM Lakshyaraj Dash <
> dashlakshyaraj2...@gmail.com> wrote:
>
>> First verify if the email through which the app password was created is
>> same or different. If different then it will not work.
>> OR
>> Please recreate a new app and copy the password again and enter.
>>
>> Thanks and Regards
>> Lakshyaraj Dash
>>
>> On Wed, May 17, 2023, 19:17 Chelsea Fan 
>> wrote:
>>
>>> how can I solve this? I enabled 2fa then created app password but it
>>> does not work.
>>> smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not
>>> accepted. Learn more at\n5.7.8
>>> https://support.google.com/mail/?p=BadCredentials
>>> ev21-20020a17090729d500b00965b416585bsm12337451ejc.118 - gsmtp')
>>>
>>> --
>>> 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/CAJwZndce5fV-BuwnLUTrU73e%3DvQ_QbArGoyf6qSnQr4wyxHQOw%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/CAF7qQgBwYUz8HaRizz_4AVU4rwNcYUX8v1Au%2BWN-UNqHdc1LdQ%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/CAJwZnddw2dpYE35Ww_5W%2BUCQiDvdTzZ1B7ojNry50aBkH-efzA%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/CACaE8x6m0YXk3o%3Df360a5F6x7sWOStSwAqOH7skHYKMGuWj9qg%40mail.gmail.com.


Re: django smtp.gmail error

2023-05-17 Thread Chelsea Fan
I deleted all passwords and thhen created new password but nothig was happen

On Wed, May 17, 2023 at 6:54 PM Lakshyaraj Dash <
dashlakshyaraj2...@gmail.com> wrote:

> First verify if the email through which the app password was created is
> same or different. If different then it will not work.
> OR
> Please recreate a new app and copy the password again and enter.
>
> Thanks and Regards
> Lakshyaraj Dash
>
> On Wed, May 17, 2023, 19:17 Chelsea Fan 
> wrote:
>
>> how can I solve this? I enabled 2fa then created app password but it does
>> not work.
>> smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not
>> accepted. Learn more at\n5.7.8
>> https://support.google.com/mail/?p=BadCredentials
>> ev21-20020a17090729d500b00965b416585bsm12337451ejc.118 - gsmtp')
>>
>> --
>> 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/CAJwZndce5fV-BuwnLUTrU73e%3DvQ_QbArGoyf6qSnQr4wyxHQOw%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/CAF7qQgBwYUz8HaRizz_4AVU4rwNcYUX8v1Au%2BWN-UNqHdc1LdQ%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/CAJwZnddw2dpYE35Ww_5W%2BUCQiDvdTzZ1B7ojNry50aBkH-efzA%40mail.gmail.com.


Re: django smtp.gmail error

2023-05-17 Thread Lakshyaraj Dash
First verify if the email through which the app password was created is
same or different. If different then it will not work.
OR
Please recreate a new app and copy the password again and enter.

Thanks and Regards
Lakshyaraj Dash

On Wed, May 17, 2023, 19:17 Chelsea Fan 
wrote:

> how can I solve this? I enabled 2fa then created app password but it does
> not work.
> smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not
> accepted. Learn more at\n5.7.8
> https://support.google.com/mail/?p=BadCredentials
> ev21-20020a17090729d500b00965b416585bsm12337451ejc.118 - gsmtp')
>
> --
> 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/CAJwZndce5fV-BuwnLUTrU73e%3DvQ_QbArGoyf6qSnQr4wyxHQOw%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/CAF7qQgBwYUz8HaRizz_4AVU4rwNcYUX8v1Au%2BWN-UNqHdc1LdQ%40mail.gmail.com.


django smtp.gmail error

2023-05-17 Thread Chelsea Fan
how can I solve this? I enabled 2fa then created app password but it does
not work.
smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not
accepted. Learn more at\n5.7.8
https://support.google.com/mail/?p=BadCredentials
ev21-20020a17090729d500b00965b416585bsm12337451ejc.118 - gsmtp')

-- 
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/CAJwZndce5fV-BuwnLUTrU73e%3DvQ_QbArGoyf6qSnQr4wyxHQOw%40mail.gmail.com.


Re: NoReverseMatch at /home/ error

2023-04-23 Thread Parfait TOLEFO
Thank you for your help. I add name=‘home’ in the url and it is ok now .

On Sun, 23 Apr 2023 at 17:38 Sebastian Jung 
wrote:

> Hello,
>
> This can't be work with {% urls 'home' %} from another website. Pls writes
> /home in href...
>
> Regards
>
> Parfait TOLEFO  schrieb am So., 23. Apr. 2023,
> 18:21:
>
>> [image: error.png]Hello everyone, please, I have this error  *NoReverseMatch
>> at /home/ *when I want to put link to home page from other page.
>>
>> [image: VEW.png]
>> This is my views.py content
>>
>> [image: URL.png]
>>
>> This is my urls.py content.
>>
>>
>> Please help me. Thank you so much
>>
>> --
>> 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/aa768d6d-5348-4c8d-ab7a-37617309572cn%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/aa768d6d-5348-4c8d-ab7a-37617309572cn%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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/CAKGT9mxrWNoPSaEbVDoQ54ckztK8puuKLBcw%3DGX0%3DsASFypvGw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAKGT9mxrWNoPSaEbVDoQ54ckztK8puuKLBcw%3DGX0%3DsASFypvGw%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAGHQqL1%3DqYiBgZTWWKDNSCQG40rLT7SHRMc%3DDm%3DG_1ddpMoiZA%40mail.gmail.com.


Re: Django urls error

2023-04-23 Thread Nitesh Solanki
myproject (main app)
myapp (additional app)

Code: myproject/urls.py

from django.contrib import admin
from django.urls import path, include

from .views import HomeView

urlpatterns = [
path('admin/', admin.site.urls),
path('', HomeView, name='home'), ### will refer to main app views.py. 
These routes are commonly written in main app only
path('hello/', include('myapp.urls')),
] -- 
Code: myproject/settings.py
# Application definition

INSTALLED_APPS = [
...
'django.contrib.messages',
'django.contrib.staticfiles',
'myapp', ### added to inform the django project that we have installed 
a new app named 'myapp'
]

-- 
Code: myproject/views.py
### refers to all the common route associated to main app (myproject)
from django.http import HttpResponse

def HomeView(request):
return HttpResponse('Home page!')
-- 
Code: myapp/urls.py
### refers to all route which are associated with our new app 'myapp'. All 
routes declared here, can be accessed by adding a prefix '/hello/' ### 
because we have declared a word 'hello/' to refer 'myapp' in the 
'myproject/urls.py'
from django.urls import path
from .views import hello_delhi_capitals

urlpatterns = [
path('', hello_delhi_capitals, name='hello_delhi_capitals'),
]
-- 
Code: myapp/urls.py
### refers to all the common route associated to 'myapp' app 
from django.http import HttpResponse

def hello_delhi_capitals(request):
return HttpResponse('Hello Delhi Capitals!')
After running the project two urls will work here 
http://127.0.0.1:8000/
http://127.0.0.1:8000/hello/
On Sunday, 23 April, 2023 at 6:43:37 am UTC+5:30 ritik sahoo wrote:

> Exactly 
>
> On Tue, 18 Apr, 2023, 3:46 am Tarun Miri,  wrote:
>
>> You may not write any string on the urls.py of myapp/urls.py 
>> Ex path('',hello_delhi_capitals,name="hello_delhi_capitals"),
>>
>> On Sat, 15 Apr, 2023, 7:29 am Muhammad Juwaini Abdul Rahman, <
>> juw...@gmail.com> wrote:
>>
>>> In your urls.py you use '/hello' but in your browser you type '/home'.
>>>
>>> On Sat, 15 Apr 2023 at 06:07, lalit upadhyay  
>>> wrote:
>>>
>>>> *I have copied my code here. Plz fix this error:*
>>>>
>>>>
>>>> view.py
>>>> from django.http import HttpResponse
>>>>
>>>>
>>>> def hello_delhi_capitals(request):
>>>> return HttpResponse('Hello Delhi Capitals!')
>>>>
>>>>
>>>>
>>>> myproject/urls.py
>>>>
>>>> from django.contrib import admin
>>>> from django.urls import path, include
>>>>
>>>> urlpatterns = [
>>>> path('admin/', admin.site.urls),
>>>> path('hello/', include('myapp.urls')),
>>>> ]
>>>>
>>>>
>>>>
>>>> myapp/urls.py
>>>>
>>>>
>>>>
>>>> from django.urls import path
>>>> from .views import hello_delhi_capitals
>>>>
>>>> urlpatterns = [
>>>> path('hello/', hello_delhi_capitals, name='hello_delhi_capitals'),
>>>> ]
>>>>
>>>> -- 
>>>> 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/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/django-users/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> -- 
>>> 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/CAFKhtoTQB506MC1OwxvHhT23R5kK-0uC5cxcDm3YS3Q6SYM-Pg%40mail.gmail.com
>>>  
>>> <https://groups.google.com/d/msgid/django-users/CAFKhtoTQB506MC1OwxvHhT23R5kK-0uC5cxcDm3YS3Q6SYM-Pg%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users&quo

Re: Django urls error

2023-04-22 Thread ritik sahoo
Exactly

On Tue, 18 Apr, 2023, 3:46 am Tarun Miri,  wrote:

> You may not write any string on the urls.py of myapp/urls.py
> Ex path('',hello_delhi_capitals,name="hello_delhi_capitals"),
>
> On Sat, 15 Apr, 2023, 7:29 am Muhammad Juwaini Abdul Rahman, <
> juwa...@gmail.com> wrote:
>
>> In your urls.py you use '/hello' but in your browser you type '/home'.
>>
>> On Sat, 15 Apr 2023 at 06:07, lalit upadhyay 
>> wrote:
>>
>>> *I have copied my code here. Plz fix this error:*
>>>
>>>
>>> view.py
>>> from django.http import HttpResponse
>>>
>>>
>>> def hello_delhi_capitals(request):
>>> return HttpResponse('Hello Delhi Capitals!')
>>>
>>>
>>>
>>> myproject/urls.py
>>>
>>> from django.contrib import admin
>>> from django.urls import path, include
>>>
>>> urlpatterns = [
>>> path('admin/', admin.site.urls),
>>> path('hello/', include('myapp.urls')),
>>> ]
>>>
>>>
>>>
>>> myapp/urls.py
>>>
>>>
>>>
>>> from django.urls import path
>>> from .views import hello_delhi_capitals
>>>
>>> urlpatterns = [
>>> path('hello/', hello_delhi_capitals, name='hello_delhi_capitals'),
>>> ]
>>>
>>> --
>>> 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/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> 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/CAFKhtoTQB506MC1OwxvHhT23R5kK-0uC5cxcDm3YS3Q6SYM-Pg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAFKhtoTQB506MC1OwxvHhT23R5kK-0uC5cxcDm3YS3Q6SYM-Pg%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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%2BznC8P5goz9Wzfreknw7vhpChMxjxb4P2jZOa%2BpP68%3D0r3FKA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CA%2BznC8P5goz9Wzfreknw7vhpChMxjxb4P2jZOa%2BpP68%3D0r3FKA%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAJwehCs6WBMTpbta-goxpivNFJ_pkDYoU%2BEfPi4hp%3D_aFtUk6w%40mail.gmail.com.


Re: Django urls error

2023-04-17 Thread Tarun Miri
You may not write any string on the urls.py of myapp/urls.py
Ex path('',hello_delhi_capitals,name="hello_delhi_capitals"),

On Sat, 15 Apr, 2023, 7:29 am Muhammad Juwaini Abdul Rahman, <
juwa...@gmail.com> wrote:

> In your urls.py you use '/hello' but in your browser you type '/home'.
>
> On Sat, 15 Apr 2023 at 06:07, lalit upadhyay 
> wrote:
>
>> *I have copied my code here. Plz fix this error:*
>>
>>
>> view.py
>> from django.http import HttpResponse
>>
>>
>> def hello_delhi_capitals(request):
>> return HttpResponse('Hello Delhi Capitals!')
>>
>>
>>
>> myproject/urls.py
>>
>> from django.contrib import admin
>> from django.urls import path, include
>>
>> urlpatterns = [
>> path('admin/', admin.site.urls),
>> path('hello/', include('myapp.urls')),
>> ]
>>
>>
>>
>> myapp/urls.py
>>
>>
>>
>> from django.urls import path
>> from .views import hello_delhi_capitals
>>
>> urlpatterns = [
>> path('hello/', hello_delhi_capitals, name='hello_delhi_capitals'),
>> ]
>>
>> --
>> 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/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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/CAFKhtoTQB506MC1OwxvHhT23R5kK-0uC5cxcDm3YS3Q6SYM-Pg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAFKhtoTQB506MC1OwxvHhT23R5kK-0uC5cxcDm3YS3Q6SYM-Pg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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%2BznC8P5goz9Wzfreknw7vhpChMxjxb4P2jZOa%2BpP68%3D0r3FKA%40mail.gmail.com.


Re: Django urls error

2023-04-17 Thread Tahir Munir Faraz
do not write hello at the project level This is not correct
path('hello/', include('myapp.urls')),
The code below is correct
path('' ",include("myapp.urls"),

On Sun, 16 Apr 2023 at 21:34, oluwafemi damilola 
wrote:

> Your path is 'hello/', but in your browser you are going to 'home', that
> path does not exist
>
> On Fri, 14 Apr 2023 at 23:07, lalit upadhyay 
> wrote:
>
>> *I have copied my code here. Plz fix this error:*
>>
>>
>> view.py
>> from django.http import HttpResponse
>>
>>
>> def hello_delhi_capitals(request):
>> return HttpResponse('Hello Delhi Capitals!')
>>
>>
>>
>> myproject/urls.py
>>
>> from django.contrib import admin
>> from django.urls import path, include
>>
>> urlpatterns = [
>> path('admin/', admin.site.urls),
>> path('hello/', include('myapp.urls')),
>> ]
>>
>>
>>
>> myapp/urls.py
>>
>>
>>
>> from django.urls import path
>> from .views import hello_delhi_capitals
>>
>> urlpatterns = [
>> path('hello/', hello_delhi_capitals, name='hello_delhi_capitals'),
>> ]
>>
>> --
>> 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/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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/CALo4fb8kC34MgtuhdDz5MVDotBXvDe-crQLTiWBxLF1q0QmbEw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CALo4fb8kC34MgtuhdDz5MVDotBXvDe-crQLTiWBxLF1q0QmbEw%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAJ%2BiHWZXdE0BmuoUob%3DK%2Bibh82_8u%2BWAgSrTr4Tkz_wR89aQ3A%40mail.gmail.com.


Re: Django urls error

2023-04-16 Thread oluwafemi damilola
Your path is 'hello/', but in your browser you are going to 'home', that
path does not exist

On Fri, 14 Apr 2023 at 23:07, lalit upadhyay 
wrote:

> *I have copied my code here. Plz fix this error:*
>
>
> view.py
> from django.http import HttpResponse
>
>
> def hello_delhi_capitals(request):
> return HttpResponse('Hello Delhi Capitals!')
>
>
>
> myproject/urls.py
>
> from django.contrib import admin
> from django.urls import path, include
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('hello/', include('myapp.urls')),
> ]
>
>
>
> myapp/urls.py
>
>
>
> from django.urls import path
> from .views import hello_delhi_capitals
>
> urlpatterns = [
> path('hello/', hello_delhi_capitals, name='hello_delhi_capitals'),
> ]
>
> --
> 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/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com?utm_medium=email_source=footer>
> .
>

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


Re: Django urls error

2023-04-16 Thread oluwafemi damilola
If you are still getting the error if you visit the 'hello' path, then you
should visit 'hello/hello/'


On Sun, 16 Apr 2023 at 11:19, oluwafemi damilola 
wrote:

> Your path is 'hello/', but in your browser you are going to 'home', that
> path does not exist
>
> On Fri, 14 Apr 2023 at 23:07, lalit upadhyay 
> wrote:
>
>> *I have copied my code here. Plz fix this error:*
>>
>>
>> view.py
>> from django.http import HttpResponse
>>
>>
>> def hello_delhi_capitals(request):
>> return HttpResponse('Hello Delhi Capitals!')
>>
>>
>>
>> myproject/urls.py
>>
>> from django.contrib import admin
>> from django.urls import path, include
>>
>> urlpatterns = [
>> path('admin/', admin.site.urls),
>> path('hello/', include('myapp.urls')),
>> ]
>>
>>
>>
>> myapp/urls.py
>>
>>
>>
>> from django.urls import path
>> from .views import hello_delhi_capitals
>>
>> urlpatterns = [
>> path('hello/', hello_delhi_capitals, name='hello_delhi_capitals'),
>> ]
>>
>> --
>> 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/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/CALo4fb_uM5Z%2BgptqxAzD_w9x%3Dez5KVAYMX%3DE3V29k_65fm_sew%40mail.gmail.com.


Re: Django urls error

2023-04-15 Thread 'Kasper Laudrup' via Django users

On 14/04/2023 21.48, lalit upadhyay wrote:

*

I have copied my code here.



The code is from a project called "myproject"


Plz fix this error:



The error is from a project called "Tesing".

You can ignore all other answers you've been given so far until you 
figure out how that could be.


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/5844b278-648a-794d-55b2-45bf980c8948%40stacktrace.dk.


OpenPGP_0xE5D9CAC64AAA55EB.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: Django urls error

2023-04-15 Thread Karthik V A
Bro, From myapp/ urla.py


 Url pattern =[
Path('hello', views.hello_delhi_capitals, name = hello_delhi_capitals)]


On Sat, 15 Apr, 2023, 8:35 pm b1t,  wrote:

> ou haven't defined the home url that you are trying to access
>
> On Saturday, 15 April 2023 at 03:37:38 UTC+5:30 lalit upadhyay wrote:
>
>> *I have copied my code here. Plz fix this error:*
>>
>>
>> view.py
>> from django.http import HttpResponse
>>
>>
>> def hello_delhi_capitals(request):
>> return HttpResponse('Hello Delhi Capitals!')
>>
>>
>>
>> myproject/urls.py
>>
>> from django.contrib import admin
>> from django.urls import path, include
>>
>> urlpatterns = [
>> path('admin/', admin.site.urls),
>> path('hello/', include('myapp.urls')),
>> ]
>>
>>
>>
>> myapp/urls.py
>>
>>
>>
>> from django.urls import path
>> from .views import hello_delhi_capitals
>>
>> urlpatterns = [
>> path('hello/', hello_delhi_capitals, name='hello_delhi_capitals'),
>> ]
>>
> --
> 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/2a78750c-9099-41c7-bc5c-5be0a8c06221n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/2a78750c-9099-41c7-bc5c-5be0a8c06221n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

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


Re: Django urls error

2023-04-15 Thread Lawal Tobiloba Samuel
You are suppose to use localhost:8000/hello/hello.
Because, you added hello as you path when you are including the app urls to
the project url and also you made hello the path to the view of
hello_delhi_ Which makes 2 hello's..

Use localhost:8000/hello/hello

On Sat, Apr 15, 2023, 9:27 AM lalit upadhyay 
wrote:

>
> *I have replaced URL ‘home/’ to ‘hello/’ but still i got same error*
> On Saturday, April 15, 2023 at 7:29:15 AM UTC+5:30 Muhammad Juwaini Abdul
> Rahman wrote:
>
>> In your urls.py you use '/hello' but in your browser you type '/home'.
>>
>> On Sat, 15 Apr 2023 at 06:07, lalit upadhyay 
>> wrote:
>>
>>> *I have copied my code here. Plz fix this error:*
>>>
>>>
>>> view.py
>>> from django.http import HttpResponse
>>>
>>>
>>> def hello_delhi_capitals(request):
>>> return HttpResponse('Hello Delhi Capitals!')
>>>
>>>
>>>
>>> myproject/urls.py
>>>
>>> from django.contrib import admin
>>> from django.urls import path, include
>>>
>>> urlpatterns = [
>>> path('admin/', admin.site.urls),
>>> path('hello/', include('myapp.urls')),
>>> ]
>>>
>>>
>>>
>>> myapp/urls.py
>>>
>>>
>>>
>>> from django.urls import path
>>> from .views import hello_delhi_capitals
>>>
>>> urlpatterns = [
>>> path('hello/', hello_delhi_capitals, name='hello_delhi_capitals'),
>>> ]
>>>
>>> --
>>> 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/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
> 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/e42af2a7-abc4-41dd-a7f6-5f7c8af1630an%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/e42af2a7-abc4-41dd-a7f6-5f7c8af1630an%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAAscozVQWvak5OWMMbVEfcu5dDVzj%3DR5e0OK5Mv1xmR0B_pSag%40mail.gmail.com.


Re: Django urls error

2023-04-15 Thread b1t
You define hello/ in your base urls.py file and again in your  
myapp/urls.py so that's create a URL like this "127.0.0.1/hello/hello".
instead use this in your myapp/urls.py 
urlpatterns = [
path('', hello_delhi_capitals, name='hello_delhi_capitals'),
]

On Saturday, 15 April 2023 at 13:57:36 UTC+5:30 lalit upadhyay wrote:

>
> *I have replaced URL ‘home/’ to ‘hello/’ but still i got same error*
> On Saturday, April 15, 2023 at 7:29:15 AM UTC+5:30 Muhammad Juwaini Abdul 
> Rahman wrote:
>
>> In your urls.py you use '/hello' but in your browser you type '/home'.
>>
>> On Sat, 15 Apr 2023 at 06:07, lalit upadhyay  
>> wrote:
>>
>>> *I have copied my code here. Plz fix this error:*
>>>
>>>
>>> view.py
>>> from django.http import HttpResponse
>>>
>>>
>>> def hello_delhi_capitals(request):
>>> return HttpResponse('Hello Delhi Capitals!')
>>>
>>>
>>>
>>> myproject/urls.py
>>>
>>> from django.contrib import admin
>>> from django.urls import path, include
>>>
>>> urlpatterns = [
>>> path('admin/', admin.site.urls),
>>> path('hello/', include('myapp.urls')),
>>> ]
>>>
>>>
>>>
>>> myapp/urls.py
>>>
>>>
>>>
>>> from django.urls import path
>>> from .views import hello_delhi_capitals
>>>
>>> urlpatterns = [
>>> path('hello/', hello_delhi_capitals, name='hello_delhi_capitals'),
>>> ]
>>>
>>> -- 
>>> 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/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/django-users/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>>

-- 
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/05527619-3284-4b85-940c-0b698acebef8n%40googlegroups.com.


Re: Django urls error

2023-04-15 Thread አብርሃም መስፍን
remove 'hello' from myapp.py to access the site  on 'hello' or you can
access it at 'hello/hello'

On Sat, Apr 15, 2023, 11:57 AM lalit upadhyay 
wrote:

> I haven't used admin/ in my urls.py in myapp
> from django.urls import path
>
> from . import views
>
> urlpatterns = [
> path('', views.index, name="index"),
> ]
>
> On Saturday, April 15, 2023 at 2:01:53 PM UTC+5:30 Karthik V A wrote:
>
>> Remove admin/ url pattern at urls.py in myapp
>>
>> On Sat, 15 Apr, 2023, 1:58 pm lalit upadhyay, 
>> wrote:
>>
>>>
>>> *I have replaced URL ‘home/’ to ‘hello/’ but still i got same error*
>>> On Saturday, April 15, 2023 at 7:29:15 AM UTC+5:30 Muhammad Juwaini
>>> Abdul Rahman wrote:
>>>
>>>> In your urls.py you use '/hello' but in your browser you type '/home'.
>>>>
>>>> On Sat, 15 Apr 2023 at 06:07, lalit upadhyay 
>>>> wrote:
>>>>
>>>>> *I have copied my code here. Plz fix this error:*
>>>>>
>>>>>
>>>>> view.py
>>>>> from django.http import HttpResponse
>>>>>
>>>>>
>>>>> def hello_delhi_capitals(request):
>>>>> return HttpResponse('Hello Delhi Capitals!')
>>>>>
>>>>>
>>>>>
>>>>> myproject/urls.py
>>>>>
>>>>> from django.contrib import admin
>>>>> from django.urls import path, include
>>>>>
>>>>> urlpatterns = [
>>>>> path('admin/', admin.site.urls),
>>>>> path('hello/', include('myapp.urls')),
>>>>> ]
>>>>>
>>>>>
>>>>>
>>>>> myapp/urls.py
>>>>>
>>>>>
>>>>>
>>>>> from django.urls import path
>>>>> from .views import hello_delhi_capitals
>>>>>
>>>>> urlpatterns = [
>>>>> path('hello/', hello_delhi_capitals, name='hello_delhi_capitals'),
>>>>> ]
>>>>>
>>>>> --
>>>>> 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/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/django-users/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com?utm_medium=email_source=footer>
>>>>> .
>>>>>
>>>> --
>>> 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/e42af2a7-abc4-41dd-a7f6-5f7c8af1630an%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/e42af2a7-abc4-41dd-a7f6-5f7c8af1630an%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
> 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/2354be77-36e2-4674-af00-194e8067924en%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/2354be77-36e2-4674-af00-194e8067924en%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAJZmvP-pguyioKJCiNom%2Bb6RC-6SHOOAsqrKkUVSV3rAsF7LNA%40mail.gmail.com.


Re: Django urls error

2023-04-15 Thread Shaikh Mudassir
In  *myproject/urls.py *you have defined a path *hello/* for *myapp *and 
then again you define *hello/ *for the hello_delhi_capitals method. 
Now, You have two solution
1. You call *http://127.0.0.1:8000/home/home *
2.  You can remove */home* in *myproject/urls.py *
like this *path(**'', include('myapp.urls'))*

On Saturday, April 15, 2023 at 2:01:53 PM UTC+5:30 Karthik V A wrote:

> Remove admin/ url pattern at urls.py in myapp 
>
> On Sat, 15 Apr, 2023, 1:58 pm lalit upadhyay,  
> wrote:
>
>>
>> *I have replaced URL ‘home/’ to ‘hello/’ but still i got same error*
>> On Saturday, April 15, 2023 at 7:29:15 AM UTC+5:30 Muhammad Juwaini Abdul 
>> Rahman wrote:
>>
>>> In your urls.py you use '/hello' but in your browser you type '/home'.
>>>
>>> On Sat, 15 Apr 2023 at 06:07, lalit upadhyay  
>>> wrote:
>>>
>>>> *I have copied my code here. Plz fix this error:*
>>>>
>>>>
>>>> view.py
>>>> from django.http import HttpResponse
>>>>
>>>>
>>>> def hello_delhi_capitals(request):
>>>> return HttpResponse('Hello Delhi Capitals!')
>>>>
>>>>
>>>>
>>>> myproject/urls.py
>>>>
>>>> from django.contrib import admin
>>>> from django.urls import path, include
>>>>
>>>> urlpatterns = [
>>>> path('admin/', admin.site.urls),
>>>> path('hello/', include('myapp.urls')),
>>>> ]
>>>>
>>>>
>>>>
>>>> myapp/urls.py
>>>>
>>>>
>>>>
>>>> from django.urls import path
>>>> from .views import hello_delhi_capitals
>>>>
>>>> urlpatterns = [
>>>> path('hello/', hello_delhi_capitals, name='hello_delhi_capitals'),
>>>> ]
>>>>
>>>> -- 
>>>> 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/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/django-users/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> -- 
>> 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/e42af2a7-abc4-41dd-a7f6-5f7c8af1630an%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/e42af2a7-abc4-41dd-a7f6-5f7c8af1630an%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/21e4cd13-aa48-471f-8d1f-566550a37ddbn%40googlegroups.com.


Re: Django urls error

2023-04-15 Thread Lawal Tobiloba Samuel
What I notice is that wgen you are creating ur urls at the project level,
you used "hello/" and you include the the app level urls.


If you want to request the route from the browser, you are suppose to use
localhost:8000/hello, not localhost:home.



Remember: you did not create a route for "home"

On Fri, Apr 14, 2023, 11:07 PM lalit upadhyay 
wrote:

> *I have copied my code here. Plz fix this error:*
>
>
> view.py
> from django.http import HttpResponse
>
>
> def hello_delhi_capitals(request):
> return HttpResponse('Hello Delhi Capitals!')
>
>
>
> myproject/urls.py
>
> from django.contrib import admin
> from django.urls import path, include
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('hello/', include('myapp.urls')),
> ]
>
>
>
> myapp/urls.py
>
>
>
> from django.urls import path
> from .views import hello_delhi_capitals
>
> urlpatterns = [
> path('hello/', hello_delhi_capitals, name='hello_delhi_capitals'),
> ]
>
> --
> 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/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAAscozW1D25hAXp0qK85vpJi-e0LQ3t4PWvA5yOhtSy%3D93PPRg%40mail.gmail.com.


Re: Django urls error

2023-04-15 Thread Lawal Tobiloba Samuel
So if you want to request you page, it will look like this,
localhost:hello/hello.


At the app level of the urls, you can leave that path empty like this.
path(" ", views.delih.., name = "deliii")


Then you can request you web page as localhost:/hello

On Sat, Apr 15, 2023, 12:38 AM Lawal Tobiloba Samuel <
oluwasheun9...@gmail.com> wrote:

> What I notice is that wgen you are creating ur urls at the project level,
> you used "hello/" and you include the the app level urls.
>
>
> If you want to request the route from the browser, you are suppose to use
> localhost:8000/hello, not localhost:home.
>
>
>
> Remember: you did not create a route for "home"
>
> On Fri, Apr 14, 2023, 11:07 PM lalit upadhyay 
> wrote:
>
>> *I have copied my code here. Plz fix this error:*
>>
>>
>> view.py
>> from django.http import HttpResponse
>>
>>
>> def hello_delhi_capitals(request):
>> return HttpResponse('Hello Delhi Capitals!')
>>
>>
>>
>> myproject/urls.py
>>
>> from django.contrib import admin
>> from django.urls import path, include
>>
>> urlpatterns = [
>> path('admin/', admin.site.urls),
>> path('hello/', include('myapp.urls')),
>> ]
>>
>>
>>
>> myapp/urls.py
>>
>>
>>
>> from django.urls import path
>> from .views import hello_delhi_capitals
>>
>> urlpatterns = [
>> path('hello/', hello_delhi_capitals, name='hello_delhi_capitals'),
>> ]
>>
>> --
>> 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/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

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


Re: Django urls error

2023-04-15 Thread b1t
ou haven't defined the home url that you are trying to access

On Saturday, 15 April 2023 at 03:37:38 UTC+5:30 lalit upadhyay wrote:

> *I have copied my code here. Plz fix this error:*
>
>
> view.py
> from django.http import HttpResponse
>
>
> def hello_delhi_capitals(request):
> return HttpResponse('Hello Delhi Capitals!')
>
>
>
> myproject/urls.py
>
> from django.contrib import admin
> from django.urls import path, include
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('hello/', include('myapp.urls')),
> ]
>
>
>
> myapp/urls.py
>
>
>
> from django.urls import path
> from .views import hello_delhi_capitals
>
> urlpatterns = [
> path('hello/', hello_delhi_capitals, name='hello_delhi_capitals'),
> ]
>

-- 
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/2a78750c-9099-41c7-bc5c-5be0a8c06221n%40googlegroups.com.


Re: Django urls error

2023-04-15 Thread b1t
You are trying to access the home/ URL which u haven't defined yet

On Saturday, 15 April 2023 at 03:37:38 UTC+5:30 lalit upadhyay wrote:

> *I have copied my code here. Plz fix this error:*
>
>
> view.py
> from django.http import HttpResponse
>
>
> def hello_delhi_capitals(request):
> return HttpResponse('Hello Delhi Capitals!')
>
>
>
> myproject/urls.py
>
> from django.contrib import admin
> from django.urls import path, include
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('hello/', include('myapp.urls')),
> ]
>
>
>
> myapp/urls.py
>
>
>
> from django.urls import path
> from .views import hello_delhi_capitals
>
> urlpatterns = [
> path('hello/', hello_delhi_capitals, name='hello_delhi_capitals'),
> ]
>

-- 
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/6e7b6f45-0bb6-41ac-95d6-c2bedfa22690n%40googlegroups.com.


Re: Django urls error

2023-04-15 Thread lalit upadhyay


I haven't used admin/ in my urls.py in myapp
from django.urls import path

from . import views

urlpatterns = [
path('', views.index, name="index"),
]

On Saturday, April 15, 2023 at 2:01:53 PM UTC+5:30 Karthik V A wrote:

> Remove admin/ url pattern at urls.py in myapp 
>
> On Sat, 15 Apr, 2023, 1:58 pm lalit upadhyay,  
> wrote:
>
>>
>> *I have replaced URL ‘home/’ to ‘hello/’ but still i got same error*
>> On Saturday, April 15, 2023 at 7:29:15 AM UTC+5:30 Muhammad Juwaini Abdul 
>> Rahman wrote:
>>
>>> In your urls.py you use '/hello' but in your browser you type '/home'.
>>>
>>> On Sat, 15 Apr 2023 at 06:07, lalit upadhyay  
>>> wrote:
>>>
>>>> *I have copied my code here. Plz fix this error:*
>>>>
>>>>
>>>> view.py
>>>> from django.http import HttpResponse
>>>>
>>>>
>>>> def hello_delhi_capitals(request):
>>>> return HttpResponse('Hello Delhi Capitals!')
>>>>
>>>>
>>>>
>>>> myproject/urls.py
>>>>
>>>> from django.contrib import admin
>>>> from django.urls import path, include
>>>>
>>>> urlpatterns = [
>>>> path('admin/', admin.site.urls),
>>>> path('hello/', include('myapp.urls')),
>>>> ]
>>>>
>>>>
>>>>
>>>> myapp/urls.py
>>>>
>>>>
>>>>
>>>> from django.urls import path
>>>> from .views import hello_delhi_capitals
>>>>
>>>> urlpatterns = [
>>>> path('hello/', hello_delhi_capitals, name='hello_delhi_capitals'),
>>>> ]
>>>>
>>>> -- 
>>>> 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/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/django-users/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> -- 
>> 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/e42af2a7-abc4-41dd-a7f6-5f7c8af1630an%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/e42af2a7-abc4-41dd-a7f6-5f7c8af1630an%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/2354be77-36e2-4674-af00-194e8067924en%40googlegroups.com.


Re: Django urls error

2023-04-15 Thread Karthik V A
Remove admin/ url pattern at urls.py in myapp

On Sat, 15 Apr, 2023, 1:58 pm lalit upadhyay, 
wrote:

>
> *I have replaced URL ‘home/’ to ‘hello/’ but still i got same error*
> On Saturday, April 15, 2023 at 7:29:15 AM UTC+5:30 Muhammad Juwaini Abdul
> Rahman wrote:
>
>> In your urls.py you use '/hello' but in your browser you type '/home'.
>>
>> On Sat, 15 Apr 2023 at 06:07, lalit upadhyay 
>> wrote:
>>
>>> *I have copied my code here. Plz fix this error:*
>>>
>>>
>>> view.py
>>> from django.http import HttpResponse
>>>
>>>
>>> def hello_delhi_capitals(request):
>>> return HttpResponse('Hello Delhi Capitals!')
>>>
>>>
>>>
>>> myproject/urls.py
>>>
>>> from django.contrib import admin
>>> from django.urls import path, include
>>>
>>> urlpatterns = [
>>> path('admin/', admin.site.urls),
>>> path('hello/', include('myapp.urls')),
>>> ]
>>>
>>>
>>>
>>> myapp/urls.py
>>>
>>>
>>>
>>> from django.urls import path
>>> from .views import hello_delhi_capitals
>>>
>>> urlpatterns = [
>>> path('hello/', hello_delhi_capitals, name='hello_delhi_capitals'),
>>> ]
>>>
>>> --
>>> 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/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
> 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/e42af2a7-abc4-41dd-a7f6-5f7c8af1630an%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/e42af2a7-abc4-41dd-a7f6-5f7c8af1630an%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAHjRVdQ%3Dki-wfi%3DHYFpkF9P4cYgYEX6%3DWTD%3D3aWzBHCvB_7LLg%40mail.gmail.com.


Re: Django urls error

2023-04-14 Thread Muhammad Juwaini Abdul Rahman
In your urls.py you use '/hello' but in your browser you type '/home'.

On Sat, 15 Apr 2023 at 06:07, lalit upadhyay 
wrote:

> *I have copied my code here. Plz fix this error:*
>
>
> view.py
> from django.http import HttpResponse
>
>
> def hello_delhi_capitals(request):
> return HttpResponse('Hello Delhi Capitals!')
>
>
>
> myproject/urls.py
>
> from django.contrib import admin
> from django.urls import path, include
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('hello/', include('myapp.urls')),
> ]
>
>
>
> myapp/urls.py
>
>
>
> from django.urls import path
> from .views import hello_delhi_capitals
>
> urlpatterns = [
> path('hello/', hello_delhi_capitals, name='hello_delhi_capitals'),
> ]
>
> --
> 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/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAFKhtoTQB506MC1OwxvHhT23R5kK-0uC5cxcDm3YS3Q6SYM-Pg%40mail.gmail.com.


Re: Django audio recording issue: receiving Bad Request error

2023-04-04 Thread Ahmed omar miladi
i have used it


On Tue, 4 Apr 2023 at 17:40, ritik sahoo  wrote:

> Have you used template inheritance?
>
>
>
>
> On Mon, 27 Mar, 2023, 9:27 pm Yong Zu Yi, <1208z...@gmail.com> wrote:
>
>> I am new to Django and also my first time building an application. I am
>> building an audio journaling application with Django.
>> What I am doing here is a recorder. When user press the recorder button,
>> it will direct to record.html with four buttons, Start, Pause, Resume and
>> Stop. When the user finished recording and hit the Stop button, it will
>> save a audio file (wav). However, I have receive a bad request error and
>> the audio file is not created.
>>
>> I have posted the code at stack overflow:
>> https://stackoverflow.com/q/75853749/21499403
>>
>> Can anyone help me 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/4dd18add-5882-4864-ae99-4c079a17f347n%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/4dd18add-5882-4864-ae99-4c079a17f347n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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/CAJwehCtakRR7ZCEHykPY5wq1CFUjPVfTNOLt3PBoYZJdeHTv1A%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAJwehCtakRR7ZCEHykPY5wq1CFUjPVfTNOLt3PBoYZJdeHTv1A%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

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


Re: Django error while running

2023-04-04 Thread 'JOSE GONZALEZ SANCHEZ' via Django users
That worked for me
Thanks!

El lunes, 27 de marzo de 2023 a las 20:02:03 UTC+2, Makan Dianka escribió:

> Run this command> pip install -r requirements.txt
>
> Le mercredi 22 mars 2023 à 13:53:15 UTC+1, James Kalu a écrit :
>
>> 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?
>>>
>>>
>>>
>>>
-- 


"Este mensaje está
dirigido de manera exclusiva a su destinatario y puede 
contener información
privada y confidencial. No lo reenvíe, copie o 
distribuya a terceros que no
deban conocer su contenido. En caso de haberlo 
recibido por error,  rogamos
lo notifique al remitente y proceda a su 
borrado, así como al de cualquier
documento que pudiera adjuntarse.



 Por 
favor tenga en cuenta que
los correos enviados vía Internet no permiten 
garantizar la confidencialidad de
los mensajes ni su transmisión de forma 
íntegra.



 Las opiniones expresadas en el
presente correo pertenecen 
únicamente al remitente y no representan
necesariamente la opinión del 
Grupo BBVA."



 "This
message is intended exclusively for the adressee and 
may contain privileged and
confidential information. Please, do not 
disseminate, copy or distribute it to
third parties who should not receive 
it. In case you have received it by
mistake, please inform the sender and 
delete the message and attachments from
your system.



 Please
keep in 
mind that e-mails sent by Internet do not allow to guarantee neither
the 
confidentiality or the integrity of the messages sent."

-- 
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/2f9f092f-eec3-4606-b4fc-35a0699ac402n%40googlegroups.com.


Re: Django audio recording issue: receiving Bad Request error

2023-04-04 Thread ritik sahoo
Have you used template inheritance?




On Mon, 27 Mar, 2023, 9:27 pm Yong Zu Yi, <1208z...@gmail.com> wrote:

> I am new to Django and also my first time building an application. I am
> building an audio journaling application with Django.
> What I am doing here is a recorder. When user press the recorder button,
> it will direct to record.html with four buttons, Start, Pause, Resume and
> Stop. When the user finished recording and hit the Stop button, it will
> save a audio file (wav). However, I have receive a bad request error and
> the audio file is not created.
>
> I have posted the code at stack overflow:
> https://stackoverflow.com/q/75853749/21499403
>
> Can anyone help me 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/4dd18add-5882-4864-ae99-4c079a17f347n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/4dd18add-5882-4864-ae99-4c079a17f347n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

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


Re: Error: name 'include' is not defined

2023-04-02 Thread Larry Stevens
Perfect, thank you
Larry Stevens
(571) 289-7658


On Wed, Mar 22, 2023 at 9:49 AM 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
>> <https://groups.google.com/d/msgid/django-users/4e2c7426-b451-4542-9629-52d4f4707a94n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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/hi9S4ZEcla4/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/CAO73PDopg--cbbBgX3OQuNwfp%3DyMpSf_Uzga894CXvzOAy1mAA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAO73PDopg--cbbBgX3OQuNwfp%3DyMpSf_Uzga894CXvzOAy1mAA%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAC%3DJtzTefewf0Eyse96_StScLAb6ps7bqNTpHT8rybLTB-5QOQ%40mail.gmail.com.


Re: Debug error when c

2023-04-01 Thread Alen Zuvic
pet, 31. ožu 2023. 07:23 Usra Saeed  je napisao:

> Hi, are you installing django on Visual Studio and during this
> installation you got this error?
>
> On Thu, 30 Mar 2023, 10:48 pm Ricky Abura,  wrote:
>
>> Hi,
>> I am learning django, in the process of developing youtube clone, I meet
>> the attached error when installing django debug toolbar. I don't know where
>> I am not getting right but I strictly follow some tutorial. Any assistance
>> 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/fd470375-10c2-4c97-93d3-feaed4130dc1n%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/fd470375-10c2-4c97-93d3-feaed4130dc1n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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/CABKCzOOGpi-gCEhS1Hjuz1-f1vAsO9Lekv%3DHDocmT6XQF_H2Ng%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CABKCzOOGpi-gCEhS1Hjuz1-f1vAsO9Lekv%3DHDocmT6XQF_H2Ng%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAABMtprYapUegE5yp8rHij6QcR2O%3D9YED27qUpo%3D0VkAe6RwUw%40mail.gmail.com.


Re: Debug error when c

2023-04-01 Thread Prosper Lekia
Remove the second urlpattern, and add the debug_toolbar path to the first 
urlpattern. Try running makemigrations and migrate after installing the 
debug_toolbar.

On Thursday, March 30, 2023 at 6:48:51 PM UTC+1 Ricky Abura wrote:

> Hi,
> I am learning django, in the process of developing youtube clone, I meet 
> the attached error when installing django debug toolbar. I don't know where 
> I am not getting right but I strictly follow some tutorial. Any assistance 
> 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/36cfe6fe-4186-4fa8-9c31-9e57a0428c03n%40googlegroups.com.


Re: Debug error when c

2023-03-30 Thread Usra Saeed
In urls.py file your mentioned url is not existed

On Thu, 30 Mar 2023, 10:48 pm Ricky Abura,  wrote:

> Hi,
> I am learning django, in the process of developing youtube clone, I meet
> the attached error when installing django debug toolbar. I don't know where
> I am not getting right but I strictly follow some tutorial. Any assistance
> 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/fd470375-10c2-4c97-93d3-feaed4130dc1n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/fd470375-10c2-4c97-93d3-feaed4130dc1n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CABKCzOM1K%2BQVucpM2D22SGvESpaV%2BjdBZ3HPcVGX3Mp2OzK76g%40mail.gmail.com.


Re: Debug error when c

2023-03-30 Thread Usra Saeed
Hi, are you installing django on Visual Studio and during this installation
you got this error?

On Thu, 30 Mar 2023, 10:48 pm Ricky Abura,  wrote:

> Hi,
> I am learning django, in the process of developing youtube clone, I meet
> the attached error when installing django debug toolbar. I don't know where
> I am not getting right but I strictly follow some tutorial. Any assistance
> 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/fd470375-10c2-4c97-93d3-feaed4130dc1n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/fd470375-10c2-4c97-93d3-feaed4130dc1n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CABKCzOOGpi-gCEhS1Hjuz1-f1vAsO9Lekv%3DHDocmT6XQF_H2Ng%40mail.gmail.com.


Re: Debug error when c

2023-03-30 Thread Chetan Ganji
You are trying to hit a url that doesnt exist in your django app
Documentation says you have to add it url, but you dont have to visit that
url.
https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#add-the-urls

When you visit any other url in the app, one toolbar will be shown in the
right hand side of the display.

Try this out
https://www.youtube.com/watch?v=qWLk9S6mvAY

I hope it helps you!

Regards,
Chetan Ganji
+91-900-483-4183
ganji.che...@gmail.com
http://ryucoder.in


On Thu, Mar 30, 2023 at 11:18 PM Ricky Abura  wrote:

> Hi,
> I am learning django, in the process of developing youtube clone, I meet
> the attached error when installing django debug toolbar. I don't know where
> I am not getting right but I strictly follow some tutorial. Any assistance
> 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/fd470375-10c2-4c97-93d3-feaed4130dc1n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/fd470375-10c2-4c97-93d3-feaed4130dc1n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAMKMUjuMyU-y8ysQ7rWJ4WNk04ZxbD7NBNT%3D8aZj6Ke-tcjoMA%40mail.gmail.com.


Debug error when c

2023-03-30 Thread Ricky Abura
Hi,
I am learning django, in the process of developing youtube clone, I meet 
the attached error when installing django debug toolbar. I don't know where 
I am not getting right but I strictly follow some tutorial. Any assistance 
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/fd470375-10c2-4c97-93d3-feaed4130dc1n%40googlegroups.com.


Re: Error installing mysqlclient in WSL2, Ubuntu 20.04.

2023-03-29 Thread Anh Nguyen
I highly recommend use docker for it
On Tue, 28 Mar 2023 at 04:17 Hernan Gustavo  wrote:

> This is a problem with the legacy install. Try to install it with the
> command pip install mysqlclient --use-pep517
>
> El dom, 26 mar 2023 a la(s) 14:42, Muhammed Lawal (
> lawalmuhammed...@gmail.com) escribió:
>
>> Hello everyone.
>> I'm trying to setup MySQL server for my django project but I couldn't get
>> past installing mysqlclient. I've tried using pip3 and pipenv to install it
>> but I'm getting errors and also, I've tried all possible solutions I could
>> find online. Installed all the build dependencies yet still the same.
>> Please help me out of this.
>>
> --
>> 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/CAOzVPC9xMooBEUqJmdXFzN3Mvd8hbmPcjxpTt9ZR8%3D%3DHr_qmXg%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/CAH6XLKi6c%2BTyTO5xaw1esFwOwbUcu_J6gCZDQkkEvLCH4CSqcw%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/CAKaoNbTGKTTXmBgJH5m8hRcN0aYG2N1YjpZe09HF9DcSARa1Cg%40mail.gmail.com.


Re: Error installing mysqlclient in WSL2, Ubuntu 20.04.

2023-03-27 Thread Hernan Gustavo
This is a problem with the legacy install. Try to install it with the
command pip install mysqlclient --use-pep517

El dom, 26 mar 2023 a la(s) 14:42, Muhammed Lawal (
lawalmuhammed...@gmail.com) escribió:

> Hello everyone.
> I'm trying to setup MySQL server for my django project but I couldn't get
> past installing mysqlclient. I've tried using pip3 and pipenv to install it
> but I'm getting errors and also, I've tried all possible solutions I could
> find online. Installed all the build dependencies yet still the same.
> Please help me out of this.
>
> --
> 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/CAOzVPC9xMooBEUqJmdXFzN3Mvd8hbmPcjxpTt9ZR8%3D%3DHr_qmXg%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/CAH6XLKi6c%2BTyTO5xaw1esFwOwbUcu_J6gCZDQkkEvLCH4CSqcw%40mail.gmail.com.


Re: Django error while running

2023-03-27 Thread Makan Dianka
Run this command> pip install -r requirements.txt

Le mercredi 22 mars 2023 à 13:53:15 UTC+1, James Kalu a écrit :

> 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/a38cb8a1-548f-4f13-af17-cd08c4e1b1e3n%40googlegroups.com.


Django audio recording issue: receiving Bad Request error

2023-03-27 Thread Yong Zu Yi
I am new to Django and also my first time building an application. I am 
building an audio journaling application with Django. 
What I am doing here is a recorder. When user press the recorder button, it 
will direct to record.html with four buttons, Start, Pause, Resume and 
Stop. When the user finished recording and hit the Stop button, it will 
save a audio file (wav). However, I have receive a bad request error and 
the audio file is not created.

I have posted the code at stack overflow:
https://stackoverflow.com/q/75853749/21499403

Can anyone help me 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/4dd18add-5882-4864-ae99-4c079a17f347n%40googlegroups.com.


Re: Error: name 'include' is not defined

2023-03-23 Thread Ikrombek
How can I use for dental clinic, For example, do I need to include 32 
fields from the model to specify 32 teeth, or is there a way to do it in 
one?

On Wednesday, March 22, 2023 at 8:24:18 PM UTC+5 Larry Stevens wrote:

> 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
>>>>  
>>>> <https://groups.google.com/d/msgid/django-users/4e2c7426-b451-4542-9629-52d4f4707a94n%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> -- 
>>> 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
>>>  
>>> <https://groups.google.com/d/msgid/django-users/CAO73PDopg--cbbBgX3OQuNwfp%3DyMpSf_Uzga894CXvzOAy1mAA%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>>

-- 
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/09b7fb6b-f025-49a9-b46a-ad456afea0dan%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
>>>  
>>> <https://groups.google.com/d/msgid/django-users/4e2c7426-b451-4542-9629-52d4f4707a94n%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> -- 
>> 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
>>  
>> <https://groups.google.com/d/msgid/django-users/CAO73PDopg--cbbBgX3OQuNwfp%3DyMpSf_Uzga894CXvzOAy1mAA%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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
>> <https://groups.google.com/d/msgid/django-users/4e2c7426-b451-4542-9629-52d4f4707a94n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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
> <https://groups.google.com/d/msgid/django-users/CAO73PDopg--cbbBgX3OQuNwfp%3DyMpSf_Uzga894CXvzOAy1mAA%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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: 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
> <https://groups.google.com/d/msgid/django-users/4e2c7426-b451-4542-9629-52d4f4707a94n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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
> <https://groups.google.com/d/msgid/django-users/4e2c7426-b451-4542-9629-52d4f4707a94n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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
>>> <https://groups.google.com/d/msgid/django-users/em0481748f-3902-4383-be37-4f591c38c5c5%4090728edb.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> 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
>> <https://groups.google.com/d/msgid/django-users/CA%2BPOfqNs%2B9ih8ehTKq%2BoyG%3DZyK70WOWi4XJidGA9OY9rt2gqwQ%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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
> <https://groups.google.com/d/msgid/django-users/CAE9AdkY%2B6vKjY2b6Ag5Xr3pbHYWGZh8FT4_7P%2BYM_EiFzbcs-g%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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
>> <https://groups.google.com/d/msgid/django-users/em0481748f-3902-4383-be37-4f591c38c5c5%4090728edb.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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
> <https://groups.google.com/d/msgid/django-users/CA%2BPOfqNs%2B9ih8ehTKq%2BoyG%3DZyK70WOWi4XJidGA9OY9rt2gqwQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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
> <https://groups.google.com/d/msgid/django-users/em0481748f-3902-4383-be37-4f591c38c5c5%4090728edb.com?utm_medium=email_source=footer>
> .
>

-- 
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',
 

  1   2   3   4   5   6   7   8   9   10   >