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 ?
Ali
Anonymous
You can download any code editor by typing python ide in Google
First name (optional)
Omair
Omair
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
Mirco
Asaduzzaman
Anyone provide me celery learning path....im very scared about celery.
Sadra
just keep learning. never stop when your learning path ends.
Asaduzzaman
Ok
Asaduzzaman
Thanks
david john
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'
Anonymous
Anonymous
like
static/data/data.csv ?
âshîsh
K
Funny video django app
Sopan
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
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?
Dennoh
Dennoh
Omair
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
Ayobami
Rohan
Hello all i have built a basic django project, can anyone suggest like what should i do next?
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
Anonymous
Anonymous
Anonymous
And the contin error
Anonymous
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
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?
Dennoh
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)
!use code paste tools
ARBAAB
how to pass multi html row data to django database table
Sahul
Shivam
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
Sahul
Elii
Sahul
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
Anonymous
Adnan