Re: generate username and password

2018-10-20 Thread ludovic coues
Si le but est simplement de faire plaisir a la base de données, il est possible d'utiliser l'email comme nom d'utilisateur. Pour le mot de passe, c'est une mauvaise idée. Mais c'est possible, par exemple avec le module secrets en python 3.6

Re: column "" must appear in the GROUP BY clause or be used in an aggregate function

2018-10-15 Thread ludovic coues
I cannot find in the code you shared "prome_product" so I assume there is missing code or a typo. The ProgrammingError should come with a line number or a stack trace where the line causing issue is roughly in the middle. If it's the serializer line, I suggest you split it, doing the annotate

Re: passing data to template

2017-06-14 Thread ludovic coues
735659, 0.0), (735689, 5.0), (735722, 0.0), (735750, >>> 135.0), (735780, 770.0), (735813, 265.0), (735842, -1165.0), (735872, >>> 30.0), (735904, -55.0), (735933, 4.29), (735967, 1105.0), (735968, 0.0), >>> (735990, 4.32), (735995, 0.0), (736024, 0.0), (736055, 0.0),

Re: passing data to template

2017-06-13 Thread ludovic coues
Try `{{ results | pprint }}` in your template. That will not solve your problems but that will give you a lot more information about what data have been passed to your template. On 13 Jun 2017 6:53 am, "sum abiut" wrote: > Hi, > I need some help, i am using Django as my web

Re: After Django

2017-06-06 Thread ludovic coues
ngo-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/D94B8C12-97D3-4316

Re: template drop down menu

2017-06-06 Thread ludovic coues
django-users/CAPCf-y5ZZdhwV-D71SVQ-50dQDFbhNP7KtBZMR0x7NiBVVQh9A%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. -- Cordialement, Ludovic Coues +33 6 14 87 43 42 -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Authentication backend - serialization

2017-06-05 Thread ludovic coues
ving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://grou

Re: DJANGO 1.1 dynamic url on static javascript

2017-05-30 Thread ludovic coues
Everything looking like {% %} or {{ }} are template tag. Your js file are not processed by the templating engine so they can be served really fast directly by your web server and not by django which is a lot slower. One solution would be to but the url in your html file. Add a

Re: Session Variables

2017-05-30 Thread ludovic coues
/django-users/5427f3fe-4345-41b4-9a46-c0b037ece73b%40googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. -- Cordialement, Ludovic Coues +33 6 14 87 43 42 -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Create a dynamic form in django

2017-05-28 Thread ludovic coues
More details on your problem might help us to understand what you want and how to help you. For example, "my view receive a country code of the form 'en_GB' and I want to display a form with a select input listing holiday for that country. It's easier to reason on a concrete problem and you get

Re: Django Internship

2017-05-21 Thread ludovic coues
go-users/f9a00b76-81b3-414b-a53a-84ab2c43a8cf%40googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >> >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe fr

Re: what kind of question i can ask here?

2017-05-13 Thread ludovic coues
.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/7a438e5a-4625-4efd-97ea-65a754bd2e1f%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- Cordialement, Ludovic Coues +33 6 14 87 43 42 -

Re: NoReverseMatch, Not working in Production Server

2017-05-08 Thread ludovic coues
pening on the web server. I would really appreciate any help. Thank you >> in advance. > > -- > 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

Re: django 1.11 login user

2017-05-05 Thread ludovic coues
My guess is that your error happen when accessing the page before submitting the firm. So you don't have any POST data and trying to access any key rise an error. You can use request.POST.get("key", "default_value") or you can write an if and testing that request.method is "POST". If I'm wrong,

Re: Having problem with django runserver not working in windows 7

2017-04-29 Thread ludovic coues
878-58e1-46d9-b068-9ed562a4038b%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- Cordialement, Ludovic Coues +33 6 14 87 43 42 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from th

Re: Change password using django ADMIN

2017-04-29 Thread ludovic coues
Do you mind sharing your urls.py files and the files used to generate that URL ? On 28 Apr 2017 1:20 pm, "Reynaldo Bernard" wrote: > When i change LANGUAGE_CODE = 'en-us' to 'es-mx' and i try to change > password from USER TABLE (default in Django) i got the next

Re: CSRF token missing or incorrect when uploading large file through admin interface

2017-04-28 Thread ludovic coues
Related to your problem, I wonder if it's the same instance of django handling serving the form and handling saving the file. Different instance of django might expect different token. Less related to your issue, I suggest that you have a look at butler, an open source project from itch.io. For

Re: Where is django-admin?

2017-04-28 Thread ludovic coues
You might be more successful with a different tutorial. I recommend django girls for all beginner. It's great tutorial, the most beginner friendly I've seen. That's how I learned to use form in django. https://tutorial.djangogirls.org/en/django_installation/ This link is where they show how to

Re: Django create user profile at the time of registration from submission

2017-04-22 Thread ludovic coues
roblem can anyone tell me how to fix it or why it cannot be done if it > cannot be done what is the work around > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receivi

Re: How can i add one point to user after to press the button?

2017-04-21 Thread ludovic coues
send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/97ba4189-7d02-4d8d-9be9-7e93ea52a2fb%40googlegroups.com. > For more options, visit h

Re: Raspbbery PI - PI3D - Apollo Soyuz 3d model to Freeboard dashboard node red

2017-04-17 Thread ludovic coues
on the web visit > https://groups.google.com/d/msgid/django-users/56e6aaf4-e82f-4dc6-8551-7f500f3374a3%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- Cordialement, Ludovic Coues +33 6 14 87 43 42 -- You received this message because you are subscribed to th

Re: safe perfect and reliable app for verification email

2017-04-17 Thread ludovic coues
il to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/9e07bab1-2bdc-4056-9a6e-29a418f932d8%40googlegroups.com. > > For more options, visit ht

Re: Show HTML tags in list in Django template

2017-04-16 Thread ludovic coues
oglegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/23ba36b8-b550-4eb8-acda-382f0cd7e481%40google

Re: Displaying lists with restricted number of products with Jquery

2017-04-15 Thread ludovic coues
ups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/f34f0f5e-b7d6-4701-8a79-0f38bce4f7b5%40googlegroups.com

Re: Totally Lost on "python manage.py runserver"

2017-04-14 Thread ludovic coues
es/django/db/backends/sqlite3/base.py) > it makes me think I have a problem with SQLite, but again I'm at a loss. > Completely stuck! Does anyone have the answer? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. >

Re: How To style a Django formset for fileField

2017-04-14 Thread ludovic coues
What version of django are you using ? On 14 Apr 2017 1:53 am, "Rohit Chopra" wrote: > stackoverflow question > > > > > > down votefavorite >

Re: Error with Tutorial - Writing your first Django app, part 1

2017-04-13 Thread ludovic coues
Lynn, you should really start your own thread. If you have an error, copy/paste it entirely, this make debugging a lot easier. And don't​ hesitate to share your code. There is a lot of things that can go wrong when we begin and most give more or less the same result. On 12 Apr 2017 9:27 pm,

Re: Manage.py runserver is showing somthing else

2017-04-13 Thread ludovic coues
Without the stack trace, it's hard to tell what is wrong, but my first guess would be that you saved at least one file as utf8 with BOM. Or some other encoding not understood by python. Explaining what that means is a bit technical. Text file are really a list of rather small number. Each letter

Re: getting error "Project matching query does not exist."

2017-04-12 Thread ludovic coues
sion on the web visit https://groups.google.com/d/ > msgid/django-users/7f1af12d-50ba-48fb-8774-4c4f6c47be58%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/7f1af12d-50ba-48fb-8774-4c4f6c47be58%40googlegroups.com?utm_medium=email_source=footer> > . > > For

Re: getting error "Project matching query does not exist."

2017-04-12 Thread ludovic coues
its migrate >>>> successfully. >>>> after migrate i have run following "python manage.py runserver" to run >>>> django project. >>>> >>>> After that i am getting error message "Project matching query does not >>>> exist.&quo

Re: Can you post/submit to the same view named in urls.conf?

2017-04-11 Thread ludovic coues
om/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/c50973bf-08f2-4d9b-8d94-c65008bb2628%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- Cordialement, Ludovic Coues +33 6 14 87 43 42 -

Re: getting error "Project matching query does not exist."

2017-04-11 Thread ludovic coues
> msgid/django-users/218dfc6d-90e7-4b75-9d1a-ee603a8e044d%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/218dfc6d-90e7-4b75-9d1a-ee603a8e044d%40googlegroups.com?utm_medium=email_source=footer> > . > For more options, visit https://groups.google.com/d/opt

Re: Displaying multiple images in a blog post

2017-04-10 Thread ludovic coues
send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/2f098a0a-d711-44af-b22a-058447872f22%40googlegroups.com. > > For more op

Re: password_reset error

2017-04-10 Thread ludovic coues
packages\django-1.10.5-py2.7.egg\django\urls\resolvers.py" > in _reverse_with_prefix > 392. (lookup_view_s, args, kwargs, len(patterns), patterns) > > Exception Type: NoReverseMatch at /password_reset/ > Exception Value: Reverse for 'password_reset_confirm' with argumen

Re: Password reset custom view

2017-04-09 Thread ludovic coues
+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAEPJdiyuqajjWMq2kk9FT

Re: Django Music streaming

2017-04-09 Thread ludovic coues
ango users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/dj

Re: Django Music streaming

2017-04-08 Thread ludovic coues
rs/02e8c8b0-8490-42d1-a384-d5390261a0ad%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- Cordialement, Ludovic Coues +33 6 14 87 43 42 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsub

Re: Extending a image and adding text on the extended area using python pil

2017-04-08 Thread ludovic coues
isit https://groups.google.com/d/ > msgid/django-users/CAHSNPWun8vu1eAprO_46iRPsq-qJuejjsLkWPXc%2BgxjKFsp5cQ% > 40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAHSNPWun8vu1eAprO_46iRPsq-qJuejjsLkWPXc%2BgxjKFsp5cQ%40mail.gmail.com?utm_medium=email_source=footer> > . &g

Re: Just learning about auth in django and getting error NoReverseMatch ; Exception Value: Reverse for 'password_reset_done' with arguments

2017-04-08 Thread ludovic coues
> Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/django-users/1a9a9f0e-21d8-4038-a681-1736c1cc0073%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/1a9a9f

Re: Include pictures in content

2017-04-06 Thread ludovic coues
ptions, visit https://groups.google.com/d/optout. -- Cordialement, Ludovic Coues +33 6 14 87 43 42 -- 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

Re: installing django and deploying it in a shared hosting

2017-04-06 Thread ludovic coues
We won't be able to help or anything without a lot more of details. On 5 Apr 2017 11:29 pm, "harrison wachira" wrote: > I was unable to deploy django in a shared hosting > > -- > You received this message because you are subscribed to the Google Groups > "Django users"

Re: Follow the django tutorial but failure

2017-04-05 Thread ludovic coues
traceback, not stacktrace, sorry. 2017-04-05 17:30 GMT+02:00 ludovic coues <cou...@gmail.com>: > The full stacktrace and the code of your view would be helpful, thanks > > 2017-04-05 6:12 GMT+02:00 Chris Chan <hung63...@gmail.com>: >> Hi, >> I'm try to foll

Re: Follow the django tutorial but failure

2017-04-05 Thread ludovic coues
p. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view t

Re: why i cant always

2017-04-05 Thread ludovic coues
s://groups.google.com/d/msgid/django-users/10127483-4c42-4591-938d-04dcbb89a221%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- Cordialement, Ludovic Coues +33 6 14 87 43 42 -- You received this message because you are subscribed to the Google G

Re: Why my tests need to run migrate before??

2017-04-02 Thread ludovic coues
My first guess would be that test happen on a fresh database and migrate is how django build its database 2017-04-02 11:34 GMT+02:00 XaviP : > Hi django users, > > I'm trying to understand if it's a standard behavior the need to run migrate > before tests, in a fresh

Re: Adding fields in model, migrating a sqlite.db in production...good idea?

2017-03-31 Thread ludovic coues
Make a copy of your sqlite file and try makemigration on your copy. Everything should go smoothly. If that's the case, you can now use your copy as your new production database. As a side note, I don't think using an sqlite database is bad practice. It make it super easy to backup your data.

Re: django sample projects

2017-03-27 Thread ludovic coues
An online market is nothing you can't do. There are form to add object, form to add object to a cart. Then you need to offer a view to the user so he can pay. The first result for me on google for "django paypal integration" is https://github.com/spookylukey/django-paypal. It's a reusable app

Re: Django Captcha Ajax call not working

2017-03-27 Thread ludovic coues
You Ajax call have a suspicious "data: {}" in the middle of all the arguments. On 27 Mar 2017 10:23 am, "valerio orfano" wrote: Hi, I managed to make an ajax call. But the form is always invalid. IT is like the captcha field passed to the view is always empty. valerio

Re: Django tutorial HTTP Error 404

2017-03-26 Thread ludovic coues
This might be the most often asked question on this mailing list. I'm pretty sure the code is perfectly fine, but you missed a little step in the tutorial. The third line of the error message is saying you opened http://127.0.0.1:8000/ The "Write your first view" chapter finish with "Go to

Re: cannot get div to reload with ajax

2017-03-17 Thread ludovic coues
That's your code $.ajax({ url: "{% url candidate_notes %}", success: function(data){ $('#notesColumn').html('data'); } }) I'm pretty sure you want to replace the content of notesColumn with the value of data and not the string data. I would also use

Re: Django login implement using exisit mssql (MD5 hash password encode).

2017-03-17 Thread ludovic coues
In fact, django provide both salted and non-salted md5 hash for password. If you want to use the built-in django auth method and have password hashed with MD5, add that to your settings.py file: PASSWORD_HASHERS = [ 'django.contrib.auth.hashers.MD5PasswordHasher', ] For the

Re: new bee - starting to build web application based on python - Django - PostgreSQL (or) MYSQL

2017-03-17 Thread ludovic coues
+1 for doing the tutorial. If you need more information or if you have a hard time following the tutorial, there are really good third party tutorial. I personally learned about form with the django girls tutorial. On 17 Mar 2017 1:52 a.m., "Camilo Torres" wrote: I

Re: Full domain url subfolder redirected my django application with apache with mod_wsgi

2017-03-10 Thread ludovic coues
This look like an issue with your apache configuration 2017-03-09 18:20 GMT+01:00 valerio orfano : > Hi, > > i want to claim that www.mydomain.com is not the FQDN of my server where > django app is installed, but it's another server that redirect to my django > app. > >

Re: Django FormPreview: Save form data to database

2017-03-09 Thread ludovic coues
of some way to create the > desired 'preview page' behavior while using CreateView? > > On Thursday, March 9, 2017 at 4:30:26 AM UTC-7, ludovic coues wrote: >> >> If you want to create a Job object and save it to database, I highly >> recommend the CreateView >> >&

Re: Django FormPreview: Save form data to database

2017-03-09 Thread ludovic coues
If you want to create a Job object and save it to database, I highly recommend the CreateView https://docs.djangoproject.com/en/1.10/ref/class-based-views/generic-editing/#django.views.generic.edit.CreateView 2017-03-09 2:17 GMT+01:00 jthewriter : > Probably a simple

Re: Advice: count hits/pageview for high traffic website

2017-03-08 Thread ludovic coues
Have you looked at an analytics solution like piwik ? 2017-03-08 6:40 GMT+01:00 carlos : > Daniel, no i say i used django for a website with high traffic maybe 70k per > days, but i need count visit page like > django-hitocunts but the problems like django-hitcount is not

Re: Upgrade from django 1.4 to django 1.11

2017-03-07 Thread ludovic coues
By upgrading directly from 1.4 to 1.11, deprecation warning might be missed, resulting in a non-working project with few indication of what is wrong. 2017-03-07 13:07 GMT+01:00 Antonis Christofides : > There is no inherent reason for doing it a step at a time; you

Re: Djangoproject tutorial part 1 - keep on getting 404 error on polls

2017-03-07 Thread ludovic coues
I think I see your problem. Look like you can type a character looking a lot like ^ but being different. ^ is ascii character 94, which represent the start of a line in a regular expression. 2017-03-07 14:10 GMT+01:00 ludovic coues <cou...@gmail.com>: > Is there any information on the

Re: Djangoproject tutorial part 1 - keep on getting 404 error on polls

2017-03-07 Thread ludovic coues
Is there any information on the 404 page ? I remember django being quite chatty as long it's in debug mode 2017-03-07 10:56 GMT+01:00 Vanja Falck : > Hi, > I have startet the first part of the djangoproject tutorial and get stuck in > part 1 - getting 404 errors on /polls/

Re: new to Django

2017-03-05 Thread ludovic coues
If you haven't done so, you should do the django tutorial. It will give you a good view of what is available to django user. Then there is a few page in the documentation about contributing. https://docs.djangoproject.com/en/dev/internals/contributing/ What you'll need to learn depend on what

Re: Writing your first Django app, part 4

2017-03-05 Thread ludovic coues
You didn't share your code, so all we can do is guess. My guess is that your poll don't have any answer so there is nothing to render. Try using this form: {{ question.question_text }} {% if error_message %}{{ error_message }}{% endif %} {% csrf_token %} {% for choice in

Re: Hello I am new to django

2017-03-05 Thread ludovic coues
related_name='profile') > > I tried including this in customuser model it does not understand. > > > > On 5 March 2017 at 14:24, ludovic coues <cou...@gmail.com> wrote: >> >> You should look at the related_name argument of relationship. Using >> `models.OneTo

Re: Hello I am new to django

2017-03-05 Thread ludovic coues
You should look at the related_name argument of relationship. Using ` models.OneToOneField(CustomUser, related_name='profile')` will add a profile property to your custom user object. Then your function became something like that : def get_full_name(self): full_name = '%s %s'

Re: Advice: django deploy vps error 502

2017-03-03 Thread ludovic coues
First message clearly state that the site is running fine with 6,000 visitors but have issues with 10,000 and more. I'm most intrigued by the error message from MySQL on bad value for user agent. On 2 Mar 2017 9:18 p.m., "Antonis Christofides" < anto...@djangodeployment.com> wrote: > 350

Re: django-mongo-angularJs

2017-03-02 Thread ludovic coues
Sorry, I have no experience with mongodb, I can't help you 2017-03-01 21:12 GMT+01:00 mohamed shawky : > am using mongodb which the project that i work on it deal with mongo if you > can help me thank ou in advance > > > بتاريخ الأربعاء، 1 مارس، 2017 3:43:47 م UTC+2،

Re: django-mongo-angularJs

2017-03-01 Thread ludovic coues
Can you explain why using mongodb would be better than any SQL database ? Django have models, which make abstraction of the database. It's really nice for most usage, saving plenty of time and trouble most of the time. These models have no support for mongodb and as far as I know, nothing will

Re: good 404 vs bad 404

2017-03-01 Thread ludovic coues
I would tag the 404 in django and let the monitoring app do most of the work. The tag would simply be an extra header, x-reason for example. It would take values like "no mapping for url" or "object not found". This way, your django app is still doing no more than its job, indicating the

Re: attribute required and error XML

2017-03-01 Thread ludovic coues
I can't answer on your issue exactly, but is not an XML doctype. It's the html5 doctype which as far as I know is SGML and not XML. Try removing the line starting with wrote: Hi all, I have an problem. When I use the django library form, It create an attribute "required" for an input. But

Re: Multiple Databases

2017-02-27 Thread ludovic coues
Have you checked your settings for typo ? 2017-02-27 10:02 GMT+01:00 Luvpreet Singh : > But dylan, I have written that > > Check1.objects.using('default').all() > > gives me error. > > On Mon, Feb 27, 2017 at 1:08 PM, Dylan Reinhold wrote: >> >> It is

Re: "TemplateDoesNotExist at /"

2017-02-25 Thread ludovic coues
yep, look like your settings are wrong try to add that at the end of your settings.py and watch the console you are using to launch django print(TEMPLATES["DIRS"]) print(BASE_DIR) 2017-02-25 23:05 GMT+01:00 Richard Belew : > another possibly relevant bit: the

Re: Benefit of 'return Foo.objects.all()' in a ListView

2017-02-25 Thread ludovic coues
That's what regroup is for https://docs.djangoproject.com/en/1.10/ref/templates/builtins/#regroup 2017-02-25 12:42 GMT+01:00 Richard Jackson : > Apologies if this is too off-topic, but in the case of using a > get_queryset() as below: > > class MyBlogPosts(generic.ListView):

Re: Issues saving hex format data to binaryfield

2017-02-23 Thread ludovic coues
Notice how Brian print self.rfid before and after affecting the new value. The second print should display the updated data. As it is not the case, I highly doubt save will change the value in db. Ok, look like I misread the code when writing my previous reply. Now I'm all curious about how did

Re: Django official tutorial part 2 problem - model won't show on admin site

2017-02-23 Thread ludovic coues
Do you mind showing your admin.py ? On 23 Feb 2017 3:27 a.m., "t0mgs" wrote: > Hi there, > > I've posted another topic but it seems to have gotten lost somehow. Not > sure if there's approval needed or something. > > Anyways - I got stuck in this part of the tutorial >

Re: Issues saving hex format data to binaryfield

2017-02-22 Thread ludovic coues
As you have editable = True, I assume you have read the code a bit. I personnaly stopped reading after RegisterLookupMixin. If looking at the code don't give you a solution, I would try to fallback to raw SQL. That might be a skill more useful than the ability to update BinaryField :) 2017-02-22

Re: Issues saving hex format data to binaryfield

2017-02-22 Thread ludovic coues
Can't you use django's BinaryField ? 2017-02-22 20:09 GMT+01:00 Shawn Milochik : > Why not base64 encode it and just store it in a charfield? There doesn't > seem to be any compelling reason to store it in binary. > > -- > You received this message because you are subscribed

Re: Implementing a basic search for my website

2017-02-20 Thread ludovic coues
You can split your query set in two. First search elements with both elements then elements with only one. Obviously, that's two request, so there might be better way to handle the problem. On 20 Feb 2017 4:33 p.m., "Carlo Ascani" wrote: > Hi all, > I am just trying to

Re: Multiple app css,html, javascript,img

2017-02-17 Thread ludovic coues
You should use staticfiles to include your css, js and image in your page. You first need to load the module in your template, then you can use the static tag {% load staticfiles %} While you are in dev, static will look into each of your app's static directory for the path you passed as

Re: Multiple app css,html, javascript,img

2017-02-17 Thread ludovic coues
Here is an exemple, slightly simplified from one of my project Assuming a "generic" app, generic/templates/base.html would be something like that {% load staticfiles %} {% block title %}myfb{% endblock %} {% block content %}{% endblock %} with style.css in generic/static/css/style.css and

Re: Multiple app css,html, javascript,img

2017-02-17 Thread ludovic coues
I second the need to put js and css files under a static directory. When going to production, you'll need to look at the management command about static files. Also, don't put html files outside templates directory. And unless you have a good reason not to, put the html files in a subdirectory of

Re: Append to models.JSONField on POST

2017-02-16 Thread ludovic coues
n a > JSONField without fetching the whole record first. > > On Thursday, 16 February 2017 16:24:06 UTC, ludovic coues wrote: >> >> You can't. >> >> There is 7 value types in JSON. >> 3 of them are constant, true, false and null. Appending to them make no

Re: Django template language resolve url

2017-02-16 Thread ludovic coues
First, I would make sure all namespace are unique. Then I would try {% url "ytlinks:save_ytlink" %} In 'links.views.save_ytlink', I have no idea what links or views are. You might also want to re-read the documentation on urls namespace and included urlconfs

Re: Append to models.JSONField on POST

2017-02-16 Thread ludovic coues
You can't. There is 7 value types in JSON. 3 of them are constant, true, false and null. Appending to them make no sense. You could append to number, but then you change its value. String are double quote delimited. You can't append to it, you need to insert before the closing double quote. aka

Re: Hello. Users, permissions, etc.

2017-02-16 Thread ludovic coues
Have you looked at that ? https://docs.djangoproject.com/en/1.10/topics/auth/default/#topic-authorization 2017-02-16 13:32 GMT+01:00 : > Good day, I faced with a problem. > Any database with the information. DB is filled with the site. It is > necessary to make several

Re: About create a web GPS aplication

2017-02-15 Thread ludovic coues
Yes, sure Django provide out of the box a really nice user model and some extensive permission facility https://docs.djangoproject.com/en/1.10/topics/auth/default/#topic-authorization On 15 Feb 2017 6:23 p.m., "Pedro Araujo" wrote: > Greetings to all. > > This is my

Re: Saving Data in Multiple Selected Checkbox for Voting System

2017-02-14 Thread ludovic coues
10/topics/db/queries/#backwards-related-objects 2017-02-14 12:35 GMT+01:00 Genaro Lubong <glubon...@gmail.com>: > so I need to provide it? I am using def views for the template > > On Feb 10, 2017 7:14 PM, "ludovic coues" <cou...@gmail.com> wrote: >> >> You di

Re: How to login different user each on different pages using class based views

2017-02-14 Thread ludovic coues
I would add a get_redirect_url method on all user model, which give a different url depending on the user category. Then use a redirect url with a get_redirect_url method returning the value of get_redirect_url from the user. If you want to use url name instead of path, use django.urls.reverse

Re: Is it possible to save children before parents?

2017-02-13 Thread ludovic coues
You could use a method instead of a property for the proportions. https://docs.djangoproject.com/en/1.10/ref/utils/#django.utils.functional.cached_property The cached_property decorator let you use the method like a property and will cache the results so it's only computed once per objects. On

Re: return Database.Cursor.execute(self, query, params) django.db.utils.IntegrityError: NOT NULL constraint failed: auth_user.last_login when adding a superuser

2017-02-13 Thread ludovic coues
Have you tried to run makemigrations before migrate ? On 12 Feb 2017 7:33 p.m., "Adam" wrote: > Hi Antonis, this is the full message including the command: > > :~/udemystuff/test_project# python manage.py createsuperuser >

Re: No module named client

2017-02-13 Thread ludovic coues
I would do that to get more debugging information : try: from salt import client except : import salt raise RuntimeError("[%s]" % ", ".join(dir(salt))) If it work like I hope it does, it will print all the module from salt and a bit more information. Or you can

Re: class bade view

2017-02-12 Thread ludovic coues
We call it function based view. Method are function attached to an object. As far as I know, there is no plan to remove function based view. But in my opinion, you should definitely have a look at class based view. They really shine in common task. An example, a view to create an object will

Re: Django doesn't load CSS

2017-02-12 Thread ludovic coues
Have you tried to run manage.py collectstatic ? The devserver with debug serve static file from each app, but it doesn't do it without debug. The idea is that static files should be served directly by your server or with a CDN and not requiring any CPU time from django. 2017-02-11 22:37 GMT+01:00

Re: file fields

2017-02-12 Thread ludovic coues
Ok, sorry for the delayed response, I was a bit busy the last few days The error is the location argument for your FileSystemStorage. It should be a string and you are passing a tuple. That's why you get a TypeError with illegal type for parameter. Have you tried to entirely remove the storage

Re: Saving Data in Multiple Selected Checkbox for Voting System

2017-02-10 Thread ludovic coues
You didn't provide the view making use of that template 2017-02-10 10:49 GMT+01:00 Genaro Lubong : > please help me guys > > > On Feb 8, 2017 12:33 AM, "Genaro Lubong" wrote: > > Hello, newbie here, I am currently making our capstone project as a >

Re: file fields

2017-02-07 Thread ludovic coues
Can you post the full backtrace ? 2017-02-07 20:15 GMT+01:00 ايهاب توفيق : > > this the error that keep coming up TypeError: _getfullpathname: illegal type > for path parameter > بتاريخ الخميس، 26 يناير، 2017 1:04:28 ص UTC+2، كتب ايهاب توفيق: >> >> I am new in django and to

Re: Tutorial part 4 help: the raidio buttons to make a choice on the polls question won't show.

2017-02-07 Thread ludovic coues
Have you added some choices to the "What's up?" question ? What you see is that question.choice_set.all is empty. The following snippet will give you some output: {% for choice in question.choice_set.all %} {{ choice.choice_text }} {% empty %} Sorry, no available choices. {% endfor

Re: Why my column header of listview always uppercase?

2017-02-07 Thread ludovic coues
The line 296 of base.css is responsible for this behaviour. Adding a rule "thead th { text-transform: capitalize; }" at a later point should do what you want. To do that, I would add an app in INSTALLED_APPS before django.contrib.admin. In that app templates directory, I would add the following

Re: change site_header and site_title and ... dynamically

2017-02-05 Thread ludovic coues
Have you done the tutorial ? I'm thinking of the part 7 which cover this topic if I'm not mistaken https://docs.djangoproject.com/en/1.10/intro/tutorial07/#customize-the-admin-look-and-feel 2017-02-05 5:51 GMT+01:00 : > No, i want change site_header, site_title and other

Re: multiple file upload from image filed in django admin

2017-02-05 Thread ludovic coues
Have you found this piece of the doc ? https://docs.djangoproject.com/en/1.10/topics/http/file-uploads/#uploading-multiple-files 2017-02-05 0:13 GMT+01:00 Amit Pathak : > Hi Guys, > > I have to upload multiple images from single ImageField and i have tried > everything

Re: Problem UnicodeDecodeError when run createsuper

2017-02-05 Thread ludovic coues
What about using a string instead of a byte_array ? Replacing b'Endere\xc3\xa7o de email: ' with 'Endereço de email: ' should do the trick 2017-02-04 22:41 GMT+01:00 Lucas Simon Rodrigues Magalhaes : > Hello everyone, > > I have a problem when run createsuperuser.py command

Re: validation of admin form with inlines

2017-02-05 Thread ludovic coues
I would hide or make the amount field read-only and set it with a pre_save signals. This way, you don't have to worry about it and you get the right value every time instead of getting an error every now and then. 2017-02-04 16:32 GMT+01:00 Roberto Russi : > I need to

  1   2   3   4   >