Gil
Can u pls clearly let me know the approach
First, how do you talk with finger print machine? It Has got an api? I understant autonomus fingerprint machine. If yes, modelize data with django models, and then create functs or views
Игорь
Help me
Игорь
My variable named new_tag, but django can’t see it
cj
Its urgent
wait until next month
Moe (محمد)
To do*
Mirco
a context variable related to a migration ? I bet instead he made mistakes into the view that renders the template
Moe (محمد)
😅
Moe (محمد)
Is caching API response in a session a good idea?
cj
If its a model variable thats what i meant
what if not? also variable!=attribute if that's what you're thinking about
ändrew
guys, I have a model that implements Recipe which have "ForeignKey"s that are Ingredients and Steps (to prepare) I want to able to add them (potentially infinite amount) to each recipe
ändrew
by default it looks something like (empty dropdown menus) Ingredients: ----- Steps: -----
Anonymous
Uh ok
سلام
Anonymous
😁
Anonymous
Hi i havk packag about all information about django who have this package?
ändrew
by default it looks something like (empty dropdown menus) Ingredients: ----- Steps: -----
So basically i want something like + button there to add more of the same elements.. Feels like i will have to implement this myself
Anonymous
What
Damron
Hi everyone! Can you please tell me how to implement user-action-logging system?
Damron
I know a little about builtin logger in Django and also have read about libraties, user-history, user-action But I haven't found real implementation in projects Maybe you used smth like this?
Anonymous
Hello i have a login template i designed earlier How do I relate it to Django login?
Berat
Hey guys, I need some advice about task scheduler. I'm looking for a scheduler that users will set their times for running task every day. What's the best suitable module for it?
Bruce Wayne
How can i add charts to django admin ??
Bruce Wayne
Need a fully customised version of Django-admin 😬
George
Need a fully customised version of Django-admin 😬
You should probably install something or do it yourself
Muflone
How can i add charts to django admin ??
There's a paragraph on Django admin on agiliq website
Bruce Wayne
You should probably install something or do it yourself
I'm current using jet.. but idk to add charts to it
Bruce Wayne
Jet -admin theme
cj
Jet -admin theme
did you pay for the licence?
LORD
How can i run other scripts in Django?
LORD
Means i want to run numpy maded script on browser
Harish
If anyone needs Durga sir lecturer video's (python,django, restapi) dm me
Shivam
hey, I want to use webcam on django website and can't get any better way to it.
alex
Greetings everyone, please help solve the issue: 1. can't get to the home page http://127.0.0.1:8000/ that has been set in flatpage 2. but the homepage is accessible by http://127.0.0.1:8000// - double slash 3. how to make it work on one slash? urls.py urlpatterns = [ path('admin/', admin.site.urls), ] urlpatterns += [ path('<path:url>', views.flatpage), ]
alex
took all that code completely from this link
alex
https://docs.djangoproject.com/en/3.0/ref/contrib/flatpages/#using-the-urlconf
himay
Automatic using jQuery and ajex
alex
"-show views.flatpage " looking for how to paste screenshot here "-this url.py is from app or from project?" yes, it is
alex
didn't get your first question - now got it, it's a standard django app 'django.contrib.flatpages',
Anonymous
I try to install it in my project but I can't it is for python 3 and Django 3? And it good for large projects?
alex
here is the views.flatpage
Gil
https://www.codepile.net/pile/g9Lb3myr
Look at line 33 and 34. If not starts with /, add it. This do de code
alex
red it before, the question is how to make it work on http://127.0.0.1:8000/
alex
with one slash
alex
I've found that in previous version that issue was solved by adding slash: url(r'^(?P<url>.*/)$', views.flatpage), urlpatterns += patterns('django.contrib.flatpages.views', url(r'^(?P<url>.*)$', 'flatpage'),)
alex
but how to make it with <path:url> variable
Gil
OKyes, I think if you put a varible : <path:url> django doesnt support, he's waiting for anything. I don't know if it works with regex, as you say. But I don't like this solution. I don't know if its the best solution, but f before this url patterern,you put another without nothing, you can play with / for example: urlpattern = [ path('', view.withnoting), path('<path:url>', view.other)] If you have problems with de function, for url parameter, you can pass as url=None, and you can use the same function for the two path. hope it to be useful
😒😒
I try to install it in my project but I can't it is for python 3 and Django 3? And it good for large projects?
Ionno Was askin you Thought you knew about the library Maybe I'll read up on it
Sunil G
Hi all, May I know how to use datepicker in crispy forms?
Doragonsureiyā
Hi all, May I know how to use datepicker in crispy forms?
Step 1: Open a browser Step 2: Write down https://google.com or https://duck.com and press Enter Step 3: In the search box write down the same words you asked here Step 4: Read the firsts results
Shokhrukh
hi, how can be solved next one Access to XMLHttpRequest at 'https://site/' from origin 'https://site2' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Shokhrukh
I already added ''corsheaders.middleware.CorsMiddleware', and also while list too but there is no changes still
Anonymous
urllib.error.HTTPError: HTTP Error 403: SSL is required i am facing this error can anybody guide me how resolve this
Anonymous
urllib.error.HTTPError: HTTP Error 403: SSL is required
Anonymous
I already added ''corsheaders.middleware.CorsMiddleware', and also while list too but there is no changes still
Try placing the middleware first in middleware list, also check if you have it in installed apps and whitelist includes the schema (https://)
Hari
How to set only one value in models
Hari
I dont want choices in charfield
Muflone
How to set only one value in models
Empty or value? That's a Boolean field
Hari
Value
Muflone
Please explain what you want to obtain
Hari
Okay
Hari
I have field in models.charfield( max_length=32 choices=((a,a)(b,b)) default=b)
Hari
In this field i want save only a as always and show choices limit only a
Muflone
Remove b from choices
Hari
But choices require two and it must be iterable
Gil
But choices require two and it must be iterable
test to end choice with comma , may be isn't interpretated as tuple?
Andrew
Can you explain briefly
field = models.CharField(choices=(('b','b'),))
Hari
Ok
Hari
field = models.CharField(choices=(('b','b'),))
Not working showing choices must be an iterable containing
Hari
Is there any way to set field and must have same char always
Andrew
Not working showing choices must be an iterable containing
dunno what you are doing wrong, i did this and everything worked just fine
Andrew
where exactly do you get an error "choices must be an iterable containing"?