Fritz Flores
python manage.py collectstatic
I’ve ran that command multiple times but it hasn’t changed anything
Muflone
I’ve ran that command multiple times but it hasn’t changed anything
the manifest file is used when you use another static files processor. what you actually have in your settings file?
Osondu
python manage.py collectstatic
The issue is that you must have run that locally as such, it generated a static file already locally then you pushed it. If you did it before, delete the folder. So that when onrender is running the command it goes through with it smoothly
Benzino
Hi all, does anyone know how to do registration and login on one html template
Benzino
I cant find, bro. Only examples with 2 templates
Muflone
I cant find, bro. Only examples with 2 templates
it's a simple html template, you put the html code with two different forms to submit
Osondu
Hi all, does anyone know how to do registration and login on one html template
You could use an if condition, if registration is clicked a block holds if not the other.
Firdavs
Hello everyone, Need your help on DRF. Unfortunately, the APIs do not work that are specified in views.py . Only the POST metadada API works correctly https://gist.github.com/firdavsyusupov/5d28e8f31ae9bcc451ebb284d1fed717
Lucas🍃
Hello everyone, need help with this.. i tried adding a user class which is a sub class of the AbstractUser to my AuctionListing class. class Auction_listing(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) title = models.CharField(max_length=255) description = models.TextField() start_bid = models.FloatField(max_length=100) image = models.URLField() date = models.DateTimeField(default=timezone.now) category = models.ForeignKey(Category, on_delete=models.SET_NULL, null=True) but i keep getting this: It is impossible to add a non-nullable field 'user' to auction_listing without specifying a default. This is because the database needs something to populate existing rows. Please select a fix: 1) Provide a one-off default now (will be set on all existing rows with a null value for this column) 2) Quit and manually define a default value in models.py. Select an option: if i use null = True.... it will make every data on the table for user null...which is not what i want... i want to be able to get the user that creates a listing...
Ali
Is it possible to send data from one consumer to another consumer in django channels? Ex: when consumer1 received data send to consumer2
Osondu
Hello everyone, need help with this.. i tried adding a user class which is a sub class of the AbstractUser to my AuctionListing class. class Auction_listing(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) title = models.CharField(max_length=255) description = models.TextField() start_bid = models.FloatField(max_length=100) image = models.URLField() date = models.DateTimeField(default=timezone.now) category = models.ForeignKey(Category, on_delete=models.SET_NULL, null=True) but i keep getting this: It is impossible to add a non-nullable field 'user' to auction_listing without specifying a default. This is because the database needs something to populate existing rows. Please select a fix: 1) Provide a one-off default now (will be set on all existing rows with a null value for this column) 2) Quit and manually define a default value in models.py. Select an option: if i use null = True.... it will make every data on the table for user null...which is not what i want... i want to be able to get the user that creates a listing...
It makes the previously existing null instead not everything. Cause there’re existing data in the auction listing already. So you either specify a default by adding a user there as default to fall back to. Or while trying to run the makemigration, you add an id of the user like requested. That’s entering 1 > then providing the id of the user say, 1. Or finally you could just drop the table or wipe the database if it’s really not all that important at the moment and create everything from scratch. Or also possibly just go to the admin panel and delete all the auction listing available. Let me know which one you wish to try out or eventually tried out and feel free to reach out to me on my dm 😇
Osondu
its working now... thanks
What did you eventually do? And I see you’re Nigerian, could we connect?
Anonymous
Hey some help here I've made a index. html file and also made another base.html for inheriting footer and navbar. So I created a faq.html and inherited the base.html everything goes fine. But when I add other content the css isn't working . Can anyone sort this
Anonymous
To get an answer to your question, it is worth to formulate it more clearly, perhaps add more details, perhaps add explanations.
I have a html file called index.html which has main home page of a grocery store. Then I add another base.html for inheriting the footer and navbar of the index.html. So then I created a contactus.html and inherited the footer and navbar from base.html everything works fine but when I add content like text the css isn't working there.
Lucas🍃
I've loaded static
have you tried having one base.html and have the others inherit?
Lucas🍃
okay can you send the contactus.html code
Anonymous
Ok sir
Believe
Did you created block in base file?
Believe
Ok sir
In base file
Anonymous
∆
Can anyone help me in my basic clg project in django?
∆
I'm noob in django, want you guys with me
Believe
∆
Bro everyone learns by doing
Yeah bro, but tmrw is my project presentation, so i need to make it now.
∆
So need some basic help
Doragonsureiyā
I'm noob in django, want you guys with me
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
∆
I got one project from GitHub, but I don't know how exactly I have to successfully execute that in my system, and facing some problems. So I need someone who can help me to execute that project.
∆
Why don't you start with the official Django tutorial?
Bro tmrw is my project presentation and I don't know anything about it, so time is narrow
Raj
$ python manage.py shell Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> from django.contrib.auth import get_user_model >>> list(get_user_model().objects.filter(is_superuser=True).values_list('username' , flat=True)) [] >>>
Raj
i did 't get username
Raj
only empty braces
cj
only empty braces
did you check that the actual table in the DB has content?
Raj
no
Raj
where we can check
cj
where we can check
in the DB you're using, actually
Raj
ok
Mohit
How to manage time zone in django template according to the browser
cj
How to manage time zone in django template according to the browser
use JS for things "according to the browser"
Muflone
I doubt the django project is run by executing bot.py
nuncvc1v0
I doubt the django project is run by executing bot.py
It's telegram bot, but problem with django
Muflone
It's telegram bot, but problem with django
django projects are not run in that way
nuncvc1v0
django projects are not run in that way
https://imgur.com/a/z5KhDaK In the left window, start the django server
Muflone
https://imgur.com/a/z5KhDaK In the left window, start the django server
this is entirely non-sense you're running the django server but you're not using it then separately you're executing the same bot.py indicated before. read how django works, how you set the routes and react to them, Django is not a telegram bot
Muflone
either develop a django application by using routes and views or use a django management command to run whatever you want regardless the web views
Doragonsureiyā
Okay bro, I'm a newbie, maybe I'm not explaining what I want.
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain: - what you're doing - what you're expecting - what you're using - where you're running the script - what Python version you're using - what packages and their versions you're using - and the most important thing: show the code YOU wrote (read rule 5️⃣ for that) and more details, that way your chances to get help will increase
Rayan
Could anyone here who works with PDF report generation suggest the best library to use, preferably the most robust one, I'm using xhtml2pdf but it's unfeasible.
Lords
Hello everyone! can anyone help to resolve my query ,I have created custom user model for registration .If user want to register then can register with their mail and password Till now code is working fine now I am looking to implement when the user looking to register email need to verify after the email verfication only user account need to create allredy backend Smtp i am using .
Михайло
Hello! I am developing my site on django for processing pdf files (converting them to various formats, etc.) I had a question, do I need to send file processing to celery tasks to optimize the site? I read various articles about celery and it says that the task goes to celery, and the user can continue to do something on the site in the meantime. But I need the user to wait while the file is being processed, and then redirect him to the page for downloading the result. Do I need to add celery to the project or not? And how would it be possible to optimize file processing in this case? Thank you!
Firdavs
Good afternoon! Are there those who have made a deploy DRF project on Vercel?
Doragonsureiyā
Good afternoon! Are there those who have made a deploy DRF project on Vercel?
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. If you don't know what that means, read Asking Smart Questions.
Gahimbare
Hello i want to make system of authentication for an e-commerce site, I use django as back-end and vue cli,ionic as frontend can u help me
Willi@m.
https://dpaste.org/7UHmV I'm trying to write a function that returns all products in the category from the model but not working nor even giving an error. That is the link to my code
Believe
If no matches exist for products
Are products showing in terminal
Believe
So might be the object you are trying to get don't exist
Jakes
How to group repetitive names with different times and date to show one name and their time and date in Django SQLite
Rayan
What do you mean by unfeasible?
a 10-page PDF with at least 2 images per page (one header and one in the body) starts to shuffle the images, e.g. the id images that should be in sequence 1, 2, 3,4,... in some pages start to duplicate, or jump around becoming 1,2,2 or 1,2,1, it seems like it gets lost amidst many images. Observations: Code ok, I already checked and there are no errors, errors also only occur in iteration 2 onwards. Images with different paths and with uuid in the composition of the name with no chance of being mistaken.
Aizan
Can cart made up by html css jav will run on django without admin section
Basith
Can anyone tell me about backend security when it comes to django ? Any resources? What all to consider