Mohd Zaid
Eugene
Chaitanya
user
RKMMFT8cQwNzZxZfmRLEfWcifZjARDVudkV9lKTg
Is it any type of hashing???
Doragonsureiyā
Fan / Ac
which generic class based view can be used to convert this function view
https://nekobin.com/daxalefumi
Doragonsureiyā
Fan / Ac
Yes
i mean can you suggest a generic class based view to do this other than buy using LoginView in auth
cj
Dominik
Hi everyone,
I have created a script that I want to run with cron. It needs to uptade Data in the DB so I importent from models.py.
The issue is whenever I run the script I get an exception as I read it is because modely.py is not supposed to be run.
But since I import from it, the import will run it.
I can create a testcase without problem but I was wondering when I schedule that script with cron it will surely fail.
Do you have suggestions or thoughts on this hitting a brick wall right now.
William
Alireza
Hi. I need to implement a system as follows:
The first user submits a request, Then this request is sent to the second user's panel, this person can approve or reject the request.
Is there a special library or pattern design for implementing this system? Or is there a specific keyword for this system at all?
Roman
Please tell me a free hosting on which l can deploy the Django project.
CanDo
Heroku
CanDo
AWS EC2 has also free trial for 1 year
ZRoman
Tell me, is it possible to somehow manage celery tasks through your interface, or through django? As I understand it, if you take app = Celery ('myproject'), then this app will not give nodes, will not have a connection with celery nodes, and you need to run celery separately to get data. So ?
I have an api, by calling the api, a task is created and celery is immediately executed if there is no other one that is executed. and I need to kill, sometimes, the task that is currently being performed through the interface.
I found this in the dock, but I can't apply it yet :(
>>> from celery.task.control import revoke
>>> revoke (task_id, terminate = True)
Breeze
Anonymous
Anonymous
I would write a custom authentication backend.
Breeze
Breeze
you mean for the otp?
That would be stressfull, i already have my register and login authentication set and working perfectly, i just want add the otp for security purpose
H
Hi everyone!
I’m struggling with database in django..
I have models.py with lat, long attributes. I want to input these attributes in admin web. Save them. And so they add the marker on web frontend Google maps.
At the moment I can login to admin and add coordinates(long,lat) and my frontend shows the map.
What command should I write to get the inputs from admin page and send them to my html or perhaps js is more appropriate to show the markers.
Otherwise I have to just hardcore the coordinates in my js file.
Rutherford
I'm trying to get the name of the items in a manytomany relationship from a model.
I'm using list comprehensions but it doesn't work.
[x.name for x in n.tests_to_carry.all() for n in Patient.objects.all()]
It says n is not defined.
But after looping over the normal way and then using the list comprehension, it works.
Any reason for that?
Expected output
['malaria', 'fever', 'malaria']
Ahmad
Mohammad
Hello, when I have several objects in a page, how can I specify which one is selected now?
Amir
Amir
αмiʀ
Hi
I have 2 view function
And I want to send some argument from first view to the other view
How can i do that?
Is that possible?
kv
Can anyone tell me how to begin with Python Django? Which resources should I refer to?
Fan / Ac
so i have a user login system,
when the user logouts it redirects to the url logout/ which renders the same template which login/ renders
with an additional context {"message": "logout successfully"}
which displays the login page with an additional message logout successfully,
what will be a good way to do the same but redirect to the url login/ instead of the url logout/ with the logout successfully message
the url config is like this https://nekobin.com/wejugiraka
Richard
Fan / Ac
Richard
Rutherford
Anonymous
Hello👋🏾
Please can anyone recommend resources for learning unit testing in Python/Django and also any other advanced concepts in Django one can learn
Rutherford
Sarthak
Anonymous
Sarthak
*https://www.obeythetestinggoat.com/
αмiʀ
Rutherford
αмiʀ
Pass it as the argument.
I have to define it in my url?
You mean
def first view(request):
...
form = request.POST
Return redirect ('account:myform' , form)
def secondView(request, form):
...
If you mean that, i try it but doesn't work
Manish
Why do we need to call def get_object(self,pk) function to get queryset?
I have searched on Google but didn't found a satisfied answer
Mirco
Manish
Ok thank you.😃
Mirco
Ok thank you.😃
otherwise you should everytime query and filtering by pk
Manish
Mirco
Ferruccio
I'm sorry, I'm a sysadmin and I've to install a django app developed from someone else.
I got following errors: http://paste.scsys.co.uk/596180
Ferruccio
How can I fix it?
Ferruccio
http://paste.scsys.co.uk/596179
...
Hello everyone, How to overwrite an ID when saving a model in dajngo. It is necessary to always end with 01
Mirco
...
...
Such a task
Mirco
Because you will have issues
Use another field different from PK
...
can i implement this in def save()?
Ferruccio
I'm a sysadmin and I've to install a django app developed from someone else.
I've got following errors: http://paste.scsys.co.uk/596180
How can I fix it?
more info: http://paste.scsys.co.uk/596179
Or what may I read to understand the problem?
Mirco
can i implement this in def save()?
don't change that pk
use a new field and if u want , make it primary key but don't try to change the default one to add 0 padding
ﹺ ﹺ
I need help guys.... How can one code an artime or data top-up app using Django??
JINSHAD
Hey guys!
Igor'
<form action="{% url 'detailed_current_financial_results' %}" method="get">
<label for="start_date">Start date<em>*</em></label><br>
<input id="start_date" value="2021-11-01" name="start_date" type="date" min="2010-01-01" max="2041-01-01"><br>
<label for="end_date">End date<em>*</em></label><br>
<input id="end_date" value="2021-11-19" name="end_date" type="date" min="2010-01-01" max="2041-01-01"><br>
<button class="btn btn-info btn-sm" type="submit">
Get a statement for the period
</button>
</form>
Hi! How can I send my values to my view? It is necessary to do this at the level html.
Rutherford
Igor'
Олег
how to make an api with /?search=<value>
and sort by key
cj
Luxmi
Hello can someone please help me resolve an error
Doragonsureiyā
Hello can someone please help me resolve an error
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
Luxmi
class Wishlist(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
product = models.ForeignKey(Ad, on_delete=models.CASCADE)
prod = models.ForeignKey(RentAd, on_delete=models.CASCADE)
status = models.BooleanField(default=False)
def __str__(self):
return self.user.name
class Notifications(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
Luxmi
models.py
atkisai
hello my english friends, i have quastion about django
can I add my variable in url without template and views, from my mixsin on example?
atkisai
only urls.py
Luxmi
<form action="{% url 'wishlist' %}" method="post">
{% csrf_token %}
<input type="hidden" value="{{rent.r_id}}" name="rid">
<button type="submit" class="btn">
<i class="fas fa-grin-hearts"></i>
</button>
</form>