Pass variable to {% load %} templatetag

2022-12-27 Thread Santiago Lamora
rcustomtemplatetag var1 var2 %} {% endif %} FAIL! It doesnt' works because "load" is still parsed although if condition evaluates as False. ATTEMPT TWO --- # package_list is a context variable defined on the view {% load package_list %} FAIL! It doesnt' works because load

Re: URL evaluates to 'slug' literally instead of the variable slug

2022-12-20 Thread Michael Starr
No reply yet, so bump. On Friday, December 16, 2022 at 5:51:14 PM UTC-8 Michael Starr wrote: > I hope someone is still subscribed to this post. I had another question... > > I looked up your link, about context dictionary, presumably to modify the > value returned by the function, like you

Re: URL evaluates to 'slug' literally instead of the variable slug

2022-12-16 Thread Michael Starr
I hope someone is still subscribed to this post. I had another question... I looked up your link, about context dictionary, presumably to modify the value returned by the function, like you said, to add the pets to it. I don't know what to loop or iterate over to get all the pets, first off. I

Re: URL evaluates to 'slug' literally instead of the variable slug

2022-12-15 Thread Michael Starr
Sorry for that crass, asinine comment. I had a flare up of my condition. Thank you all for the help. Mike On Sunday, December 11, 2022 at 4:32:04 PM UTC-8 Michael Starr wrote: > It's poorly written and mine isn't. Am I better than them. > > On Monday, December 5, 2022 at 6:36:30 AM UTC-8

Re: URL evaluates to 'slug' literally instead of the variable slug

2022-12-11 Thread Michael Starr
It's poorly written and mine isn't. Am I better than them. On Monday, December 5, 2022 at 6:36:30 AM UTC-8 elvisa...@gmail.com wrote: > Good ! > > Le dim. 4 déc. 2022 à 22:04, Michael Starr a > écrit : > >> Thank you, Peter. I forgot to acknowledge your contribution. >> >> On Wednesday,

Re: URL evaluates to 'slug' literally instead of the variable slug

2022-11-30 Thread Michael Starr
Thank you. Though, that hard codes everything, which is bad. How do I generalize it? Also, this worked. I had to specify template_name = pet_profile.html in the pet detail view. On 11/30/22 7:15 AM, Ryan Nowakowski wrote: On Tue, Nov 29, 2022 at 06:35:25PM -0800, Michael Starr wrote:

Re: URL evaluates to 'slug' literally instead of the variable slug

2022-11-30 Thread peteru mimo
> > *"pet" templates folder / pet_profile.html* > > > > > > > > {{ pet_details }} > > > > > > *the error* > Page not found (404) > No pet found matching the query > Request Method: GET > Request URL

URL evaluates to 'slug' literally instead of the variable slug

2022-11-30 Thread Michael Starr
home'] 3. pet/ [name='pet_details'] The current path, pet/slug, matched the last one. You’re seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page. - I

Casting a variable as array in a query

2022-07-26 Thread Sencer Hamarat
I'm having a problem with this query: I believe, Q(bundle__contains=OuterRef("book_id")) part of the query is expecting an array instead of single value. I'm getting this error: ProgrammingError: operator does not exist: jsonb @> bigint LINE 1: ...lisher"."book_id") OR U0."bundle" @>

Re: variable inside a template

2022-06-16 Thread Antonis Christofides
ile name but it never render, if i loock the source code i see that in the http://127.0.0.1:8000/static_files/polls/%7Bo%7D>" class=""> So i never get the correct file name. How is the correct way to get the name of the variable o inside the img tag Thanks -- You received this

Re: variable inside a template

2022-06-16 Thread Larry Martell
gt; {% else %} > {{o}} > > {% endif %} > {% endfor %} > in the template i see the file name but it never render, if i loock the > source code i see that in the class=""> > So i never get the correct file name. >

Re: variable inside a template

2022-06-16 Thread Sencer Hamarat
Don use 'o' as a template variable in the template function Use {% static 'poll/'|add:o %} instead. 16 Haz 2022 Per 14:09 tarihinde luca72.b...@gmail.com < luca72.bertolo...@gmail.com> şunu yazdı: > Hello i have a list like: > mylist = ['1,png','2.png',3.jpj'] > in the template

variable inside a template

2022-06-16 Thread luca72.b...@gmail.com
e the file name but it never render, if i loock the source code i see that in the http://127.0.0.1:8000/static_files/polls/%7Bo%7D>" class=""> So i never get the correct file name. How is the correct way to get the name of the variable o inside the img tag Thanks -- You re

Re: How to get a variable from an ajax request and use it in another application in Django?

2021-12-04 Thread David Nugent
There's a little more to handling session data than what you have there (unless code is missing?). IIRC you need to set `session.modified = True` in order to persist the data. Where are you serialising the session data? db, redis .. ? Regards, David On Fri, Dec 3, 2021 at 11:00 PM kayhan

Re: How to get a variable from an ajax request and use it in another application in Django?

2021-12-03 Thread kayhan
Hi Sorry, as you said I used the session. But my problem has not been solved yet. I first send a request to Django and save its data with a session. I will send another request to Django later. Here I want to use the data of the previous request. But my code does not work properly. And the value

Re: How to get a variable from an ajax request and use it in another application in Django?

2021-12-01 Thread kayhan
Thank you David On Wed, Dec 1, 2021 at 3:56 AM David Nugent wrote: > That is definitely much more clear. > > The usual way of doing this is to handle it like a shopping cart (plenty > of examples only a google search away). > Typically you store this information in the user's session in the

Re: How to get a variable from an ajax request and use it in another application in Django?

2021-11-30 Thread David Nugent
That is definitely much more clear. The usual way of doing this is to handle it like a shopping cart (plenty of examples only a google search away). Typically you store this information in the user's session in the first view, then retrieve it in the subsequent view(s). Note that

Re: How to get a variable from an ajax request and use it in another application in Django?

2021-11-30 Thread kayhan
other application" is a > little vague. The backend the API request and can pretty much do anything > you need in the corresponding view at that point but should endeavour to > return an appropriate response ASAP. > > On Tue, Nov 30, 2021 at 12:35 AM kayhan wrote: > >&g

Re: How to get a variable from an ajax request and use it in another application in Django?

2021-11-29 Thread David Nugent
AM kayhan wrote: > How to get a variable from an ajax request and use it in another > application in Django? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving

How to get a variable from an ajax request and use it in another application in Django?

2021-11-29 Thread kayhan
How to get a variable from an ajax request and use it in another application in Django? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-user

Re: Need help in django ecommerce website to simply read a variable from different apps

2021-04-13 Thread Satyajit Barik
Show me your cart item code On Tue, 13 Apr, 2021, 5:32 am Nijo Joseph, wrote: > Dear all, > > Seems interesting, reading from different tables is not a big deal just > use whatever models from any app and import into the views and run your > query. I have my own full fledged app not very good

Re: Need help in django ecommerce website to simply read a variable from different apps

2021-04-12 Thread Nijo Joseph
Dear all, Seems interesting, reading from different tables is not a big deal just use whatever models from any app and import into the views and run your query. I have my own full fledged app not very good in design but it really works and have used in some supermarkets and still continuing in

Re: Need help in django ecommerce website to simply read a variable from different apps

2021-04-03 Thread Kasper Laudrup
On 03/04/2021 01.15, ANSHIT RANSINGH wrote: > I am unable to do so. Please help me with the issue.  > If you want someone to help you, learn how to ask a question. Something like this might be a good start: https://betterprogramming.pub/how-to-ask-questions-about-programming-dcd948fcd2bd How do

Need help in django ecommerce website to simply read a variable from different apps

2021-04-03 Thread ANSHIT RANSINGH
Hi, I am creating a Django e-commerce website in which I have created multiple apps. I have a cart app which is for managing the cart. In addition to that I have another orders app which manages the orders. For payment integration I want to read the final price amount in orders app which is

Re: using variable in django template

2021-02-16 Thread Kasper Laudrup
On 16/02/2021 13.18, Jiffin George Kokkat wrote: Hi guys, i want to declare a variable in django template and update value of variable inside a loop https://pythoncircle.com/post/701/how-to-set-a-variable-in-django-template/ https://pythoncircle.com/post/685/for-loop-in-django-template

using variable in django template

2021-02-16 Thread Jiffin George Kokkat
Hi guys, i want to declare a variable in django template and update value of variable inside a loop how to do Thanks, Jiffin George Kokkat -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiv

Re: Add variable value in render field in django template

2020-11-23 Thread Naresh Jonnala
Based on URL structure, find suitable template tag to move forwered. https://docs.djangoproject.com/en/3.1/ref/templates/builtins/#url On Friday, November 20, 2020 at 8:34:08 PM UTC+5:30 rajshre...@gmail.com wrote: > Hi Users, > I have a value in variable occurence counter and I want t

Add variable value in render field in django template

2020-11-20 Thread Rajshree Some
Hi Users, I have a value in variable occurence counter and I want to pass this value in this render field .Can anyone help it? {% render_field class+='form-control' data-id="occurence_counter " %} -- You received this message because you are subscribed to the Google Groups &qu

Adding to User new variable / money system in game

2020-09-01 Thread Gracjan Chudziak
New to Django, I want create a money system in my game that each user have a different coins I tried add to User in views a variable 'balance' My views.py: 1. from monety.models import Gamer 2. from django.contrib.auth.models import User 3. from .forms import RegisterForm 4

Re: How to pass a variable to views from a template using href ?

2020-05-19 Thread Ignat Petrov
You should be able to do that by using a relative path instead of the absolute "/execute". Just use something like href="{% url 'execute' 'SQL' %}. For this to work you need to name the url path as 'execute'. That way you'll pass the 'SQL' value to the endpoint. Here is example from the polls

Re: How to pass a variable to views from a template using href ?

2020-05-19 Thread Desh Deepak
You can use slug On Tue, 19 May 2020, 6:44 pm ratnadeep ray, wrote: > Hi all, > > My requirement is to pass a variable to the view from the template using > href. > > For example, I have written the following line of code: > > SQL data > > > So using the above

RE: How to pass a variable to views from a template using href ?

2020-05-19 Thread Vishesh Mangla
In your views.py check “dir” on request.GET object to see what you have got.  Sent from Mail for Windows 10 From: ratnadeep raySent: 19 May 2020 18:44To: Django usersSubject: How to pass a variable to views from a template using href ? Hi all,  My requirement is to pass a variable to the view from

How to pass a variable to views from a template using href ?

2020-05-19 Thread ratnadeep ray
Hi all, My requirement is to pass a variable to the view from the template using href. For example, I have written the following line of code: SQL data So using the above line, can we send the value "SQL" clicking on the link of "SQL data" to the method "exec

Re: Where to set the DATABASE_URL environment variable on Heroku

2019-12-07 Thread Dvs Khamele
OKU_POSTGRESQL_TIMS_URL -a timsapp) >> >> But I am not clear where this initialization code should live >> >> would it be in the procfile? If so, what process should I use. Release? >> Worker? >> >> OR >> >> Would it be in an .env file? &g

Re: Where to set the DATABASE_URL environment variable on Heroku

2019-12-07 Thread Tim Johnson
Worker? OR Would it be in an .env file? ... snip ... I believe DATABASE_URL is set on Heroku itself as a configuration variable.  If you provision the database in Heroku, it will be set for you.  See here: https://devcenter.heroku.com/articles/heroku-postgresql#provisioning-heroku

Re: Where to set the DATABASE_URL environment variable on Heroku

2019-12-06 Thread Jorge Gimeno
stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/a02698e8-e71a-5d42-728d-4c6d012bbb84%40akwebsoft.com > . > I believe DATABASE_URL is set on Heroku

Where to set the DATABASE_URL environment variable on Heroku

2019-12-06 Thread Tim Johnson
Despite the voluminous Heroku documentation I am unable to establish where to initialize the DATABASE_URL that would establish credentials for my deployed database. Heroku's documentation uses the following example DATABASE_URL=$(heroku config:get HEROKU_POSTGRESQL_TIMS_URL -a timsapp) But I

Re: Django - How to add a link to a table that will open another page(django app) from an html template and pass a variable with it.

2019-11-11 Thread Patrick Carra
This worked for me but upon more testing I discovered some values such as WAVE/123456//IMP get changed to WAVE/123456//IMP during the process of passing this parameter as a url and django interpreting it. As a result I get an error: Circuitinfotable matching query does not exist. I'm

Re: Django - How to add a link to a table that will open another page(django app) from an html template and pass a variable with it.

2019-11-07 Thread Patrick Carra
Thank you Randy! On Wednesday, September 25, 2019 at 12:09:52 PM UTC-5, Patrick Carra wrote: > > Hello I have an app that displays some database information in a table. > Inside of the html template I am making an edit link that I want to open > another app(page viewLit) while passing a value

Re: AttributeError: cffi library '_constant_time' has no function, constant or global variable named '__spec__'

2019-10-21 Thread Jorge Gimeno
_files)) > File "C:\Python35\lib\site-packages\django\utils\autoreload.py", line > 124, in iter_modules_and_files > if getattr(module, '__spec__', None) is None: > SystemError: returned a result with an error > set > > > > On Sunday, October 20,

Re: AttributeError: cffi library '_constant_time' has no function, constant or global variable named '__spec__'

2019-10-20 Thread 'Abhishek Sharma' via Django users
result with an error set On Sunday, October 20, 2019 at 8:27:48 PM UTC+5:30, Abhishek Sharma wrote: > > I'm using Django and while run code getting below error, please help out > on it > > AttributeError: cffi library '_constant_time' has no function, constant or > global variable named

AttributeError: cffi library '_constant_time' has no function, constant or global variable named '__spec__'

2019-10-20 Thread 'Abhishek Sharma' via Django users
I'm using Django and while run code getting below error, please help out on it AttributeError: cffi library '_constant_time' has no function, constant or global variable named '__spec__' -- The information in this e-mail and any attachments is confidential and may be legally

Re: a variable is not defined

2019-10-18 Thread Joalbert Palacios
Not sure, but I believe that is because scope, given that result variable is defined in the inner method and not defined in search function. On Fri, Oct 18, 2019, 3:49 PM sotiris moustogiannis wrote: > thanks for your help!! > > On Friday, October 18, 2019 at 6:59:05 AM UTC+3, jlgimen

Re: a variable is not defined

2019-10-18 Thread sotiris moustogiannis
thanks for your help!! On Friday, October 18, 2019 at 6:59:05 AM UTC+3, jlgimeno71 wrote: > > I saw this that may be relevant: > > > https://stackoverflow.com/questions/7576202/how-can-i-pass-two-models-to-a-class-based-generic-view > > -Jorge > > On Thu, Oct 17, 2019 at 8:14 PM sotiris

Re: a variable is not defined

2019-10-17 Thread Jorge Gimeno
I saw this that may be relevant: https://stackoverflow.com/questions/7576202/how-can-i-pass-two-models-to-a-class-based-generic-view -Jorge On Thu, Oct 17, 2019 at 8:14 PM sotiris moustogiannis wrote: > I want to make custom function because i want to take one result from 2 > different models

Re: a variable is not defined

2019-10-17 Thread sotiris moustogiannis
I want to make custom function because i want to take one result from 2 different models (inner join), and i dont find a way to use 2 models in my listview class (generic) On Friday, October 18, 2019 at 6:03:18 AM UTC+3, sotiris moustogiannis wrote: > > I read that you can't use the def

Re: a variable is not defined

2019-10-17 Thread sotiris moustogiannis
I read that you can't use the def get_queryset into a function but only in a generic class view, so maybe the def get_queryset function does not run. I want to make my own custom function and i want to find a way to get self parameter in my function. Thanks a lot. On Friday, October 18, 2019

Re: a variable is not defined

2019-10-17 Thread Jorge Gimeno
wd, The problem here is that when you're creating the context, the name 'result' is not defined. When the get_queryset() method returns, the result name goes out of scope. My guess that's why you're getting a NameError. If that's not it, I would suggest cutting and pasting the traceback and

Re: a variable is not defined

2019-10-17 Thread wd
oh ,sorry my mistake. But I think the error is pretty clear ... On Fri, Oct 18, 2019 at 10:23 AM wd wrote: > Dude, you need to indent at the line include 'context' ... it's a > beginners problem... > > On Fri, Oct 18, 2019 at 10:14 AM sotiris moustogiannis < > sotom...@outlook.com> wrote: > >>

Re: a variable is not defined

2019-10-17 Thread wd
Dude, you need to indent at the line include 'context' ... it's a beginners problem... On Fri, Oct 18, 2019 at 10:14 AM sotiris moustogiannis wrote: > I have an error: name 'result' is not defined > > > > def search(request): > > def get_queryset(self): > query =

a variable is not defined

2019-10-17 Thread sotiris moustogiannis
I have an error: name 'result' is not defined def search(request): def get_queryset(self): query = self.request.GET.get('q') result = Shops.objects.filter(Q(city=query)) return result context={ 'shops' : result, } return render(request,

Re: Django - How to add a link to a table that will open another page(django app) from an html template and pass a variable with it.

2019-09-25 Thread Randy Hughes
views.py class *viewLit*(TemplateView): def get(self, request, strategy=None): circuit_id = self.request.query_params.get('circuitid', None) urls.py path('viewlit/', viewlit.as_view(), name='viewlit') search_custom.html {{ circuit.circuitid }} ''' this is an example using a query

Django - How to add a link to a table that will open another page(django app) from an html template and pass a variable with it.

2019-09-25 Thread Patrick Carra
Hello I have an app that displays some database information in a table. Inside of the html template I am making an edit link that I want to open another app(page viewLit) while passing a value to it's view. I have added my code below. My question is I am unsure of how to make this links url

Re: queryser variable from template to a view

2019-09-18 Thread Jani Tiainen
Well that is the side-effect of capturers they convert value to desired format. You can find documentation about pre-defined converters and how to register your own at https://docs.djangoproject.com/en/2.2/topics/http/urls/#path-converters ke 18. syysk. 2019 klo 19.33 Luca Bertolotti

Re: queryser variable from template to a view

2019-09-18 Thread Luca Bertolotti
Hello if i pass and in the view i do this def exmple(request,myvar): sort = myvar.order_by() i get an error because myvar is a string instead i near a query set Luca Il giorno mercoledì 18 settembre 2019 15:56:19 UTC+2, Jani Tiainen ha scritto: > > Hi. > > to the rescue! > >

Re: queryser variable from template to a view

2019-09-18 Thread Jani Tiainen
Hi. to the rescue! Also it is recommended to use {% url %} tag to construct urls not to hardcode them and once were there Django convention is to end urls to slash. ke 18. syysk. 2019 klo 15.53 Luca Bertolotti kirjoitti: > Hello i need to pass a query set from template to a view: > > > > in

queryser variable from template to a view

2019-09-18 Thread Luca Bertolotti
Hello i need to pass a query set from template to a view: in which way i have to define the urls file path('test//***what to write+++', views.test, name='test'), -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group

Re: variable from template to view

2019-09-13 Thread Luca Bertolotti
Hello again > I have solved with this: def canc_cli(request, idcliente): print('luca :'+str(idcliente)) Clienti.objects.filter(pk=idcliente).delete() return redirect('tutti_clienti') -- You received this message because you are subscribed to the Google Groups "Django users"

variable from template to view

2019-09-13 Thread Luca Bertolotti
Hello i have a question: This is the template: {% load static %} ID Ragione Sociale Via Cap Città Provincia Stato Contatto Tel.Fisso Tel.Cellulare Email {% for dati in tutti %} {{ dati.idclienti }} {{

Re: trying to use a variable inside a static content tag

2019-07-27 Thread Sipum Mishra
Hi Lyman, PFB. Configure the following setting in your setting.py STATIC_ROOT = os.path.join(BASE_DIR,"static_files") STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, "static"),) load *staticfiles* tag to template {% load staticfiles %} and then use in *src* attribute

Re: trying to use a variable inside a static content tag

2019-07-27 Thread Sithembewena L. Dube
Interesting. Kind regards, Lloyd *Sent with Shift * On Sat, Jul 27, 2019 at 11:25 PM Lyman Hurd wrote: > A helpful user in the Python #django

Re: trying to use a variable inside a static content tag

2019-07-27 Thread Lyman Hurd
A helpful user in the Python #django slack channel showed me this answer: https://stackoverflow.com/questions/16655851/django-1-5-how-to-use-variables-inside-static-tag On Saturday, July 20, 2019 at 4:31:52 AM UTC-7, Lyman Hurd wrote: > > Greetings. I am writing a card game and I can load an

trying to use a variable inside a static content tag

2019-07-20 Thread Lyman Hurd
Greetings. I am writing a card game and I can load an image when I give a fixed value such as: but I would actually like part o fthis to be determined by a tag (there is a for loop setting values) but when I write: however when this is rendered into HTML the tag {{ card }} ha sbeen

pass a variable from another site to your django site

2019-06-08 Thread Danny Blaker
Scenario: You have built a chat bot (RASA-NLU for chat page + django for the rest of the site) that helps people with advice on gardening products. A major gardening retailer has approached you and asked if you could put a button on their product detail view pages, so that when a user clicks

Re: Too many SQL variable

2019-02-18 Thread HEMENDRA SINGH HADA
Hi, Could you give me some quick fix, I am using django currently, or could be please suggest me how to take the parent table data with prefetch related filter. Thanks On Monday, February 18, 2019 at 6:21:33 PM UTC+5:30, Sebastian Henschel wrote: > > Heya, > > Am 18.02.19 um 10:52 schrieb

Re: Too many SQL variable

2019-02-18 Thread Sebastian Henschel
Heya, Am 18.02.19 um 10:52 schrieb HEMENDRA SINGH HADA: > In my current project we are using sqlite3, When I am fetching data from > sqlite3 db tables and counting the query-set length it is giving me error > "Too many SQL query" when the length is more than 999. till 999 its working > fine,

Too many SQL variable

2019-02-18 Thread HEMENDRA SINGH HADA
Hi All, In my current project we are using sqlite3, When I am fetching data from sqlite3 db tables and counting the query-set length it is giving me error "Too many SQL query" when the length is more than 999. till 999 its working fine, Please suggest some quick fix for this, Thanks in Advance

Re: Local variable dump on exception in production environment (DEBUG=False)

2019-02-03 Thread Web Architect
Hi Simon, Thanks for your response. include_html was what I needed and the stack trace in mail contained the variable dump. Thanks a lot. On Friday, February 1, 2019 at 10:15:53 PM UTC+5:30, Simon Charette wrote: > > Hello there, > > I haven't tried it myself but you could try

Re: Local variable dump on exception in production environment (DEBUG=False)

2019-02-01 Thread Simon Charette
gt; Hi, > > In our production environment, we receive mail whenever an exception > happens in our django application. But it contains only the function > traces. The log will be helpful it also contains data dump or the local > variable dump for each function trace. > The except

Re: Local variable dump on exception in production environment (DEBUG=False)

2019-02-01 Thread vineeth sagar
the info. Sentry sounds interesting and we will have a look at > Sentry as it might need integration. > > Django does report function trace via mails but we are looking for the > local variable trace also . Was hoping a small tweak in django should help. > > Thanks. > > On

Re: Local variable dump on exception in production environment (DEBUG=False)

2019-02-01 Thread Web Architect
Hi Vineeth, Thanks for the info. Sentry sounds interesting and we will have a look at Sentry as it might need integration. Django does report function trace via mails but we are looking for the local variable trace also . Was hoping a small tweak in django should help. Thanks. On Friday

Re: Local variable dump on exception in production environment (DEBUG=False)

2019-02-01 Thread vineeth sagar
i, > > In our production environment, we receive mail whenever an exception > happens in our django application. But it contains only the function > traces. The log will be helpful it also contains data dump or the local > variable dump for each function trace. > The exception trace on

Local variable dump on exception in production environment (DEBUG=False)

2019-02-01 Thread Web Architect
Hi, In our production environment, we receive mail whenever an exception happens in our django application. But it contains only the function traces. The log will be helpful it also contains data dump or the local variable dump for each function trace. The exception trace on the browser

Re: Charfield variable length

2019-01-25 Thread C. Kirby
https://docs.djangoproject.com/en/2.1/ref/models/fields/#binaryfield -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com.

Re: Charfield variable length

2019-01-24 Thread 'Odile Lambert' via Django users
Hello thank you very much for your answer. Your answer about the chafield max length is clear. I do not know how to clarify my use case because it is very special : the binary codes (there are 4) in the database will be used to set pushers on a knitting

Re: Charfield variable length

2019-01-23 Thread Anirudh Jain
If you are sure that values entered will only be 0s and 1s then why not use IntegerField(). But if really want to use CharField() and you know that size won't be larger than 180bits then use CharField(max_lenght=25) On Thu, 24 Jan 2019, 06:23 Mike Dewhirst On 24/01/2019 9:14 am, 'Odile Lambert'

Re: Charfield variable length

2019-01-23 Thread Mike Dewhirst
On 24/01/2019 9:14 am, 'Odile Lambert' via Django users wrote: Hello I have problems with the Charfield max_length. In the source code, the possibility exists to have max_length = None but it does not pass Django check when  models.py. contains a charfield = None I can understand that

Charfield variable length

2019-01-23 Thread 'Odile Lambert' via Django users
Hello I have problems with the Charfield max_length. In the source code, the possibility exists to have max_length = None but it does not pass Django check when  models.py. contains a charfield = None I can understand that there is a need for such a max_length

Re: Creation of database in real time and loading it in the DATABASES variable of Django;

2019-01-08 Thread Roshan Shah
its use; >> > When this client logs in the system will load information from the >> created >> > bank. >> > To do this it should read in the database the name of the client's >> database >> > and load it into the DATABASES variable, that is, if not see

Re: Creation of database in real time and loading it in the DATABASES variable of Django;

2019-01-08 Thread Sanderson Carmona
Example: You purchased a service and when registering the system create > a > > database with standard tables for its use; > > When this client logs in the system will load information from the > created > > bank. > > To do this it should read in the database the name

Re: Creation of database in real time and loading it in the DATABASES variable of Django;

2019-01-08 Thread Sanderson Carmona
d tables for its use; >> When this client logs in the system will load information from the >> created bank. >> To do this it should read in the database the name of the client's >> database and load it into the DATABASES variable, that is, if not see >> another way.

Re: Creation of database in real time and loading it in the DATABASES variable of Django;

2019-01-08 Thread Michal Petrucha
system will load information from the created > bank. > To do this it should read in the database the name of the client's database > and load it into the DATABASES variable, that is, if not see another way. > > If anyone can help me thank you very much, I already researched

Re: Creation of database in real time and loading it in the DATABASES variable of Django;

2019-01-08 Thread Mario R. Osorio
u purchased a service and when registering the system create a > database with standard tables for its use; > When this client logs in the system will load information from the created > bank. > To do this it should read in the database the name of the client's > database and load it int

Re: Creation of database in real time and loading it in the DATABASES variable of Django;

2019-01-07 Thread zekri sidi mohamed hicham
gistering the system create a > database with standard tables for its use; > When this client logs in the system will load information from the created > bank. > To do this it should read in the database the name of the client's > database and load it into the DATABASES variable, that i

Creation of database in real time and loading it in the DATABASES variable of Django;

2019-01-07 Thread Sanderson Carmona
purchased a service and when registering the system create a database with standard tables for its use; When this client logs in the system will load information from the created bank. To do this it should read in the database the name of the client's database and load it into the DATABASES variable

Re: Setting up environment variable

2019-01-02 Thread Jason
you need to add `DJANGO_SETTINGS_MODULE as an environment variable when setting your run configuration [image: Screen Shot 2019-01-02 at 9.05.01 PM.png] -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou

Re: Setting up environment variable

2019-01-02 Thread Kuber Sodari
Can you screenshot and paste the error shown during running your project? On Wednesday, 2 January 2019 22:30:56 UTC+5:45, Surajeet Das wrote: > > Well , I am really stuck on this setting of environment variable > :'DJANGO_SETTINGS_MODULE' . When I run my project in pycharm ,

Setting up environment variable

2019-01-02 Thread Surajeet Das
Well , I am really stuck on this setting of environment variable :'DJANGO_SETTINGS_MODULE' . When I run my project in pycharm , an error is raised showing that the environment variable isn't yet set . So , anyone please help me out on this. In which python file do I set this variable and how

Re: django.core.exceptions.ImproperlyConfigured: Requested setting AUTH_USER_MODEL, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call sett

2018-12-07 Thread Sidnei Pereira
e-packages\rest_framework\authtoken\models.py", >>> line 17, in Token >>> settings.AUTH_USER_MODEL, related_name='auth_token', >>> File "C:\Python\lib\site-packages\django\conf\__init__.py", line 57, >>> in __getattr__ >>> sel

Re: django.core.exceptions.ImproperlyConfigured: Requested setting AUTH_USER_MODEL, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call sett

2018-12-06 Thread Parker Bernard
H_USER_MODEL, related_name='auth_token', >> File "C:\Python\lib\site-packages\django\conf\__init__.py", line 57, in >> __getattr__ >> self._setup(name) >> File "C:\Python\lib\site-packages\django\conf\__init__.py", line 42, in >> _setup >>

Re: django.core.exceptions.ImproperlyConfigured: Requested setting AUTH_USER_MODEL, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call sett

2018-12-06 Thread Sidnei Pereira
", line 42, in > _setup > % (desc, ENVIRONMENT_VARIABLE)) > django.core.exceptions.ImproperlyConfigured: Requested setting > AUTH_USER_MODEL, but settings are not configured. You must either define > the environment variable DJANGO_SETTINGS_MODULE or call > settings.conf

Re: django.core.exceptions.ImproperlyConfigured: Requested setting AUTH_USER_MODEL, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call sett

2018-12-05 Thread Ryan Nowakowski
e) >File "C:\Python\lib\site-packages\django\conf\__init__.py", line 42, in > >_setup >% (desc, ENVIRONMENT_VARIABLE)) >django.core.exceptions.ImproperlyConfigured: Requested setting >AUTH_USER_MODEL, but settings are not configured. You must either >define >the env

django.core.exceptions.ImproperlyConfigured: Requested setting AUTH_USER_MODEL, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings

2018-12-05 Thread Tushar Khairnar
USER_MODEL, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubs

Re: There's way to change "model_list" result variable name from ListView?

2018-11-01 Thread Daniel Roseman
On Wednesday, 31 October 2018 12:51:15 UTC, Fellipe Henrique wrote: > > Hi, > > Normal ListView result a list with "model"_list as name... there's any > way to change these name? > > > You can set `context_object_name` to whatever name you want. This is documented here:

Re: There's way to change "model_list" result variable name from ListView?

2018-11-01 Thread Derek
You question is not very clear; perhaps add some code and/or screenshots to show what you mean. On Wednesday, 31 October 2018 14:51:15 UTC+2, Fellipe Henrique wrote: > > Hi, > > Normal ListView result a list with "model"_list as name... there's any > way to change these name? > > >

There's way to change "model_list" result variable name from ListView?

2018-10-31 Thread Fellipe Henrique
Hi, Normal ListView result a list with "model"_list as name... there's any way to change these name? T.·.F.·.A.·. S+F *Fellipe Henrique P. Soares* e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \ 's/(.)/chr(ord($1)-2*3)/ge' *Fedora Ambassador: https://fedoraproject.org/wiki/User:Fellipeh

Re: Variable within a Variable

2018-10-29 Thread Jason
sounds like you would be better off with a template tag On Monday, October 29, 2018 at 1:22:04 PM UTC-4, a.diaz@gmail.com wrote: > > Hi, > > Is it possible to have a variable within a variable... > > For example > > *{{ flights.Legs.0|length}} * > > is equal to

Variable within a Variable

2018-10-29 Thread a . diaz . cantero
Hi, Is it possible to have a variable within a variable... For example *{{ flights.Legs.0|length}} * is equal to 1 or 2 or basically a integer. Then i would like to connect this to something like: {{flights.Legs.0.InboundR.*X*.ATime}} where in stead of the X, I would like to have the value

Re: Django Mysql Error : Unknown system variable 'innodb_strict_mode

2018-08-29 Thread Jason
you shouldn't need to set the storage engine to innodb https://docs.djangoproject.com/en/2.1/ref/databases/#storage-engines MySQL’s default storage engine is InnoDB . This engine is fully transactional and supports foreign key

Django Mysql Error : Unknown system variable 'innodb_strict_mode

2018-08-29 Thread Sonali Vighne
line 374, in _do_query db.query(q) File "C:\Users\sonali_vighne\AppData\Local\Programs\Python\Python36\lib\site-packages\MySQLdb\connections.py", line 277, in query _mysql.connection.query(self, query) _mysql_exceptions.OperationalError: (1193, "Unknown system variab

  1   2   3   4   5   6   7   8   9   10   >