Ali
Hello . I want to learn python and django, how can i download special code editors for python or django, who can help me pls ?
Anonymous
You can download any code editor by typing python ide in Google
First name (optional)
Anonymous
How i can connect svg icons, like, before, in simple projects, i stored all my svg icons in one icons.svg, after in html i used path/icons.svg#myIcon, is this possible to do with django? Because i try and i get error with this method
Asaduzzaman
Anyone provide me celery learning path....im very scared about celery.
Sadra
Anyone provide me celery learning path....im very scared about celery.
it's so simple. start from here: https://docs.celeryproject.org/en/stable/getting-started/introduction.html
Sadra
just keep learning. never stop when your learning path ends.
Asaduzzaman
Ok
Asaduzzaman
Thanks
Bayu Adi
Anyone can help me, how to open csv file in static folder django without upload? I have an error "No such file or directory: 'static/data/data.csv'
Bayu Adi
data.csv is inside data folder?
Yes, the data csv is inside data folder
Anonymous
like static/data/data.csv ?
K
Funny video django app
Anonymous
when i try to logout, i get this error: Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order: [name='homepage'] register/ [name='register'] logout/ [name='logout'] admin/ tinymce/ The current path, login, didn't match any of these.
Anonymous
this is my urls.py
Anonymous
urlpatterns = [ path("", views.homepage , name="homepage"), path("register/", views.register, name="register"), path("logout/", views.logout_request, name="logout"), path("login/", views.login_request, name="login"), ]
Anonymous
this is from my views.py def logout_request(request): logout(request) messages.info(request, "Logged out successfully!") return redirect("main:homepage") def login_request(request): if request.method == "POST": 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) messages.info(request, f"You are now logged in as {username}") return redirect("main:homepage") else: messages.error(request,"Invalid username or password") else: messages.error(request,"Invalid username or password")
Rahkmanuly
Hello there! Anyone who has good tutorial for creating Telegram bot using python?
Uday
how can i clear database for only 1 model/app?
Dennoh
how can i clear database for only 1 model/app?
Do you understand what database and table is
Bayu Adi
like static/data/data.csv ?
Yeah, how i read the data with this?
Dennoh
Do you understand what database and table is
python manage.py shell from yourapp.models import ModelYouWant ModelYouwant.objects.all().delete() Ctrl + D #to exit
Kumar
Hi, Any python, aws, react developer available for part time paid work. Pls ping me personally with name, exp and skillset. Thanks
Anonymous
Hi, I am facing below issue, can anyone help? Error: Cannot use ImageField because Pillow is not installed. PS: Pillow is already installed in my system
Anonymous
Do Anyone know any other way around to resolve this?
Anonymous
I'm reading about different types of caching but it's not clear to me which one should I use. Can anyone help?
Anonymous
What do I do then?
Anonymous
I already tried to install other versions, but still giving the
Anonymous
What's your use case
I don't exactly know😅 I just know that caching will reduce the database operations So I starting reading
Anonymous
I already tried to install other versions, but still giving the
Is it possible to that you have installed it in path and trying to use in virtual environment or vice versa?
Anonymous
What's your use case
Problem is use cases are not clear
Rohan
Hello all i have built a basic django project, can anyone suggest like what should i do next?
Anonymous
Install pillow in the virtual environment
I installed in a virtual environment already
Omair
Problem is use cases are not clear
That's actually a different problem all together 😄. But the rule that I like to follow is, first you need to inspect where your application is bottlenecking and then according to that you need to optimise to remove the bottleneck. Unlike caching images, database entries should be cached according to the use case let's say you have some entries that are not updated much often but they are accessed alot for eg say weekly rank of players in a game so these types of database entries can be cached to reduce load on the database.
Ayobami
I installed in a virtual environment already
Have you activated the virtual environment? When you activate it. Then install pillow Make sure it's like this on your cmd (Virtualenv) c/GS/gf/django> pip install pillow
Anonymous
Yes I already did that and (env) appears before
Dennoh
Yes I already did that and (env) appears before
Delete your virtual environment and set it up again, maybe you cancelled b4 the installation was complete
Omair
if you take example of a social media site... What kind of cache should I use?
My answer would still remain the same that its use-case based but you can read about the caching and all the scalability issues major social media websites face and how the work around them here http://highscalability.com
Anonymous
And the contin error
Ehsan
Hi! Friend how annotate a union queryset in django
Shivam
Hey how do we set password reset in django with gmail
Shivam
I am following a tutorial by corey schafer. I wrote the code. But i dont get it.
Sahul
I am following a tutorial by corey schafer. I wrote the code. But i dont get it.
Don't copy the code Break it to small components Try to understand
Shubham
model.py class Transaction(models.Model): made_by = models.ForeignKey(User, related_name='transactions', on_delete=models.CASCADE) made_on = models.DateTimeField(auto_now_add=True) amount = models.IntegerField() order_id = models.CharField(unique=True, max_length=100, null=True, blank=True) checksum = models.CharField(max_length=100, null=True, blank=True) def save(self, *args, **kwargs): if self.order_id is None and self.made_on and self.id: self.order_id = self.made_on.strftime('PAY2ME%Y%m%dODR') + str(self.id) return super().save(*args, **kwargs)
Shubham
can any one please explain me how save method works?
Shivam
Don't copy the code Break it to small components Try to understand
I copied code without understanding after a few tutorials and now I am completely lost. I will have to start from the beginning by actually understanding the whole code. Thanks for your advice
ARBAAB
how to pass multi html row data to django database table
Shivam
Break down codes and understand
Ya , will have to do that
Elii
Hey guys, I have a field in model.py that is an image but when i try to post image i got this error
Elii
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte
Ayobami
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte
Check this link https://stackoverflow.com/questions/60290243/uploading-image-in-django-utf-8-codec-cant-decode-byte-0x89-in-position-246
Elii
Install pillow
I did that before
Sahul
Check this link https://stackoverflow.com/questions/60290243/uploading-image-in-django-utf-8-codec-cant-decode-byte-0x89-in-position-246
It says you cannot transfer image which is in utf8 before transformation you must convert it into base64
Ayobami
I can't understand 🙈 I wrote a simple code
Just follow the simple instructions to cover it to base64
ARBAAB
how to pass multi html row data to django database table
Anonymous
Hi. I want to write an article about creating Django database models. Can someone help me write a good article?
Dennoh
Hi. I want to write an article about creating Django database models. Can someone help me write a good article?
Read the django docs on models documentation, they are clear and easy to relate