Re: __init__() got an unexpected keyword argument 'on delete' when make migrations

2021-12-06 Thread Khánh Hoàng

Yes, I found it.
Thank you for replying.
Vào lúc 11:43:22 UTC+7 ngày Thứ Hai, 6 tháng 12, 2021, 
aashishk...@gmail.com đã viết:

> ManyToManyField doesn’t need on_delete attribute 
>
> Remove on_delete attribute 
>
> On Mon, 6 Dec 2021 at 9:05 AM, Thomas Lockhart  
> wrote:
>
>> Please use polite language. Thank you.
>>
>> - Tom
>>
>> On Dec 5, 2021, at 5:21 PM, Anurag Agarwal  wrote:
>>
>> Why are you fucking passing the args
>> On_delete in manytomany . Class
>>
>>   promotion = models.ManyToManyField(Promotions, 
>> on_delete=models.CASCADE)
>>
>>
>> On Sun, Dec 5, 2021, 21:09 Samuel Nogueira  wrote:
>>
>>> Please, can you take some prints of your models?
>>>
>>> Em dom., 5 de dez. de 2021 12:34, Khánh Hoàng  
>>> escreveu:
>>>
 Hi everyone, I am new to programming, more than 4 months, I had an 
 issue when making  migrations for my apps. 

 I run :" python manage.py makemigrations " and  I got a error.
  It said:  TypeError: __init__() got an unexpected keyword argument 'on 
 delete'
 I'm Using Django 3.2.9 
 Can someone explain it for me? And how to fix it.

 Thanks and Regards,
 Khanh Hoang

 -- 
 You received this message because you are subscribed 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/b5adebe5-05b0-4c33-b164-85fda53e13cbn%40googlegroups.com
  
 
 .

>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to django-users...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/CAOJT-cB8%3DxmYBFPykbRxAdagN-PoDQQRne-r8MjHLZk2MX7j9w%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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CAOuTKWKubiOk%3D%3DezHsSfP_k%2BamwPma7FUP1Goe%3DKBxcvWu03pQ%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...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/190AFFA2-900F-4D18-A7A7-ED1925586E37%40gmail.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b90ebb06-335e-4936-b790-2863b9cbbda8n%40googlegroups.com.


Student Management System kin Django

2021-12-06 Thread Eugene TUYIZERE
Dear Team,

I am developing a student management system and I am stuck at the point
below which I need your idea.

I need to record school fees every semester and promote a student from one
level (year) to the next level every year. Like 1st Year to second year.

How can I achieve this to avoid data duplication in the database.

Regards,

-- 
*Eugene*

-- 
You received this message because you are subscribed 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/CABxpZHubDPpuLt5bfpD10FWinnBSjZLT6sJs717NXzqhiThFWg%40mail.gmail.com.


Re: Student Management System kin Django

2021-12-06 Thread Gilwell Muhati
Hello @Eugene
What does your ERD diagram look like? - Please share the diagram




*Regards,Gilwell Muhati | +254 710 739 116 | *
*~~“The mind is its own place and in itself can make a heaven of hell, a
hell of heaven…”~~John Milton *


On Mon, Dec 6, 2021 at 1:14 PM Eugene TUYIZERE 
wrote:

> Dear Team,
>
> I am developing a student management system and I am stuck at the point
> below which I need your idea.
>
> I need to record school fees every semester and promote a student from one
> level (year) to the next level every year. Like 1st Year to second year.
>
> How can I achieve this to avoid data duplication in the database.
>
> Regards,
>
> --
> *Eugene*
>
> --
> You received this message because you are subscribed 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/CABxpZHubDPpuLt5bfpD10FWinnBSjZLT6sJs717NXzqhiThFWg%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/CALO4FhHouSYeK3kVCu696XP5xgnC9cY1KJ7wDVPU36jVPiwh0A%40mail.gmail.com.


Re: Student Management System kin Django

2021-12-06 Thread Eugene TUYIZERE
Dear Gilwell,

That is where I want an idea. I do not understand how I do the diagram.

Thanks

On Mon, 6 Dec 2021 at 12:30, Gilwell Muhati  wrote:

> Hello @Eugene
> What does your ERD diagram look like? - Please share the diagram
>
>
>
>
> *Regards,Gilwell Muhati | +254 710 739 116 | *
> *~~“The mind is its own place and in itself can make a heaven of hell, a
> hell of heaven…”~~John Milton *
>
>
> On Mon, Dec 6, 2021 at 1:14 PM Eugene TUYIZERE 
> wrote:
>
>> Dear Team,
>>
>> I am developing a student management system and I am stuck at the point
>> below which I need your idea.
>>
>> I need to record school fees every semester and promote a student from
>> one level (year) to the next level every year. Like 1st Year to second year.
>>
>> How can I achieve this to avoid data duplication in the database.
>>
>> Regards,
>>
>> --
>> *Eugene*
>>
>> --
>> You received this message because you are subscribed 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/CABxpZHubDPpuLt5bfpD10FWinnBSjZLT6sJs717NXzqhiThFWg%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/CALO4FhHouSYeK3kVCu696XP5xgnC9cY1KJ7wDVPU36jVPiwh0A%40mail.gmail.com
> 
> .
>


-- 
*TUYIZERE Eugene*



*Msc Degree in Mathematical Science*

*African Institute for Mathematical Sciences (AIMS Cameroon)Crystal
Garden-Lime, Cameroon*

Bsc in Computer Science

*UR-Nyagatare Campus*

Email: eugene.tuyiz...@aims-cameroon.org
   eugenetuyiz...@gmail.com

Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38

-- 
You received this message because you are subscribed 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/CABxpZHvG%2BatXxV4Os_UNs3YsxPxcU7YBkDxGmDNAES1zsJoY4w%40mail.gmail.com.


Re: could not connect to server: Connection refused Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?

2021-12-06 Thread CHANDNI SINGH
hey,
i am facing the same problem
can you please guide me on how to solve that issue ???

On Thursday, 16 May, 2019 at 6:38:01 pm UTC+5:30 randmw...@gmail.com wrote:

> First, you should not share your password to your server to anyone….thats 
> very dangerous.  Now anyone can log in to your server with nefarious 
> intentions.  
> Be more careful.
>
> But it sounds like something on the server is blocking your connection.  
>
> On May 16, 2019, at 8:57 AM, omar ahmed  wrote:
>
> hii ..
> i try to publish my first project on python anywhere but it still not 
> working and this is my error :
> could not connect to server: Connection refused Is the server running on 
> host "localhost" (::1) and accepting TCP/IP connections on port 5432? could 
> not connect to server: Connection refused Is the server running on host 
> "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432? 
> could not connect to server: Connection refused Is the server running on 
> host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
> and this is my db settings  :
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.postgresql_psycopg2',
> 'NAME': 'arena',
> 'USER': 'arenadbuser',
> 'PASSWORD': 'mlo9**@la',
> 'HOST': 'localhost',
> 'PORT': '',
> }
> }
>
> -- 
> You received this message because you are subscribed 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 post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/93204eb8-f5e3-43bf-98ff-b79478bce544%40googlegroups.com
>  
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed 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/7b66cbaf-e069-48db-ae46-8fea37c3644an%40googlegroups.com.


Play audio File

2021-12-06 Thread Shada Bahassan
  Hello everyone,

I'm a beginner on Django.

I have audio files and I want to read the path when I click the play 
button. I discovered some resources that upload audio files as object 
models. but I don't want to handle as the model, I just want to read it 
when I call the play sound method.

Any pointers in the right direction would be greatly appreciated.

-- 
You received this message because you are subscribed 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/765bcbf2-aeac-4825-96cd-c61798930babn%40googlegroups.com.


Urgent need help regarding to localhost

2021-12-06 Thread CHANDNI SINGH
-- 
You received this message because you are subscribed 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/5c17e537-8d17-4da0-9193-4133e2808527n%40googlegroups.com.


Sorting in Django admin site on different locale

2021-12-06 Thread Roland Leners
I am currently learning Python and Django via building a simple Web 
application. It involves objects with character fields that take values in 
different languages (French and Spanish) and I face an issue with sorting 
on those values in the Django administration site. 

Here are sample sets:
French: dataFr = ['être', 'gronder', 'gérer', 'éviter', 'exiger']
Spanish: dataEs = ['dos', 'acompasar', 'acompañar', 'día']

The following works fine in Python:

import locale
locale.setlocale(locale.LC_ALL,"fr_FR.utf8") 
sorted(dataFr, key=locale.strxfrm) 
> ['être', 'éviter', 'exiger', 'gérer', 'gronder'] #which is the desired 
result.
sorted(dataEs, key=locale.strxfrm)
> ['acompañar', 'acompasar', 'día', 'dos'] #which is also the desired 
result.

(French as well as Spanish local settings seem to work indifferently for 
sorting  French and Spanish)

In Django, the simplified model is as follows:

from django import models

class Word(models.Model):
content = models.CharField(max_length=32, unique=True)
class Meta:
abstract = True

class FrenchWord(Word)

The relevant part of the admin.py file is:

from django.contrib import admin
from .models import FrenchWord

@admin.register(FrenchWord)
class FrenchWord(admin.ModelAdmin):
list_display = ('content',)
ordering = ('content',)

Now my question is how to enforce ordering according to the fr_FR.utf8 
locale? I have tried all kinds of stuff, taking inspiration from various 
sites, but I do not succeed.

Thanks in advance.

-- 
You received this message because you are subscribed 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/865309b0-8869-4542-8ff4-b4941ecd4f47n%40googlegroups.com.


Re: Urgent need help regarding to localhost

2021-12-06 Thread Bernard Mallala
What troubleshooting have you attempted so far?
What is the composition of your development environment?
Have you checked if the port is open to eliminate firewall and or network 
related issues?
Have you checked to make sure that your postgres database server is running?
Are you able to connect and authenticate to your postgres database in 
command line and terminal ?
e.t.c.

On Monday, December 6, 2021 at 7:36:20 AM UTC-7 singhch...@gmail.com wrote:

>

-- 
You received this message because you are subscribed 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/87de4ed1-73f3-4c94-9abe-b025ab273d42n%40googlegroups.com.


Re: Student Management System kin Django

2021-12-06 Thread Bernard Mallala
Eugene,

Your question is very broad. The combination of the business logic for the 
student management system plus database normalization best practices will 
result in the right database schema for this platform.
Example business logic :
- User must have a B or higher to be eligible to move to the next grade or 
auto upgraded to the next grade
- User can be upgraded to the next grade but will not be eligible to enroll 
if the account balance for the prior year is not zero

Some of the business rules will guide your database design/model creation.

You need to be able to do the above resulting in an ERD which you can then 
share and someone can then offer additional feedback.


On Monday, December 6, 2021 at 3:35:53 AM UTC-7 eugenet...@gmail.com wrote:

> Dear Gilwell,
>
> That is where I want an idea. I do not understand how I do the diagram.
>
> Thanks 
>
> On Mon, 6 Dec 2021 at 12:30, Gilwell Muhati  wrote:
>
>> Hello @Eugene
>> What does your ERD diagram look like? - Please share the diagram 
>>
>>
>>
>>
>> *Regards,Gilwell Muhati | +254 710 739 116 | *
>> *~~“The mind is its own place and in itself can make a heaven of hell, a 
>> hell of heaven…”~~John Milton *
>>
>>
>> On Mon, Dec 6, 2021 at 1:14 PM Eugene TUYIZERE  
>> wrote:
>>
>>> Dear Team,
>>>
>>> I am developing a student management system and I am stuck at the point 
>>> below which I need your idea.
>>>
>>> I need to record school fees every semester and promote a student from 
>>> one level (year) to the next level every year. Like 1st Year to second year.
>>>
>>> How can I achieve this to avoid data duplication in the database.
>>>
>>> Regards, 
>>>
>>> -- 
>>> *Eugene*
>>>
>>> -- 
>>> You received this message because you are subscribed 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/CABxpZHubDPpuLt5bfpD10FWinnBSjZLT6sJs717NXzqhiThFWg%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...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CALO4FhHouSYeK3kVCu696XP5xgnC9cY1KJ7wDVPU36jVPiwh0A%40mail.gmail.com
>>  
>> 
>> .
>>
>
>
> -- 
> *TUYIZERE Eugene*
>
>
>
> *Msc Degree in Mathematical Science*
>
> *African Institute for Mathematical Sciences (AIMS Cameroon)Crystal 
> Garden-Lime, Cameroon*
>
> Bsc in Computer Science
>
> *UR-Nyagatare Campus*
>
> Email: eugene@aims-cameroon.org
>eugenet...@gmail.com
>
> Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38
>

-- 
You received this message because you are subscribed 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/c07ec2bf-4012-4fde-9577-cca8fa35db5dn%40googlegroups.com.


Django security releases issued: 3.2.10, 3.1.14, and 2.2.25

2021-12-06 Thread Mariusz Felisiak

Details are available on the Django project weblog:

https://www.djangoproject.com/weblog/2021/dec/07/security-releases/

--
You received this message because you are subscribed 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/57fa800c-96e3-894b-2b1e-53d4bd20d653%40gmail.com.