Trev
Trev
It may be! What I'm hoping to accomplish is to:
1) Iterate through every entry in that model, if a boolean is True, count the numbers from a specific field
2) Add all of those numbers to _one count_ to be displayed in the admin page for that count
Trev
I.E: The number of people attending an event
Trev
I can probably get the data like:
query_set = Model.objects.all()
for person in query_set:
# Do stuff
It's the displaying of that data I'm not sure about.
Luis
Hmmm it's a complex stuff... give me a second to think a solution
Luis
Luis
It use proxy model and custom manager.
Trev
Looking
Luis
Luis
Guys: any idea ?
Trev
Appreciate that, thank you!
Trev
Though I'm not sure a proxy model would be necessary. It's just a simple operation. It's not hard to query the required data. Maybe I can hack the number into the filter list or something
Trev
Then a user could click on the model, see the list of attendees and on the right, see the total number of people signed up, etc.
Aman
Hi everyone I am a newbie and need help with app hooks in Django. I made a page using HTML and css now I want to make it an app hook.
Trev
Guys: any idea ?
Getting closer... https://docs.djangoproject.com/en/2.0/ref/contrib/admin/#admin-overriding-templates
Luis
Raja
I want django material any one have django material share to me
George
George
R
Ah lol, material to learn 😅
George
Also ive already given him material
George
In another group
Anonymous
Anyone here i have a doubt related to inline formset
Anonymous
Suppose i deleted a field from the form and saved it. It's not reflecting it the database.
Anonymous
When i add new field and submit it. It's successful.
Anonymous
I tried but don't know why it's happening.
Anonymous
https://dpaste.de/i9jO
Anonymous
This my code
Marko
hi i am using this tutorial https://wsvincent.com/django-allauth-tutorial-custom-user-model/ to create login with gmail but have got the following error https://imgur.com/a/tyo0KLb, do somebody had got the problem and know how to resolve it (have previously searched on stackoverflow and so on but not succeed with the solution)?
Anonymous
Anonymous
Check Django's documentation for that exception
Anonymous
https://docs.djangoproject.com/en/2.1/ref/models/instances/#django.db.models.Model.DoesNotExist
Anonymous
The exception you means that you queried for an object in your Database that doesn't exist
Anonymous
There should be more messages below the screenshot you posted
Rodri
Krishna Praneeth
is anyone available
George
George
Fk
Krishna Praneeth
Yeah. i have one doubt in django
Krishna Praneeth
i am trying to redirect to the same page when a button is pressed but what's happening is the path is adding upto the current existing path
Krishna Praneeth
how can i overcome this problem
Krishna Praneeth
can anyone help me
Krishna Praneeth
please it's urgent
Mirco
Show your code with pastebin or similar
Krishna Praneeth
kk
Krishna Praneeth
https://pastebin.com/6ETs3Whw
Krishna Praneeth
here is it:http://127.0.0.1:8000/tweet/create/tweet/create/
Mirco
Krishna Praneeth
There it's adding up the url
Mirco
Mirco
Krishna Praneeth
Mirco
Can you explain briefly
Instead of hardcoding your success url, use reverse(), so you decrease the chances of typo errors
Krishna Praneeth
okk.Thank You😁😁
Mirco
Krishna Praneeth
when i am using reverse i am getting circular import error
Mirco
Anonymous
Helloo..
Anonymous
I have one doubt
Krishna Praneeth
yeah i will show you
Krishna Praneeth
django.core.exceptions.ImproperlyConfigured: The included URLconf 'tweetme.urls' does not appear to have any patterns in it. If you see valid patterns in the file then the issue is probably caused by a circular import.
Anonymous
Can we use django formset_factory to edit models. ??
Anonymous
Other than inline form set
Krishna Praneeth
https://pastebin.com/TFTuGLZH
Mirco
Krishna Praneeth
is it enough
Krishna Praneeth
or any other thing else
Mirco
Where's tweetme.urls.py ?
Krishna Praneeth
https://pastebin.com/1UWTrXwP
Krishna Praneeth
here it is
Mirco
Oh sorry, try using reverse_lazy not reverse
Krishna Praneeth
yeah i used it but i am getting NoReverseMatch at /tweet/create/
Mirco
That's another issue, do you have another view called create_view ?
Krishna Praneeth
No I have only one create_viww
Mirco
Show your updated code pls