Anonymous
When I try to include the app in Django project main URL. I'm getting an error https://dpaste.org/WGLo
Anonymous
When I try to include the app in Django project main URL. I'm getting an error https://dpaste.org/WGLo
The included URLconf 'ecommerce_webportal.urls' does not appear to have any patterns in it. If you see valid patterns in the file then the issue is probably caused by a circular import.
Jai
I want to call a view after every certain amount of time, can someone help me on how do I implement this
âshîsh
I want to call a view after every certain amount of time, can someone help me on how do I implement this
If you want to do it from web browser then use JavaScript to trigger the view after a particular time.
Ghorz
Do not develop bad habit with Django. Modern Web is no more based on click and lock. Know and user Vanilla Javascript or js framework like the back of your hands. Then always write API based views not request based views. With the above, you'll be glad
Isaac
lotta*
Isaac
Do not develop bad habit with Django. Modern Web is no more based on click and lock. Know and user Vanilla Javascript or js framework like the back of your hands. Then always write API based views not request based views. With the above, you'll be glad
Writing API based views helps on a long run. Like later in a project, you'd wanna create an android app or a desktop app for your Web app. Starting with or rather using API based views would help. A lot
Isaac
DRF and POSTMAN is a very good combo 👌
Sourabh
Select username, mobile from Vehicles How to write this in DRF?
Ajitesh
Absolutely
Anonymous
Can we build powerful webapp without react
Anonymous
Any python frontend tool??
âshîsh
Before react introduced, people also we're creating heavy webapps. Django is also full stack python. You can use it along with js, html, CSS, bootstrap.
Anonymous
Thanks
Harsh
Hey can anyone help me with Django project I am facing issues
Stealth
any good resource for unit testing in django?
Simplyedwin
Hello, i need some help. cant find any from google tho. I have created a review page for user to review on the product which they have bought. I need to retrieve some info from their order model to assign to some part of the review form (i.e date of ordered) so that user only needs to fill in the review content and product rating. How can i do that in view py ?
Owolabi
Guys please how do I integrate translation in Django Rest Framework?
Anonymous
I got error that "NameError: name 'Items' is not defined" I use ManyToMany field in "User" model => "orders = models.ManyToManyField(Items, blank=True, related_name="orders") " and I also use "User" model in "Items" models as ManyToMany field => "user = models.ForeignKey(User, on_delete=models.CASCADE, null=True)" how i slove this problem
Akshat
i am creating a todo task project so i have created a task html file but when i import it in admin it doesnt works from django.contrib import admin from home.models import Task admin.site.register(Task) and Task gives me error unresolved reference
Harish
Have the tables been created in your database?
Anonymous
Have the tables been created in your database?
Actually I want a manytomany field in both models
Anonymous
In user models use foreign key to Items model and in Items models I use manytomany field to User
amrsunja
hi How to get a server up?
Anonymous
hi How to get a server up?
python manage.py runserver
Anonymous
Have the tables been created in your database?
It's a problem with interpeter
Иван
Hi there! I know that's kind of dumb, but I lost all evening trying realize how can I left join choice to selection without using native SQL, could u help, please?
Иван
class Selection(models.Model): title = models.CharField(verbose_name='Вопрос', db_index=True, max_length=4096) lock_other = models.BooleanField(verbose_name='Один вариант ответа') interview = models.ForeignKey(Interview, on_delete=models.CASCADE) class Choice(models.Model): title = models.CharField(verbose_name='Вариант ответа', max_length=4096) selection = models.ForeignKey(Selection, on_delete=models.CASCADE)
C
I got template error
Siroj
Hi guys, how to install gettext , I can't install gettext, help me please
Doragonsureiyā
Hi guys, how to install gettext , I can't install gettext, help me please
Step 1: Open a browser Step 2: Write down https://google.com or https://duck.com and press Enter Step 3: In the search box, write down the same words you asked here Step 4: Read the first results
Siroj
!search
I can't find in google, youtube
Mojtaba Arezoomand
Hello guys When should we use transaction.atomic() in django orm
AGASTRONICS
Which database do you guys suggest if firebase good for Django
Ganesh
Use postgres, even official docs suggest that!
AGASTRONICS
I don't want the situation where by my database will be hacked
Maz
I don't want the situation where by my database will be hacked
Lol...how many postgres dbs do you personally know have been hacked?
Ganesh
I don't want the situation where by my database will be hacked
Pg is most widely used db in corporates if it was easily hacked why would they use it? 😭by the way security of db also depends on other factors no itself only
Mirco
I don't want the situation where by my database will be hacked
It's up to you to build a secure infrastructure If your infra sucks I can hack whatever database you choose
Si
hi I started learning django from 2 months and made a simple website (but didn't added it to the server yet ) what should I study in django I feel lost ?
Deepak Kumar
Guys I'm New Django, if you have any book in PDF, pls share
Doragonsureiyā
Guys I'm New Django, if you have any book in PDF, pls share
Check out PythonRes, a channel for Python resources - video courses, pdf books, tutorials and other info to help you learn Python.
Dhruv
can anybody help me with thi issue
Dhruv
https://stackoverflow.com/questions/67401744/i-want-to-save-my-check-box-value-of-my-form-to-my-django-database
Doragonsureiyā
Guys I'm New Django, if you have any book in PDF, pls share
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Ghorz
Select username, mobile from Vehicles How to write this in DRF?
You should be asking how to execute raw sql queries in django. Now Google
Lamboo
Hi, I'm trying to customize the Django Admin. I have a model that extends AbstractUser. How can I make that the URL of the ModelAdmin matches the Meta.verbose_name I have in the model?? This is a picture of what I'm trying to explain: https://ibb.co/0VS693g
Lamboo
Hi, I'm trying to customize the Django Admin. I have a model that extends AbstractUser. How can I make that the URL of the ModelAdmin matches the Meta.verbose_name I have in the model?? This is a picture of what I'm trying to explain: https://ibb.co/0VS693g
Ok, looking at the source of django.contib.admin.site.AdminSite I think it won't be possible, since it's using model_name to create the URLs: for model, model_admin in self._registry.items(): urlpatterns += [ path('%s/%s/' % (model._meta.app_label, model._meta.model_name), include(model_admin.urls)), ] Thanks, anyway
Siddhartha Inturu
File "C:\Users\HP\Desktop\CarRental-master\venv\lib\site-packages\django\contrib\auth\models.py", line 4, in <module> from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager File "C:\Users\HP\Desktop\CarRental-master\venv\lib\site-packages\django\contrib\auth\base_user.py", line 49, in <module> class AbstractBaseUser(models.Model): RuntimeError: class not set defining 'AbstractBaseUser' as <class 'django.contrib.auth.base_user.AbstractBaseUser'>. Was classcell propagated to type.new? Can any one solve this error
Aman
Hi, anyone please help me out. How i can write the below query in Django raw query: '''SELECT pid, now() - query_start as "runtime", usename, datname, state, query FROM pg_stat_activity WHERE now() - query_start > '1 second'::interval ORDER BY runtime DESC; ''' In this 'pg_stat_activity' is already present or in build in Postgres DB. The model that I have written is 'PgDbMonitor'
Aman
and models like this: class PgDbMonitor(models.Model): id = models.ObjectIdField(db_column='pid') query_start = models.DateTimeField() username = models.CharField(max_length=100, db_column='username') datname = models.CharField(max_length=100) STATUS = ( ('locked', 'locked'), ('unlocked', 'unlocked') ) state = models.CharField(max_length=15, choices=STATUS, default='locked') query = models.CharField(max_length=500) class Meta: managed = False in_db = 'ws_stats' db_table = 'pg_db_monitor'
Poojitha
I have created a model with field as urlField. How should I display it in html page?
Shalin
Heya Anyone Can Tell Me The Some Good Projects Definitions Or Ideas On Django Framework?? And If Anyone knows about Ecommerce Or Management System Types Projects Ideas Or Ready Projects Then Plzz Tell Me !!😀
Anonymous
i need some help in jinja2.. anyone?
Harish
Can you post your code here please?
Anonymous
?
!meta
Doragonsureiyā
?
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
Anonymous
I am using jinja2 and there it is automatically stripping the text that should be shown in new line
Anonymous
How can I keep showing data in new line
Ariel
I'm writing a Django application that requered to give the user the ability to create his own time format, over an API (problay GraphQl). I've figure out the following way, but it seems to be really hard solution for relativlly small problem. class Formatter(models.Model): ... class DateLetter(models.Model): formatter = models.ForeignKey(Formatter, related_name="letters", on_delete=models.CASCADE) index = models.IntegerField(db_index=True) letter = models.CharField(max_length=255, unique=True, choices=LetterChoices.CHOICES, default=LetterChoices.Y) And after that, just going with some sort of loop to get the instance as a date format (%Y-%m-%d) etc.