Eben
I have a simple project with one model that I want to host. should I use the default database (sqlite)or change to postgresql
Abhi
Eben
It's a simple blog for now. But I might add additional functionalities in future.
Mehda
Has idea about link between django and flutter
Charly
Maxim
Charly
Anurag K
how to make a group video conference call using django
Excellent
richtext text editors
Danish
Guys, how can i deploy Django with redis as message broker and celery as background task processes to GCP compute engine
Doragonsureiyā
richtext text editors
This is not a Django specific question, please delete your offtopic message.
If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
Excellent
we use richtext editors, in django i have tried ckeditor, quill, summernote they dont work on deployment.
Soham
Anyone have deployed a django ninja server ? And does it costly compared to the DRF ?
Nasredeen Abdulhaleem
Mirco
Soham
Nasredeen Abdulhaleem
Too costly
It isn't costly
Ортонормированная
https://github.com/dura0ok/photocenter-django/blob/master/entities/apps.py#L6
https://pastebin.com/UQyudu4L error
please help
Vitaly
Ортонормированная
Show models.py
https://github.com/dura0ok/photocenter-django/blob/master/entities/models.py
Georg
oh.. excuse me))
Is there a way to make one (or two) model "committing on any writes" even transaction is not ended. I need to see this data "right now" and store it even transaction is rolled back
Vitaly
PΛRSΛM
hey I got Matching query does not exist  in drf
dpaste.org/YnGCT
Ортонормированная
ABOLFAZL
Hello to all of you, I am 16 years old and I learned programming. Where can I get a project?
Mirco
Mirco
ABOLFAZL
I am a backend programmer, can I work for companies?
Shiny
ABOLFAZL
Ортонормированная
class CustomUserAdmin(UserAdmin):
fieldsets = UserAdmin.fieldsets + (
(None, {'fields': ('outlet',)}),
)
add_fieldsets = UserAdmin.add_fieldsets + (
(None, {'fields': ('outlet',)}),
)
list_display = UserAdmin.list_display + ('outlet',)
class CustomUser(AbstractUser):
outlet = models.ForeignKey(
Outlet,
on_delete=models.CASCADE,
related_name='users',
null=True,
blank=True
)
Why new field not see in django admin add new or edit some
Error
RAEKEN
File "C:\Users\PC\Desktop\my django project\virtualenv\Lib\site-packages\django\apps\registry.py", line 91, in populate
app_config = AppConfig.create(entry)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\PC\Desktop\my django project\virtualenv\Lib\site-packages\django\apps\config.py", line 193, in create
import_module(entry)
File "C:\Users\PC\AppData\Local\Programs\Python\Python312\Lib\importlib\__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1381, in _gcd_import
File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
File "<frozen importlib._bootstrap>", line 1318, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'car'
RAEKEN
can someone help me out with this?
🏅♐Mark
🏅♐Mark
class CustomUserAdmin(UserAdmin):
fieldsets = UserAdmin.fieldsets + (
(None, {'fields': ('outlet',)}),
)
add_fieldsets = UserAdmin.add_fieldsets + (
(None, {'fields': ('outlet',)}),
)
list_display = UserAdmin.list_display + ('outlet',)
class CustomUser(AbstractUser):
outlet = models.ForeignKey(
Outlet,
on_delete=models.CASCADE,
related_name='users',
null=True,
blank=True
)
Why new field not see in django admin add new or edit some
How you send this type media?
Excellent
File "C:\Users\PC\Desktop\my django project\virtualenv\Lib\site-packages\django\apps\registry.py", line 91, in populate
app_config = AppConfig.create(entry)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\PC\Desktop\my django project\virtualenv\Lib\site-packages\django\apps\config.py", line 193, in create
import_module(entry)
File "C:\Users\PC\AppData\Local\Programs\Python\Python312\Lib\importlib\__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1381, in _gcd_import
File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
File "<frozen importlib._bootstrap>", line 1318, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'car'
create a model named car
Excellent
head to models.py
RAEKEN
Sure, so what's the next thing I do
Levitybot
Hello to all of you, I am 16 years old and I learned programming. Where can I get a project?
Slm. Get a VPN setup on your PC, change your DNS to Google 8.8.8.8 and then go to YouTube. Filter by upload date, and search the key technologies you want to learn. E.g. "Django HTMX" or "Django Rest Framework". You will find channels with playlists building apps. Find an app that is similar to what you want to build and watch the playlist. They will typically link to the code in their GitHub that you can clone to your PC to code along or reference.
Levitybot
class CustomUserAdmin(UserAdmin):
fieldsets = UserAdmin.fieldsets + (
(None, {'fields': ('outlet',)}),
)
add_fieldsets = UserAdmin.add_fieldsets + (
(None, {'fields': ('outlet',)}),
)
list_display = UserAdmin.list_display + ('outlet',)
class CustomUser(AbstractUser):
outlet = models.ForeignKey(
Outlet,
on_delete=models.CASCADE,
related_name='users',
null=True,
blank=True
)
Why new field not see in django admin add new or edit some
Are you definitely seeing the 'CustomUser' and not just the built in 'User'? Not sure if you need to add your CustomUser to admin.py to get it to show up in the admin like you do with all other models.
RAEKEN
Someone help me out, I rendered an HTML template in django and only the HTML appearance came, my guess is, I didn't put the css and JavaScript file into the static folder
Am I correct on that?
Asr
RAEKEN
I literally haven't created a static folder for the CSS and JavaScript file, I've put the HTML CSS and JavaScript file, all in the template folder.
So I'd want to know, putting the CSS and JavaScript in static folder and HTML file also in the template folder, is the right thing to do
RAEKEN
Or I could just do away with them all being in the template folder
Levitybot
RAEKEN
Thanks for your great help, much appreciated 🙏
ᅠ ᅠ
how to enable 2FA google authentication in django?
ᅠ ᅠ
nyctophile
hey guys!
need your help,
i deployed my api and frontend applications, but i am getting cors errors even if configured the cors ,
https://ibb.co/MShhfBx this is the error i am getting,
and this my settings.py https://hastebin.com/share/asagewarec.python
can anyone help please?
Abdallah
How I can get job in Django
حسناء عياش
hello
anyone have an idea about good courses ( restApi for beginners ) ?
Dirn
hey guys!
need your help,
i deployed my api and frontend applications, but i am getting cors errors even if configured the cors ,
https://ibb.co/MShhfBx this is the error i am getting,
and this my settings.py https://hastebin.com/share/asagewarec.python
can anyone help please?
Set CORS_ALLOWED_ORIGINS = [
'Your url without https://'
]
CORS_ORIGIN_ALLOW_ALL = True
CORS_ALLOW_HEADERS = [
'accept',
'accept-encoding',
'authorization',
'content-type',
'dnt',
'origin',
'user-agent',
'x-csrftoken',
'x-requested-with',
]
mahyar
Introduce a checkeditor that has both block code and Rtl
nyctophile
Doragonsureiyā
This is not a Django specific question, please delete your offtopic message.
If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
Abhi
Hey how we used microservices in django application
Abhi
Like we create apps for every function like login or anything
RAEKEN
<form id="signUpForm" action="" method="get">
<label for="fullname">Full Name:</label>
<input type="text" id="fullname" name="fullname" required>
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
<button type="submit" class="button">Sign Up</button>
</form>
RAEKEN
how do i redirect this signup page to another page in django?
RAEKEN
and can someone help me out with how the javascripts will look like?
Kriti
def test_check_alertsetting_inline(self, check) :
test_user = self._create_user(
username='test', email='test@inline.com', is_staff=True
)
self._create_org_user(is_admin=True, user=test_user)
device = self._create_device()
ping_check = Check(
check_type=CHECK_CLASSES[0][0], content_object=device, params={}
)
ping_check.full_clean()
ping_check.save()
url = reverse('admin:config_device_change', args=[device.pk])
metric = self._create_general_metric(
name='', content_object=device, configuration='ping'
)
self._create_alert_settings(metric=metric)
self.client.force_login(test_user)
Even if I write the positional argument, it still says:
Total slow tests detected: 56
======================================================================
ERROR: test_check_alertsetting_inline (openwisp_monitoring.device.tests.test_admin.TestAdmin)
----------------------------------------------------------------------
TypeError: TestAdmin.test_check_alertsetting_inline() missing 1 required positional argument: 'check'
Where am I getting wrong?
clouded
def test_check_alertsetting_inline(self, check) :
test_user = self._create_user(
username='test', email='test@inline.com', is_staff=True
)
self._create_org_user(is_admin=True, user=test_user)
device = self._create_device()
ping_check = Check(
check_type=CHECK_CLASSES[0][0], content_object=device, params={}
)
ping_check.full_clean()
ping_check.save()
url = reverse('admin:config_device_change', args=[device.pk])
metric = self._create_general_metric(
name='', content_object=device, configuration='ping'
)
self._create_alert_settings(metric=metric)
self.client.force_login(test_user)
Even if I write the positional argument, it still says:
Total slow tests detected: 56
======================================================================
ERROR: test_check_alertsetting_inline (openwisp_monitoring.device.tests.test_admin.TestAdmin)
----------------------------------------------------------------------
TypeError: TestAdmin.test_check_alertsetting_inline() missing 1 required positional argument: 'check'
Where am I getting wrong?
What do you use for testing?