blessing
i just texted u
Gil
Guys help me in this
Start with https://docs.djangoproject.com/en/3.0/intro/tutorial01/ Then your dream
Gil
Start with https://docs.djangoproject.com/en/3.0/intro/tutorial01/ Then your dream
You know the bisness rules, good. Now you need to play with closed eyes, creating models and views
Gil
You know the bisness rules, good. Now you need to play with closed eyes, creating models and views
And last, just at last, this automated procedures and notifications, but at last
---
not able to display tags from the posts, use following code models.py tags = TaggableManager()
---
but not able to display tags in loop
---
shwoing in post page Tags : blog.Post.None
---
Please Help
Anonymous
Hello
Anonymous
I am fresher I don't know django can anyone help me
---
add .all() ?
This my vie.py def index(request): obj = Post.objects.all() ctags = Post.tags.most_common()[:4] context = { 'obj': obj, 'ctags': ctags }
---
and in html : {{blogDetail.tags}}
Nikolay
and in html : {{blogDetail.tags}}
try {{ blogDetail.tags.all }}
---
try {{ blogDetail.tags.all }}
Tags : <QuerySet [<Tag: MAHADEV>, <Tag: SHRI STOTRAM>, <Tag: SHIV STOTRAM>, <Tag: SHIV SHAKTI>]>
---
now showing like this..
---
Tags are coming but queryset also.. shwoing
Nikolay
Tags are coming but queryset also.. shwoing
{% for tag in blogDetail.tags.all %} {{ tag }} {% endfor %} ?
---
{% for tag in blogDetail.tags.all %} {{ tag }} {% endfor %} ?
Thank you so much brother.. thanks for your valuable help..
Nayan
I have a filter form , how can i use date range filter with it ?
Bunty chhatri wala..
Creating a quiz app.. There are topic like.. Python Javascript When a user click on python The url should be.. 127.0.0.1:8000/python/1 I want that python in url should be dynamic as per user click on topic it also changes.. How to do that.. Eg: if user click on Javascript Url should be 127.0.0.1:8000/javascript/1
Shivansh
Guys, Check out a new feature at Github and if you like my Github Profile do follow my profile.✨❤️ Github Link:- https://github.com/Shivansh2407 If you want to create your own Profile Readme, fork my readme.md and make a repo by your own name and edit🔥.
Bunty chhatri wala..
share your URL.pys
pastebin.com/hfV7F7hk
Bunty chhatri wala..
Use <str:dynamic_name> in your path
How to pass? Can u tell me the exact way?
Anonymous
How to pass? Can u tell me the exact way?
For example path('<str:dynamic_name>/', views.function, name='link') In your template {%url 'link' dynamic_name='javascript' %}
---
pastebin.com/hfV7F7hk
(request, id) change in views.py
Bunty chhatri wala..
Anonymous
Not working.. Error: could not parse the remainder
You also included dynamic_name argument in your view function along with request?
Bunty chhatri wala..
Anonymous
No.. My view is : der xyz ( request ,id): print(abc)
That should definitely work, try again you must be doing something wrong
---
recheck your urls.py and views.py
Andrej
I have a bunch of records fetched from mysql using joins. I want to store this data in a redis cache. Which is the most efficient way to do this?
Hi, you should activate and configure caching in your Django project. Wrap the part inside a cache and co figure the cache to use Redis. First of all you could use a file based cache mechanism. When it works, you could add Redis. https://docs.djangoproject.com/en/3.0/topics/cache/
Andrej
Has anyone experience in creating an own Djang project structure template, like the cookiecutter template? When I want to develop my own template, is it the same like developing a plugin and using it in the --template parameter when creating a django project?
barto
how many django instances can be run on a server with 1gb of ram? (Aws Ec2 free)
Andrej
how many django instances can be run on a server with 1gb of ram? (Aws Ec2 free)
I think it depends on the amount of requests and the number of used lines of code/middleware inside your request/response cycle.
Andrej
how many django instances can be run on a server with 1gb of ram? (Aws Ec2 free)
What will each dango instance do? Delivering static files, calculating different algorithms, storing informations, communication with different databases oder other API's?
Raman
In my Django project after adding models. I am getting error - cannot use ImageFiels because Pillow is not installed. I have installed pillow but still getting this error. Can anybody explain?
mhamed
hi i have some priblem in html django cause the image did not Appearance in the screen
mhamed
that my code
mhamed
{% extends 'base.html' %} {% block content %} <h1>produits</h1> <div class="row"></div> {% for produit in produits %} <div class="col"> <div class="card" style="width: 18rem;"> <img src="{{ produit.image_url }}" class="card-img-top" alt="card image cap"> <div class="card-body"> <h5 class="card-title">{{ produit.name }}</h5> <p class="card-text">${{ produit.price }}</p> <a href="#" class="btn btn-primary">Add to cart</a> </div> </div> {% endfor %} </div> {% endblock
mhamed
1 min
barto
What will each dango instance do? Delivering static files, calculating different algorithms, storing informations, communication with different databases oder other API's?
each django instance contains a website connected to postgresql. postgresql is inside the server. the sites are institutional websites, they don't have many algorithmic calculations I can see from the aws console that 1 site uses% 0.3 ram. I calculated; % 100 /% 0.3 = 333.33 But I don't know if I'm calculating well. at the moment I only ran one instance of django.
mhamed
view.py code ?
from django.http import HttpResponse from django.shortcuts import render from .models import produit def index(request): produits = produit.objects.all() return render(request, 'index.html', {'produits': produits}) def Nouveau(request): return HttpResponse("Nouveau produits")
mhamed
Koobs {% endblock
What's mean koobs?
Anonymous
What's mean koobs?
Something like oops
mhamed
Something like oops
that is mean the problem in {% endblock
Anonymous
Anonymous
{% endblock %}
mhamed
noo whem i put them but when i selected to copy the code i forget it
Wiz
Yesterday I been creating this website but am getting problems I wanted to know if anyone gonna zoom with me and assist me so I can be sharing my screen with the person This is my first time writing django web program though
Andrej
each django instance contains a website connected to postgresql. postgresql is inside the server. the sites are institutional websites, they don't have many algorithmic calculations I can see from the aws console that 1 site uses% 0.3 ram. I calculated; % 100 /% 0.3 = 333.33 But I don't know if I'm calculating well. at the moment I only ran one instance of django.
I think 333 is the theoretical maximum. When the amount of requests to each instance increases, the server gets overloaded and the amount of instances should be reduced. Is there a reason why you need so many instances? Maybe you could have one django instance and use the sites-framework https://docs.djangoproject.com/en/3.0/ref/contrib/sites/
Engnr
Hello, anybody with knowledge on Jasmin or Kannel sms gateway?
Andrej
Hello, anybody with knowledge on Jasmin or Kannel sms gateway?
Hi, I haven't use them. But if you are interested in another concept. I would like to help you to implement it: https://www.sms-api-gateway.com
Ari
Anyone know how to trigger error save or update from form.save()?
Ari
Because when i try to print the the return is None
Ari
???
Try pip install pillow in your Enviroment
DP
While setting up virtualenv I am getting : couldnot find a version that satisfies the requirement What can be done to resolve this?
DP
you are typing name wrong
I am typing virtualenvwrapper , is it wrong?
Raman
Try pip install pillow in your Enviroment
Yes I havw done it. Still getting that error
DP
Yes
Ari
Yes I havw done it. Still getting that error
I think maybe u installed but in another env, please check again you are install in the right env of your project
snc
try virtualenv <your project name >
Nayan
Hi i am using dateFromToRangeFilter in filters.py I am trying to get date range widget on filter. I am getting following error Exception type - template does not exist Exception value - django_filters/widgets/multividget.html
snc
Yes I havw done it. Still getting that error
have you added it to django installed app
Nikolay
Not working
Share what you’re typing, and error
snc
Not working
share your command