Re: django model method

2023-02-10 Thread Gabriel Araya Garcia
Allways there is a way to improve the code, but  if that not run, then try
with CYTHON

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El jue, 9 feb 2023 a las 10:09, Andréas Kühne ()
escribió:

> Not if you want it to be fast. Python itself is slow - so you should try
> to offload most of the computation on the database. So filtering would need
> to be done on database fields as well.
>
> Otherwise you would need to load all of the rows into memory and then do
> the filtering there.
>
> If you want to continue along the route you have taken now - you probably
> could solve it with annotated queries - something like this:
>
> https://stackoverflow.com/questions/1396264/how-to-sort-by-annotated-count-in-a-related-model-in-django
>
> Regards,
>
> Andréas
>
>
> Den tors 9 feb. 2023 kl 13:21 skrev Chelsea Fan <
> allaberdi16yazha...@gmail.com>:
>
>> understood, is there any way to filter objects by method value?
>>
>> On Thu, Feb 9, 2023 at 4:42 PM Andréas Kühne 
>> wrote:
>>
>>> No.
>>>
>>> Ordering works by using the database to order the models. It therefore
>>> needs to be a database field - otherwise the database can't order by the
>>> field?
>>>
>>> Regards,
>>>
>>> Andréas
>>>
>>>
>>> Den tors 9 feb. 2023 kl 12:09 skrev Chelsea Fan <
>>> allaberdi16yazha...@gmail.com>:
>>>
>>>> hello guys, Is it possible to use model method value to ordering model
>>>> objects in meta class?
>>>>
>>>> class Post(models.Model):
>>>> title = models.CharField(max_length=255, verbose_name="ady")
>>>> text = RichTextField(verbose_name="text")
>>>> tagList = models.ManyToManyField(Tag, verbose_name="taglar",
>>>> related_query_name="tagList")
>>>> image = models.ImageField(upload_to="postImage/", verbose_name=
>>>> "surat")
>>>> seen = models.ManyToManyField(UserId,verbose_name="görülen sany",
>>>> blank=True, related_name="gorulen")
>>>> like = models.ManyToManyField(UserId,verbose_name="like sany",
>>>> blank=True)
>>>> share = models.PositiveIntegerField(verbose_name="paýlaşylan sany",
>>>> null=True, blank=True, default="0")
>>>> createdAt = models.DateTimeField(auto_now_add=True, 
>>>> verbose_name="goşulan
>>>> güni")
>>>>
>>>> class Meta:
>>>> verbose_name_plural="Makalalar"
>>>> # ordering = ("-createdAt",)
>>>> ordering = ["-hotness",]
>>>>
>>>> def __str__(self):
>>>> return self.title
>>>>
>>>> def likes(self):
>>>> return self.like.count()
>>>>
>>>> likes.short_description = "Like sany"
>>>> likes.allow_tags = True
>>>>
>>>> def seens(self):
>>>> return self.seen.count()
>>>>
>>>> seens.short_description = "Görülen sany"
>>>> seens.allow_tags = True
>>>>
>>>> @property
>>>> def hotness(self):
>>>> return self.likes() + self.seens() + self.share
>>>>
>>>> --
>>>> 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.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-users/CAJwZndfmes4g2KWUB3Fz6wNRORQ40Fxj_NYwYKWCF6DX96OVyg%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAJwZndfmes4g2KWUB3Fz6wNRORQ40Fxj_NYwYKWCF6DX96OVyg%40mail.gmail.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> --
>>> 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.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAK4qSCfpaVQ1YXMbVae26RLgsYYBcLRMcpgQOEm9z3%2B6NpN5Ww%40mail.gmail.com
>>> <https://gr

Re: How to get superuser access to bypass payments page

2022-10-20 Thread Gabriel Araya Garcia
In template you should put an conditional, if it is an any user then show
the real price and if it's a superuser then show zero. And on the back-end
you should ask the same question at the time to save.

gabrielaraya2...@gmail.com

Regards


Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El jue, 20 oct 2022 a las 15:55, Silver Trinity ()
escribió:

> Hello all new developer here,
>
> I am working with existing code base and want to fix an issue in the
> system. Here is the problem:
>
> When a superuser logs into the site and selects a product, he is charged
> and I have to implement a 100% discount to his price so he doesn't have to
> pay. This is inefficient and I want to do it another way.
>
> How can I change this so that a superuser can select a product,  and
> bypass the payment section? Here is some code for reference along with the
> mixins being used:
>
> Code snippets:
> https://pastebin.com/3RTKAi9U
> https://pastebin.com/g6vdX5Uk
>
>
>
>
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/eea3c99f-e086-4cd8-8874-dfe4e333e276n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/eea3c99f-e086-4cd8-8874-dfe4e333e276n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDAUkUkP6SYpyyFDt60zbhHQ8wdx6HpyVWOpS6uquNNsUQ%40mail.gmail.com.


If save a new row, then save a new user in AUTH_USER

2022-06-11 Thread Gabriel Araya Garcia


Tengo una template, la cual sirve para incorporar vendedores, en esta, 
existe un campo username. ¿ Que debería hacer cuando graba un nuevo 
registro vaya e inserte también dicho vendedor en auth_user.

En mi template tengo varios campos del mismo nombre que usa auth_user, por 
lo cual sería interesante que los grabara inmediatamente.

Gracias por vuestra ayuda

Devilsito

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/76c98fa9-51fd-46e4-b7c8-03244762cbfbn%40googlegroups.com.


Re: how to convert xlsx file into jpg

2022-06-09 Thread Gabriel Araya Garcia
Why do  you want to do that? I ask you about that for have one idea to give
you. Perhaps there is an easy solution.
We need more information

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El jue, 9 jun 2022 a las 5:25, Abhinandan K ()
escribió:

> IS anybody know how to convert xlsx file into jpg format in python on mac ?
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAA6_Mp6Ve%3D1jdvYbt3qRVVub1%2BhsbHf%3Dd0VYR6WWCk%3DDC_-5wg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAA6_Mp6Ve%3D1jdvYbt3qRVVub1%2BhsbHf%3Dd0VYR6WWCk%3DDC_-5wg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDCVVXhsagbGdmant-0-BONrXp8zu0jh5303O1%2BVOMu9Sw%40mail.gmail.com.


Re: PHP website | a way to refresh the page without reloading

2022-05-20 Thread Gabriel Araya Garcia
Mike:
I have forgotten. REACT can be used with DJANGO (in back) and REACT (in
front)
Have a good day,

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El sáb, 21 may 2022 a las 11:41, Gabriel Araya Garcia (<
gabrielaraya2...@gmail.com>) escribió:

> Mike:
> You should see a REACT tutorial for beginners. React doesn't reload the
> page.
>
> Gabriel Araya Garcia
> GMI - Desarrollo de Sistemas Informáticos
>
>
>
>
> El mié, 18 may 2022 a las 19:27, Mike Dewhirst ()
> escribió:
>
>> On 19/05/2022 4:23 am, Dias André wrote:
>>
>> Good afternoon! I'm new to programming and I'm making a website in php, I
>> would like to know if there is a way for my website to update without
>> reloading the page and always going to the top of it.
>> sry for the english
>>
>>
>> When I was new to web programming I didn't know which way to to turn.
>>
>> I had come from Delphi and really wanted an object oriented approach. I
>> tried Perl with its blessed hashes and then saw PHP was object oriented so
>> I looked at that. Unfortunately php was only partly object oriented and I
>> was not mentally sufficiently rigorous to use it properly. My mistakes lay
>> hidden waiting to bite me. In my opinion you have to be a really brilliant
>> programmer to use php. I'm not and never will be that brilliant so I cannot
>> use php.
>>
>> Then I found Python and it was perfect. It was originally designed as a
>> teaching language for schoolkids. Just my cup of tea. Easy to learn and
>> built-in guardrails.
>>
>> Python didn't let me make the sort of mistakes php almost forced on me.
>> It is completely object oriented.
>>
>> Then I looked for a web framework and back then there were many. I even
>> went out on the Python lists and asked what people thought. There were too
>> many opinions. It would take me forever to learn how to use all these
>> different frameworks just so I could pick one.
>>
>> I decided to write my own just to teach myself Python.
>>
>> But I needed a DBMS. MySQL was big at the time and I was actually using
>> it in one application. A friend told it was not the best and I should use
>> PostgreSQL. But because I was starting from scratch I figured I would write
>> a simple text-file backend database until I was ready to decide which way
>> to to turn.
>>
>> Then the Python community declared Django was going to be its favourite
>> web framework. So I decided on Django. The Django docs seemed to favour
>> PostgreSQL so apart from using Apache because I was already familiar with
>> it, that was all my decisions made.
>>
>> It took a long time for me to settle and you have apparently come to
>> Django by pure luck :-)
>>
>> BTW, you probably need to look at javascript or HTMX for updating parts
>> of a page without reloading.
>>
>> Cheers and welcome!
>>
>> Mike
>>
>>
>> Dias André,
>> greetings.
>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/eef9e2f0-ebce-403e-82e3-334d7575e78fn%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/eef9e2f0-ebce-403e-82e3-334d7575e78fn%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>>
>>
>> --
>> Signed email is an absolute defence against phishing. This email has
>> been signed with my private key. If you import my public key you can
>> automatically decrypt my signature and be sure it came from me. Just
>> ask and I'll send it to you. Your email software can handle signing.
>>
>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/09cb6eaf-b34b-32f8-9857-97c4ccff15cb%40dewhirst.com.au
>> <https://groups.google.com/d/msgid/django-users/09cb6eaf-b34b-32f8-9857-97c4ccff15cb%40dewhirst.com.au?utm_medium=email_source=footer>
>> .
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDC9RwDMJP9cNyk5-1WvcE7YNe%2BBJXWJiF_0R%2Bcueo5rqQ%40mail.gmail.com.


Re: PHP website | a way to refresh the page without reloading

2022-05-20 Thread Gabriel Araya Garcia
Mike:
You should see a REACT tutorial for beginners. React doesn't reload the
page.

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El mié, 18 may 2022 a las 19:27, Mike Dewhirst ()
escribió:

> On 19/05/2022 4:23 am, Dias André wrote:
>
> Good afternoon! I'm new to programming and I'm making a website in php, I
> would like to know if there is a way for my website to update without
> reloading the page and always going to the top of it.
> sry for the english
>
>
> When I was new to web programming I didn't know which way to to turn.
>
> I had come from Delphi and really wanted an object oriented approach. I
> tried Perl with its blessed hashes and then saw PHP was object oriented so
> I looked at that. Unfortunately php was only partly object oriented and I
> was not mentally sufficiently rigorous to use it properly. My mistakes lay
> hidden waiting to bite me. In my opinion you have to be a really brilliant
> programmer to use php. I'm not and never will be that brilliant so I cannot
> use php.
>
> Then I found Python and it was perfect. It was originally designed as a
> teaching language for schoolkids. Just my cup of tea. Easy to learn and
> built-in guardrails.
>
> Python didn't let me make the sort of mistakes php almost forced on me. It
> is completely object oriented.
>
> Then I looked for a web framework and back then there were many. I even
> went out on the Python lists and asked what people thought. There were too
> many opinions. It would take me forever to learn how to use all these
> different frameworks just so I could pick one.
>
> I decided to write my own just to teach myself Python.
>
> But I needed a DBMS. MySQL was big at the time and I was actually using it
> in one application. A friend told it was not the best and I should use
> PostgreSQL. But because I was starting from scratch I figured I would write
> a simple text-file backend database until I was ready to decide which way
> to to turn.
>
> Then the Python community declared Django was going to be its favourite
> web framework. So I decided on Django. The Django docs seemed to favour
> PostgreSQL so apart from using Apache because I was already familiar with
> it, that was all my decisions made.
>
> It took a long time for me to settle and you have apparently come to
> Django by pure luck :-)
>
> BTW, you probably need to look at javascript or HTMX for updating parts of
> a page without reloading.
>
> Cheers and welcome!
>
> Mike
>
>
> Dias André,
> greetings.
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/eef9e2f0-ebce-403e-82e3-334d7575e78fn%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/eef9e2f0-ebce-403e-82e3-334d7575e78fn%40googlegroups.com?utm_medium=email_source=footer>
> .
>
>
>
> --
> Signed email is an absolute defence against phishing. This email has
> been signed with my private key. If you import my public key you can
> automatically decrypt my signature and be sure it came from me. Just
> ask and I'll send it to you. Your email software can handle signing.
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/09cb6eaf-b34b-32f8-9857-97c4ccff15cb%40dewhirst.com.au
> <https://groups.google.com/d/msgid/django-users/09cb6eaf-b34b-32f8-9857-97c4ccff15cb%40dewhirst.com.au?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDCsmCwxQEX6%3DG9Jggb4Z6TY0xzPv7jMMDO59X4s%2BMoUUQ%40mail.gmail.com.


Re: runserver not working

2022-04-02 Thread Gabriel Araya Garcia
Did you solve that. If not, you could tell me and I'll help you

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El mar, 22 mar 2022 a las 2:07, 'Delvin Alexander' via Django users (<
django-users@googlegroups.com>) escribió:

> would anyone know why my "manage.py runserver" is not working?
>
> Every time i try running it on the command prompt, i get relocated to my
> visual studio of manage.py file that states this:
>
> #*!/usr/bin/env python*
> *"""Django's command-line utility for administrative tasks."""*
> *import os*
> *import sys*
>
>
> *def main():*
> *"""Run administrative tasks."""*
> *os.environ.setdefault('DJANGO_SETTINGS_MODULE',
> 'django_project.settings')*
> *try:*
> *from django.core.management import execute_from_command_line*
> *except ImportError as exc:*
> *raise ImportError(*
> *"Couldn't import Django. Are you sure it's installed and "*
> *"available on your PYTHONPATH environment variable? Did you "*
> *"forget to activate a virtual environment?"*
> *) from exc*
> *execute_from_command_line(sys.argv)*
>
>
> *if __name__ == '__main__':*
> *main()*
>
>
> A step in the right direction will be super helpful for me.
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/69291c68-61e7-4557-8175-7b705bcfcbb0n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/69291c68-61e7-4557-8175-7b705bcfcbb0n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDAZXjmAX5wTAardff29U2CM9q78-5UdDBZjTSv_2vZy%2BA%40mail.gmail.com.


Re: Supertypes, subtypes and authentication

2022-03-24 Thread Gabriel Araya Garcia
If you had implemented the authentication in your app, then I think, it
would be more easy to develop other things more complex. Remember in Django
you can give permission at  users  group

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El mar, 22 mar 2022 a las 10:12, 'AnneVerm' via Django users (<
django-users@googlegroups.com>) escribió:

> I'm working on a web aplication in which I have a supertype node which is
> subtyped by organization, person and thing. Nodes can have permission to
> create/update/delete addresses, events, articles, pages etc. which all have
> a foreignkey referencing node.
>
> I'm struggling with the authentication and authorization. If I add a node
> to the user I could use UserPassesTestMixin like this:
>
> def test_func(self):
> obj = self.get_object()
> return obj.node == self.request.node
>
> However, the consequence is that every node is related to a user
> one-to-one, which in case of things is not ideal.
>
> I hope someone could point me in the right direction to solve this problem.
>
> Kind regards,
>
> Anne
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/03685bda-5257-42e0-88ef-1973de3411dfn%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/03685bda-5257-42e0-88ef-1973de3411dfn%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDDWQEE3iJwTt%3DRzNM9KtjD-%2BHynLnz2%3Dp6-gYxVerkOQg%40mail.gmail.com.


Re: order_by on the basis of time difference (updated_at - created_at)

2022-01-21 Thread Gabriel Araya Garcia
Try this:
ExampleModel.objects.all().order_by('updated_at' , '-created_at')
Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El vie, 21 ene 2022 a las 1:54, Aadil Rashid ()
escribió:

> class ExampleModel(models.Model):
> is_active = models.BooleanField(default=True)
> created_at = models.DateTimeField(auto_now_add=True)
> updated_at = models.DateTimeField(auto_now=True)
>
>
>
> I want to query on UserModel such that the Query set which I get should be
> orderable in terms of time difference of updated_at - created_at,
> I tried
> ExampleModel.objects.all().order_by('updated_at' - 'created_at')
> but this is not working
> it throws, *TypeError*: unsupported operand type(s) for -: 'str' and 'str'
>
>
> Django Family Please Help...
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAAYXZx8sABKuJn5Q1ATeHnYsrixfU9wTH_TtPYoR5%3DeAd8DOzA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAAYXZx8sABKuJn5Q1ATeHnYsrixfU9wTH_TtPYoR5%3DeAd8DOzA%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDDy%2BnJNcFE-xpz38zfDVYgw6P3zDZ9BJ_5-EsoAtDDLTw%40mail.gmail.com.


Re: Django works with PDF

2022-01-21 Thread Gabriel Araya Garcia
Hola,
No entiendo lo que es 'metadatos', pero es bastante conocida la
librería REPORTLAB,  y yo la he implementado en mis proyectos, es
relativamente fácil lograr lo que tu quieres con ella. Si aún no has
resuelto tu problema escribeme y te mandare unos ejemplos. Ademas hay lot
of sites que muestran su uso.
gabrielaraya2...@gmail.com

Saludos,

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El jue, 20 ene 2022 a las 11:16, Amor Zamora ()
escribió:

> I have 2 problems working with pdf in django.
> 1. I need a tool, function or library that allows me to open a pdf and
> read the metadata, to get its 'creator and producer' there, but I have to
> do this, not with python, because to show it on the frontend.
> 2. How can I get the country from an Ip address (I use the ipaddress
> module in my project). But I don't know how I can get the country,
> because the IPs are assigned by ranges not by regions and the ipaddress
> module that I know of does not bring anything incorporated to be able to
> obtain the country.
> At this point, I can't use GeoIP, in any of its variants.
> please help
>
> --
> Amor Zamora
> Behind the distance,
> your mouth and mine hide,
> complices of a kiss, caresses, fantasies,
> distance as close as the sky and the sea,
> my piece is in your bed, in mine, is your love.
> Behind the distance hide love, memories,
> encounters, experiences, circumstances, pain and good times,
> it is after her, the distant ones,
> that we leave feelings,
> but if we really miss,
> distance,
> it is only your time.
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAKMTbHWtN%3D5Pzm2yj2kR3erDLkiArAhJZVmxE0X0hvbjFu6eTA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAKMTbHWtN%3D5Pzm2yj2kR3erDLkiArAhJZVmxE0X0hvbjFu6eTA%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDCHYJtYQYDsdgY-%2BnDdPMi322QQek0qCOKwrCotiHdikQ%40mail.gmail.com.


Re: On django model.

2021-12-26 Thread Gabriel Araya Garcia
I make the changes in database table manually. The most important is the
keep the amount of fields in the model and the type (varchar,integer, text,
..etc.)
That is part of Django flexibility.

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El vie, 24 dic 2021 a las 9:11, Amor Zamora ()
escribió:

> Hi guys.
> I have an application in Django that has a database in postgresql.
> But a new table was added to that database.
> I have tried using the inspectdb (python3 manage.py inspectdb
> tracking_visit) command, to add that table to the DJango model, but it
> gives me an exception, it tells me that the ID field of the new table is
> not an integer and if it is, I put it as an integer and primary key and so
> on itself is reflected in the database.
> # Unable to inspect table 'tracking_visit'
> # The error was: sequence index must be integer, not 'slice'
>
> 1. My question is if you know any other method or application that allows
> me to generate the model from the database.
> 2. Is there any other way to include changes made from the database into
> the django model?
>
> Best regards
>
> --
> Amor Zamora
> Behind the distance,
> your mouth and mine hide,
> complices of a kiss, caresses, fantasies,
> distance as close as the sky and the sea,
> my piece is in your bed, in mine, is your love.
> Behind the distance hide love, memories,
> encounters, experiences, circumstances, pain and good times,
> it is after her, the distant ones,
> that we leave feelings,
> but if we really miss,
> distance,
> it is only your time.
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAKMTbHUWN5QaAyrgrABL5GeKouU0qf2xoxkUqpg-x4WJZmocvg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAKMTbHUWN5QaAyrgrABL5GeKouU0qf2xoxkUqpg-x4WJZmocvg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDD_L1ZFhSkuCqutE9u1Fs%3DSn%3D%3DTuQU5THGxp2cePrU-Yg%40mail.gmail.com.


Re: INPUT TEXT in grid

2021-10-02 Thread Gabriel Araya Garcia
Thanks for your help, My problem I've solved. David Nugent says that the 
template must be built with using 'POST', and also the grid (table) is from 
database table, then the name  in each row I put the ID (numeric), 
therefore in view get the value with: 
valor_saca = request.POST.get(str(sigma.id_reg)) # obligadamente debe ser 
string
Here is important the 'str', it must be string (chracter, or no numeric)

(Excuse me my english )
Regards  


El miércoles, 29 de septiembre de 2021 a las 16:58:11 UTC-3, 
adeyem...@gmail.com escribió:

> Based on my observation. Your form doesn't have it's href attribute, 
> secondly in the view, the function should ve a post method and not get, 
> thirdly back to the template, u should have a name attribute for ur input 
> tag which u do but the value should be an arbitrary name or any name of ur 
> choice as a string which u will use to reference in the view function.
>
> Little modification to ur view function:
> To reference the input name attribute lets give it a value called para.
>
> def parasalidaView(request):
> if request.method == 'POST'
> parasalida = Parasalida.objects.all()
> a_prueba = []
> for cue in parasalida:
> data = request.POST.get('para')
> a_prueba.append(data)
> 
>
>
> On Wed, 29 Sep 2021, 00:38 David Nugent,  wrote:
>
>> Request.GET can't apply when processing a POST request.
>>
>> You are quoting 'cur.id_reg' when accessing the GET (should be POST) 
>> params and it probably should not be - you need to access the "name" 
>> attribute that your form uses. You should also be using cleaned_data 
>> <https://docs.djangoproject.com/en/3.2/ref/forms/api/> after using 
>> proper form validation, and in this case you should probably be using a f
>> ormset <https://docs.djangoproject.com/en/3.2/topics/forms/formsets/> 
>> instead 
>> of manually generating a multiple record input form.
>>
>> HTH, David
>>
>> On Wed, Sep 29, 2021 at 7:15 AM Gabriel Araya Garcia <
>> gabriela...@gmail.com> wrote:
>>
>>> I have one grid
>>>
>>> 
>>>
>>> {% for pr in parasalida %}
>>>   
>>> {{ pr.estado}}
>>> {{ pr.fecha_ing|date:'d-m-Y'}}
>>> {{ pr.lote}}
>>> {{ pr.oc_ascoex}}
>>> {{ pr.cantidad}}
>>> {{ pr.extraida}}
>>> >> name='{{pr.id_reg}}' class='saca' value="{{saca_x}}" placeholder='0'/>
>>>
>>>   
>>> {% endfor %}
>>>
>>> but, I don't know how to get the value in view:
>>>
>>> parasalida = Parasalida.objects.all() 
>>> a_prueba = []
>>> for cur in parasalida:
>>> saca_x = request.GET.get('cur.id_reg') #  template's value 
>>> according to name property
>>> a_prueba.append(saca_x)
>>>
>>> The list is full with  [None,None,None,..]
>>>
>>> All others fields are already with values. The only values that user 
>>> input is "input text"
>>>
>>> Thank for your help
>>>
>>> -- 
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/a2ba10d5-639e-4a08-88fe-a4206e18c249n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/django-users/a2ba10d5-639e-4a08-88fe-a4206e18c249n%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> -- 
>> 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...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CAE5VhgWG3AjQD_vASX%3DG%2BpgmNdg9FVc6VSEn-dCf%3DjiNuPncwQ%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/django-users/CAE5VhgWG3AjQD_vASX%3DG%2BpgmNdg9FVc6VSEn-dCf%3DjiNuPncwQ%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6ffed308-dcbb-4849-b67d-7ac2878b82cbn%40googlegroups.com.


INPUT TEXT in grid

2021-09-28 Thread Gabriel Araya Garcia
I have one grid


   
{% for pr in parasalida %}
  
{{ pr.estado}}
{{ pr.fecha_ing|date:'d-m-Y'}}
{{ pr.lote}}
{{ pr.oc_ascoex}}
{{ pr.cantidad}}
{{ pr.extraida}}


  
{% endfor %}

but, I don't know how to get the value in view:

parasalida = Parasalida.objects.all() 
a_prueba = []
for cur in parasalida:
saca_x = request.GET.get('cur.id_reg') #  template's value 
according to name property
a_prueba.append(saca_x)

The list is full with  [None,None,None,..]

All others fields are already with values. The only values that user input 
is "input text"

Thank for your help

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a2ba10d5-639e-4a08-88fe-a4206e18c249n%40googlegroups.com.


Re: Deploying django in plesk

2021-08-25 Thread Gabriel Araya Garcia
Hi, Frank:
Perhaps that can run if you put the statics folder in the exterior level.
Por example:
misite/misite/myapp
In local, I have my statics folder in myapp level, but in hosting I must to
put it in:
misite
(fisrts misite)
try it, and tell me how has solve that problem.

Greetings

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El mié, 25 ago 2021 a las 15:09, frank galan ()
escribió:

> Hi everybody.
> I've already deployed my app in Plesk, but the process is incomplete, .
> The static files not working, I mean the app can not read them.
> I know I need put them in the right position, but I can not achieve.
> Any help is welcome
> thanks a lot 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 an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/181a730e-2157-42f6-b540-d1b1dc19c640n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/181a730e-2157-42f6-b540-d1b1dc19c640n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDAAaPdtFfu-wnAb%2BTfOeXswYOsNARkkVACbhpVju--VMg%40mail.gmail.com.


Re: connection to an existing legacy database

2021-07-21 Thread Gabriel Araya Garcia
Get the  [ODBC Driver in other site, perhaps your odbc driver are corrupted.

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El lun, 19 jul 2021 a las 19:58, sum abiut () escribió:

> I am trying to connect Django to an existing legacy database but I got
> this error message. I only get the message why I try to migrate. I follow
> the guide from the Django documentation
> <https://docs.djangoproject.com/en/3.2/howto/legacy-databases/>.
> error message:
> django.db.utils.ProgrammingError: ('42S01', "[42S01] [Microsoft][ODBC
> Driver 17 for SQL Server][SQL Server]There is already an object named
> 'Department' in the database. (2714) (SQLExecDirectW)")
>
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPCf-y68HNmO3yzkgLhhoY18Tav7U6KE-YxXRvcPOXVc1__6FA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAPCf-y68HNmO3yzkgLhhoY18Tav7U6KE-YxXRvcPOXVc1__6FA%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDCHNksKKOuhv4NpB0KVRxXRTcVD6Umrf%2BQCG%2BN0YwKBqA%40mail.gmail.com.


Re: Help me for user connection message error

2021-07-15 Thread Gabriel Araya Garcia
How? with a message. It's very simple.
It's is in authentication page that you had build.


Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El jue, 15 jul 2021 a las 14:04, Kasper Laudrup ()
escribió:

> On 15/07/2021 19.14, Théodore KOSSI wrote:
> >
> > I want to know how to transmit an error message when user try to connect
>
> That's very simple. Just make sure there's nothing the user can connect
> to, then the user will get an error message. You don't even have to
> transmit anything.
>
> If that's not what you mean, try to describe what you're trying to
> achieve a bit more in detail.
>
> Kind regards,
>
> Kasper Laudrup
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/04798171-8bd3-004d-f4c0-d0ccb0d70c84%40stacktrace.dk
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDB%3DDR9hjro4MHoFvVwj0sSHTeTM%3DSVPdGvfqxgXjS-7xg%40mail.gmail.com.


Re: Ez

2021-06-12 Thread Gabriel Araya Garcia
Gbel:
I don't understand nothing about you attempt to tell us. If you could
write in english or spanish it would be great
Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El sáb, 12 jun 2021 a las 14:50, GBELE CEDRIC EMMANUEL (<
cedric.gb...@uvci.edu.ci>) escribió:

> Se lo hé i  w lo +la,& pas 2€xz9#:,w
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CABTw%3DMXMa__AB9Kws8d6imx2tjR6jqP%3DcOph3puQ3khrpt1y6g%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CABTw%3DMXMa__AB9Kws8d6imx2tjR6jqP%3DcOph3puQ3khrpt1y6g%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDBSQAAa8oK7Zpr5LMfKFjTucEwqJ1VVJe9O42iYo5e7mQ%40mail.gmail.com.


Re: Makemigrations/migrate in existing database

2021-06-08 Thread Gabriel Araya Garcia
No. Only take sure That model structure about your tables should be the
same fields in your database

El vie., 4 jun. 2021 8:58, Ankita Sharma 
escribió:

> Hello Team
> Hope all are doing great
>
> I have a database in microsoft sql server. I created tables and views in
> it.
>
> I ran py manage.py inspetdb  > Models.py and populated my models.py file .
> I also don't want my model to alter my database. I just want it for data
> retrieval.
>
> *Should I definitely run migrate/makemigrations?*
>
> *After inspectdb should i apply makemigrations on my app or is just
> migrate enough?* And also what are the points to remember while using
> inspectdb on an existing database.
>
> Thanks 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 an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/908ff564-adca-4b64-9ec4-e347a3818efbn%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDDoUJSy8i_qCAB0bfiqEsfNv5mudGVGr04yG2vkHy9dUQ%40mail.gmail.com.


Re: Sending emails with a name over 75 characters

2021-06-07 Thread Gabriel Araya Garcia
Sebastian,.. una pregunta:
Tienes idea de como a partir de Django poder enviar un whatssap. Te
agradeceria tu ayuda.

Gabriel Araya Garcia
Santiago - Chile




El lun, 7 jun 2021 a las 11:46, Nicolás Gustavo Bruna (<
bruna.nicolasgust...@gmail.com>) escribió:

> Hello, how are you?
>
> I am having trouble sending emails because of the `sanitize_address()`
> Django function.
>
> There is a ticket who talks about this:
> https://code.djangoproject.com/ticket/31784
>
> The ticket is closed, but I am still having the same problem.
>
> The question is: How can I send emails with a name over 75 characters?
> There is a way to do it?
>
> Thank you in advance.
>
> Regards.
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/a4be65c6-53c2-497a-9293-593caec69103n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/a4be65c6-53c2-497a-9293-593caec69103n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDDWzKd4cZzGG0beHPrm%2BMNpazb_mjFJ60P1soe-PTa2Sw%40mail.gmail.com.


Re: Making a rather small web app, is Django right for it?

2021-05-25 Thread Gabriel Araya Garcia
Davin:
It will be a pleasure to collaborate for deaf and blind of the world. If
you want, tell me what can I do about your Django project.
Excuse me, but my english is not well
Regards.

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
Santiago de Chile



El mar, 25 may 2021 a las 9:11, Devin Prater ()
escribió:

> It's more of a nice-to-have for work. But yeah, it'll not be a very large
> project.
>
> Devin Prater
>
> Technical Assistant
>
>
> 256 761-3423
>
> [image: Alabama Institute for Deaf and Blind]
>
> P.O. Box 698 | 1105 Fort Lashley Ave.
>
> Talladega, AL 35161
>
> www.aidb.org
> [image: Facebook] Discover how we’re limitless.
> <https://www.facebook.com/AlabamaInstituteforDeafandBlind?ref=notif_t=fbpage_fan_invite>
>
>
>
> On Tue, May 25, 2021 at 12:54 AM Antonis Christofides <
> anto...@antonischristofides.com> wrote:
>
>> It's hard to say. While Django *is* suitable, it's also large. If you
>> don't know it already, you might not want to learn it just for this. It's
>> possible Flask would be a better choice, since it's smaller and (I think)
>> easier. (Note: I'm a Django developer, and I'm not a Flask developer.)
>>
>> So I think it's mostly a question of what you want: Why do you want to do
>> this project? Is it commercial? Is it a hobby? Is it something you do
>> because you find it appealing? If it's something like a hobby, pick up
>> whatever seems more fun to you.
>>
>> Regards,
>>
>> Antonis
>>
>> Antonis Christofides
>> +30-6979924665 (mobile)
>>
>>
>>
>> On 24/05/2021 17.37, Devin Prater wrote:
>>
>> Hi all. I am a rather new Python learner, although I've made the
>> following script:
>>
>> https://github.com/prater-devin/src/blob/main/lunch/lunch.py
>>
>> I want to turn this into a central place where students can get not just
>> the lunch menu, but also other menus, upcoming events, things like that,
>> but not much more than that. So, in order to bypass the need for submitting
>> to the App Store because this isn't that big of an app, I decided to go
>> with web development instead. Since I already know Python, enough to make
>> that simple program at least, I thought I'd just use Django to make this.
>>
>> Now, I've also tried using Beeware to make an actual app, and that seems
>> easy compared to getting started with Django, but I don't want to disregard
>> Django just because Beeware is easier. Plus Beeware doesn't seem to have
>> web app creation support yet. So, any ideas? How hard would it be to take
>> something like that simple code, probably for the backend more than
>> frontend, and enhance it, mainly adding more requests to a URL, then
>> getting text using BS4, then showing it on the app? I imagine tabs at the
>> bottom of the screen for "menus", "vending machines", and "events and
>> news." Stuff like that, then the main content in the middle, then buttons
>> at the top to change between menu sources on the menus tab and such. So,
>> not that much interaction I'd think. So, what do you all think? Thanks for
>> any help.
>>
>> Devin Prater
>>
>> Technical Assistant
>>
>>
>> 256 761-3423
>>
>> [image: Alabama Institute for Deaf and Blind]
>>
>> P.O. Box 698 | 1105 Fort Lashley Ave.
>>
>> Talladega, AL 35161
>>
>> www.aidb.org
>> [image: Facebook] Discover how we’re limitless.
>> <https://www.facebook.com/AlabamaInstituteforDeafandBlind?ref=notif_t=fbpage_fan_invite>
>>
>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAKXtajAeZPSpgZg9a38YtCksi4N7VF51DJYxWAQ1K0P3V%3D-P_A%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAKXtajAeZPSpgZg9a38YtCksi4N7VF51DJYxWAQ1K0P3V%3D-P_A%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/90a0185c-d744-826c-c1b7-d459d23d18a3%40antonischristofides.com
>> <https

Re: Dictionary not rendering in a html table in a Template

2021-05-13 Thread Gabriel Araya Garcia
The links (image, code, and   https://tmpsee.com/v/nbkdqhnxee) they are
shit. It is impossible see it. Why you don't cut and paste here in forum
page ?
Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El jue, 13 may 2021 a las 20:22, Walter Randazzo ()
escribió:

> Here is how the dictionary is render out in the template:
> https://tmpsee.com/v/nbkdqhnxee
>
> thanks
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAL7Dry7q1_WumJy1kKJROVD7xYFZ-2ie43LQMHJt0dLRQ9Lv0w%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAL7Dry7q1_WumJy1kKJROVD7xYFZ-2ie43LQMHJt0dLRQ9Lv0w%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDDqOqnGXWZcE8wZ6V%2B-Dzy1zCudBhpR406-5sJieRaefg%40mail.gmail.com.


Re: Threading videos one after the other

2021-05-09 Thread Gabriel Araya Garcia
At first, what's your name? So I know Who answering to

El dom., 9 may. 2021 11:50, Ryan Nowakowski  escribió:

> Note: I googled for "HTML video playlist"
>
> On May 9, 2021 10:41:28 AM CDT, Ryan Nowakowski 
> wrote:
>>
>> https://stackoverflow.com/a/2552131/226697
>>
>> On May 8, 2021 2:12:15 PM CDT, "מוריה יצחקי" 
>> wrote:
>>>
>>> Hi
>>> Thanks to all the helpers
>>> I got from the Python file to the HTML file a list of URLs that are
>>> inside the arraysrc variable
>>> And I want to run all the videos one after the other ends up in the same
>>> place
>>> I tried to do as in the picture I attached but it runs all the videos at
>>> once, one next to the other
>>> I would be very happy to help
>>> Thank you!!
>>> [image: for.PNG]
>>>
>>> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/E43F3BE7-2E74-4E3A-8810-8E6633EA4EB8%40fattuba.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDB7L0eKORaJs%3D4mMuAwxvmDE4DW81aJVHvJroNSPotsSg%40mail.gmail.com.


Re: Using Python Libraries in Django

2021-04-23 Thread Gabriel Araya Garcia
Felipe:
Mandame una muestra del archivo el cual usaría esta pequeña aplicación de
consulta, puede ser una tabla con los datos ya procesados (tú dices que con
pandas está sumando correctamente) ahora lo que necesitas es
la aplicación para que los demás funcionarios puedan ver los resultados
ordenados y/o graficados.
Pues bien, yo puedo construirte un aprox de esta consulta en Django, para
así darte una idea de cómo poder incorporar otras consultas.
Puede ser un excel o csv el que me envíes.

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El jue, 22 abr 2021 a las 13:19, felipe herrera ()
escribió:

> Hello! I would appreciate if someone could help me with a doubt I have
> about using Python libraries in Django. I will try to be as clear as
> possible so here it goes:
>
> In my job I work with invoices that are all saved in a specific directory
> (PDF files). In my job I am interested in only one specific value in a row
> which is a number. My job is to extract that value from all the invoices
> and sum them all. So, I made a python script  in which I use the libraries
> Pandas, os and PDFplumber and it works great. In code.png, you can see the
> loop I use to extract the row and value that I want by using PDFplumber and
> then sum all these values. In invoice.png you can see how PDFplumber
> divides the invoice in rows in columns.
>
> So, here is the thing: I want to deploy a Django App so that other people
> in the enterprise can use the python script I use ( they don't know
> anything about Python programming). So, I would want to deploy a Django app
> in which they can upload the directory with all the PDF files and then use
> the python script I show in code.png. But I'm having problems with the
> logic behind it. My questions are:
>
> 1) Can we use any python libraries in Django ( such as PDFplumber, pandas,
> etc) ?
> 2) Would I put my python script in views.py?  (Something like this)
>
>
> --- app/views.py
>
> import os
> import pdfplumber
> import pandas as pd
>
> *from* django.shortcuts *import* render
>
> *import* numpy *as* np
>
>
> *def* function(request):
>
> #Python script shown in code.png
>
> *return* render(request, 'app/response.html',{"data":data})
>
>
> Thank you beforehand!
>
>
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c8aab0fe-6d8a-4d94-a986-49a8ed4f3f32n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/c8aab0fe-6d8a-4d94-a986-49a8ed4f3f32n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDBJaK2p-950sRrV6T3iuWc3ZJosoV3U_G-XaNr-P5k2BA%40mail.gmail.com.


Re: Form.has_changed() == False and Form.changed_data empty

2021-04-11 Thread Gabriel Araya Garcia
I have checkboxes in my css grid and there is name, type=chekbox", etc. In
may view django I have captured the value of the check template with
  valor_xx = request.POST.get(str(xx))   # valor del check directamente
desde template
in POST method.
But, all of this in my view based in function.
Last night finished with this and I'd checked this running perfectly.
 You have take in mind that in template you must ask if the value check
field is chequed or not with {% if.. %}..{%else%}{%endif%}. This is sent
from context.
If you need some help,
Regards

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
Santiago de Chile



El dom, 11 abr 2021 a las 10:49, Lars Liedtke () escribió:

> Hello,
>
> I have got two checkboxes in a Form on Django 3.1, with which everything
> works fine, but unchecking them.
>
> I use a class derived from UpdateView and in its post() method I check
> for if my form has changed. This works fine for an initial empty form
> and checking form.has_changed(); after then handling the change and
> calling get() with the objects id in the Browser. I get the Form back
> with checked checkboxes. The values in the database are fine as well.
>
> So now I want to test with unchecking those checkboxes and it does not
> work. Form.has_changed() == False and Form.changed_data is empty. While
> the correct values are in Form.cleaned_data(). But my code does not
> detect these values because I check for Form.has_changed().
>
> Am I understanding something wrong here or do I have to check if there
> is a difference from the values I get in Form.cleaned_data to what my
> current state in the database is myself?
>
> I am happy to show the code. But I thought I'd ask about it in general
> before posting lots of code.
>
> ---
> punkt.de GmbH
> Lars Liedtke
> .infrastructure
>
> Kaiserallee 13a
> 76133 Karlsruhe
>
> Tel. +49 721 9109 500
> https://infrastructure.punkt.de
> i...@punkt.de
>
> AG Mannheim 108285
> Geschäftsführer: Jürgen Egeling, Daniel Lienert, Fabian Stein
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/13e0719e-8d06-e37c-b07e-1c6deb1f84e6%40punkt.de
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDDROtUwj_HR1B5OdbjASD2udkgbyy24MXKOCxzz%3DmhyCg%40mail.gmail.com.


Re: AttributeError: 'customer' object has no attribute 'is_authenticated'

2021-04-01 Thread Gabriel Araya Garcia
Why you don't explain better your problem ? When appear that

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El jue, 1 abr 2021 a las 15:43, Mahendra ()
escribió:

> I think given name is wrong Hlo do you have any idea posting form data?
>
> Mahendra Yadav
>
> On Thu, 1 Apr 2021, 22:32 Salima Begum, 
> wrote:
>
>> Hi all,
>>
>> How to solve this errors
>> ```
>> AttributeError: 'customer' object has no attribute 'is_authenticated'
>> ```
>>
>> ```
>>   AttributeError: 'customer' object has no attribute 'is_anonymous'
>> ```
>>
>> How can I solve this above errors. Help me.
>>
>> Thanks
>> ~Salima
>>
>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAMSz6bkcDZeFhhStQeTOeLAst1kNA1xa%2BuVsd0sva1JA0P8kMw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAMSz6bkcDZeFhhStQeTOeLAst1kNA1xa%2BuVsd0sva1JA0P8kMw%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAN-6G3x_vyJcBsfQ-pfN3AgK1-V_SVPSt3Fk6h%2ByLnU4iKorkg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAN-6G3x_vyJcBsfQ-pfN3AgK1-V_SVPSt3Fk6h%2ByLnU4iKorkg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDCxW%3DcKpko_oxduQkZyCO00t1tRjbJ55fBTf%3DhjZj6-3g%40mail.gmail.com.


Re: Why does my django form with recaptcha send data even empty the recaptcha?

2021-03-11 Thread Gabriel Araya Garcia
Camarada Sokov:
Your code is very difficult to understand at first sight. I did not know
about ReCaptchaField().
But, is interesting to learn something new.

Recards,

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
from Santiago de Chile



El jue, 11 mar 2021 a las 12:40, Sergei Sokov ()
escribió:

> I put the google recaptcha V2 to my django project form. It looks like
> working, but if I leave empty the recaptcha checkbox my form is sent still.
>
> forms.py
> from django import
> forms from captcha.fields
> import ReCaptchaField
> from django.forms import Textarea
> from .models import *
> class CustomerForm(forms.ModelForm):
> captcha = ReCaptchaField( public_key='key', private_key='key', )
> class Meta:
> model = Customer fields = '__all__'
> def __init__(self, *args, **kwargs):
> # get 'user' param from kwargs
> user = kwargs.pop('user', None)
> super().__init__(*args, **kwargs)
> self.fields['message'].widget = Textarea(attrs={'rows': 4})
> self.fields['i_have_read_rules'].widget.attrs['required'] = 'True'
> self.fields['i_agree'].widget.attrs['required'] = 'True'
> self.fields['captcha'].widget.attrs['required'] = 'True'
> for field in self.fields:
> self.fields[field].widget.attrs['class'] = 'form-control'
> self.fields['i_have_read_rules'].widget.attrs['class'] =
> 'form-check'
> self.fields['i_agree'].widget.attrs['class'] = 'form-check'
>
> html
> 
> {% csrf_token %}
> Выберите услугу
> {{form.choice_services}}
> {{form.name}}
> {{form.telephone_number}}
> {{form.email}}
> {{form.message}}
> {{form.contact_text}}
>  {{
> form.captcha }}
> 
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e18dcba2-07e2-44d9-ace6-744a2bb69234n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/e18dcba2-07e2-44d9-ace6-744a2bb69234n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDD_HZmL%2BUVgsFVZgQCuyuhCs3Ofe2DkOtne-ydp%2B3joyw%40mail.gmail.com.


Re: Chat Application in Django

2021-03-10 Thread Gabriel Araya Garcia
Could you give me some hosting name where I may test (free) my django
project. My database is MySql. In PythonAnywhere they accepts only one app
(already I've one) and Heroku only run with Postgresql.

Thanks,

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
from Santiago of Chile




El mié, 10 mar 2021 a las 14:15, vijay naudiyal ()
escribió:

> Hi All,
>
> I am a rookie and Django and trying to make chat application.
>
> I want users to be able to send messages to each other in real-time.
>
> I also want to create the chat rooms and provide permissions to users.
>
> What is the best way to do it ? I have gone through some packages and
> blogs on this but still not sure what is the right way to do it.
>
> Any help would be appreciated. Thanks in advance.
>
> Have a nice day.
>
> Regards
> Vijay
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CABm_SG2w-pR3f8SfxT-bjXmx54gc-%3DB%3DNLhe1FJWixmWjSEoEg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CABm_SG2w-pR3f8SfxT-bjXmx54gc-%3DB%3DNLhe1FJWixmWjSEoEg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDA_OS1n6SBrO9U6ZOLO3E-r6Xia4cC1FRW3_X9NrO5O4w%40mail.gmail.com.


Re: Add user email verification to custom user model

2021-03-09 Thread Gabriel Araya Garcia
Your ask is not clear,..What is wrong ? What is the error message? If
you need validate the email format, here is one javascript example :

function validaemail(email) {
if(email=="correo"){
var x = document.getElementById("correo").value
} else {
var x = document.getElementById("correo_apod").value
}

if(x!='') {
var expr =
/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if ( !expr.test(x) ) {
alert("Error: La dirección de correo " + x + " es incorrecta.");
document.getElementById("correo").value = "";
}
}
}

Regards,

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
Santiago of Chile




El mar, 9 mar 2021 a las 11:47, Manuel Buri ()
escribió:

> Hi, I am a bit lost while trying to add user email verification step to my
> custom user model that is based on AbstractBaseUser. Did someone do that
> already or if not how should I do it differently?
> Thank you so much!
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/aeec0130-5ef5-48f6-bb37-61d8ebeafd6fn%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/aeec0130-5ef5-48f6-bb37-61d8ebeafd6fn%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDASwaPPf%3DK4kW7bDAV9yVke7Xh8E_Hr_3_A75gJYjSPnQ%40mail.gmail.com.


Re: A very easy problem that I couldn't figure it out! PLEASE HELP^^

2021-03-05 Thread Gabriel Araya Garcia
Kasper is right, we need more clear.
But anyway, here is one example. In settings.py:

from pathlib import Path
import os

ROOT_URLCONF = 'sclub.urls'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': ['sclub/appsclub/templates'],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]

sclub is my project and appsclub is my App





Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El vie, 5 mar 2021 a las 11:16, NB DEV () escribió:

>
> Environment:
>
>
> Request Method: GET
> Request URL: http://127.0.0.1:8000/
>
> Django Version: 3.1.7
> Python Version: 3.9.1
> Installed Applications:
> ['django.contrib.admin',
>  'django.contrib.auth',
>  'django.contrib.contenttypes',
>  'django.contrib.sessions',
>  'django.contrib.messages',
>  'django.contrib.staticfiles',
>  'pages.apps.PagesConfig']
> Installed Middleware:
> ['django.middleware.security.SecurityMiddleware',
>  'django.contrib.sessions.middleware.SessionMiddleware',
>  'django.middleware.common.CommonMiddleware',
>  'django.middleware.csrf.CsrfViewMiddleware',
>  'django.contrib.auth.middleware.AuthenticationMiddleware',
>  'django.contrib.messages.middleware.MessageMiddleware',
>  'django.middleware.clickjacking.XFrameOptionsMiddleware']
>
> Template loader postmortem
> Django tried loading these templates, in this order:
>
> Using engine django:
> * django.template.loaders.filesystem.Loader:
> C:\Users\napil\Desktop\dev\btre_project\templates\pages\index.html (Source
> does not exist)
> * django.template.loaders.app_directories.Loader:
> C:\Users\napil\Desktop\dev\btre_project\venv\lib\site-packages\django\contrib\admin\templates\pages\index.html
> (Source does not exist)
> * django.template.loaders.app_directories.Loader:
> C:\Users\napil\Desktop\dev\btre_project\venv\lib\site-packages\django\contrib\auth\templates\pages\index.html
> (Source does not exist)
>
>
>
> Traceback (most recent call last):
>   File
> "C:\Users\napil\Desktop\dev\btre_project\venv\lib\site-packages\django\core\handlers\exception.py",
> line 47, in inner
> response = get_response(request)
>   File
> "C:\Users\napil\Desktop\dev\btre_project\venv\lib\site-packages\django\core\handlers\base.py",
> line 181, in _get_response
> response = wrapped_callback(request, *callback_args, **callback_kwargs)
>   File "C:\Users\napil\Desktop\dev\btre_project\pages\views.py", line 6,
> in index
> return render(request, 'pages/index.html')
>   File
> "C:\Users\napil\Desktop\dev\btre_project\venv\lib\site-packages\django\shortcuts.py",
> line 19, in render
> content = loader.render_to_string(template_name, context, request,
> using=using)
>   File
> "C:\Users\napil\Desktop\dev\btre_project\venv\lib\site-packages\django\template\loader.py",
> line 61, in render_to_string
> template = get_template(template_name, using=using)
>   File
> "C:\Users\napil\Desktop\dev\btre_project\venv\lib\site-packages\django\template\loader.py",
> line 19, in get_template
> raise TemplateDoesNotExist(template_name, chain=chain)
>
> Exception Type: TemplateDoesNotExist at /
> Exception Value: pages/index.html
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/9f6202d4-5ab8-4c58-a7c6-1d55a9d2fb7an%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/9f6202d4-5ab8-4c58-a7c6-1d55a9d2fb7an%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDBqY555Y4sUxTXnVQp5SibfPbjrLb0acr35HMkwozxwEw%40mail.gmail.com.


Re: Create a custom User model and Authenticate with it

2021-03-03 Thread Gabriel Araya Garcia
Davansh:
The tables are made already in Admin Django, you only have to build
template (html), and the view. For example, in views.py:

def login_ini(request):
variable1 = 'Pantalla de Acceso al Sistema'
error_log = 'ok'
username = request.POST.get('username')
password = request.POST.get('password') # valor del template
user = auth.authenticate(username=username, password=password)
if request.method == "POST":
if user is not None and user.is_active:
#Correct password, and the user is marked "active"
auth.login(request, user)
request.session['username_x'] = username # variable gobal
request.session['id_x'] = user.id   # variable gobal
return HttpResponseRedirect("principal")
error_log = "error"

context = {'user':user,"variable1":variable1,"error_log":error_log,}

return render(request,'login_ini.html',context)


def log_out(request):
logout(request)
return redirect('login_ini')

Where login_ini.html, is the authentication template.

Only you must to build authentication template


Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El mié, 3 mar 2021 a las 13:54, Devansh Soni ()
escribió:

> Hi,
>
> I'm currently working on a Django project in which I have to create a User
> model with fields such as username, email, college, branch, semester,
> password, etc. And use this model to authenticate a user with an email and
> password.
>
> How can I achieve this? Or what are the ways to achieve this?
>
> Thank you
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/fc2401f3-c80d-4b03-8b02-e62c90645ee8n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/fc2401f3-c80d-4b03-8b02-e62c90645ee8n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDCiWju%3D9B29mJaDkr5e94yXbBdtZx0B2G01nptiqQjKrA%40mail.gmail.com.


Re: i have aproblem with my code

2021-02-03 Thread Gabriel Araya Garcia
Agni:
No, no, the information is not enough. Could you give us exactly which is
your problem? you say that it is in a web environment, but what happens in
your local host ?

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El mié, 3 feb 2021 a las 15:41, Agni Venus ()
escribió:

> data donot save anything when i input it from the website page.
> my views.py code
> from django.shortcuts import render
> from django.core.files.storage import FileSystemStorage
> from .models import profile
>
> def home(request):
> up=profile.objects.all()
>
> return render(request, 'home.html' ,{ 'up':up })
>
>
> def normalupload(request):
> if request.method == 'POST' and request.FILES['myfile']:
> myfile = request.FILES['myfile']
> fs = FileSystemStorage()
> filename = fs.save(myfile.name, myfile)
> url = fs.url(filename)
> new_profile = profile(
> name=request.POST['name'],
> age=request.POST['age'],
> image=url
> )
> new_profile.save()
> redirect('home/')
> else:
> return redirect('home/')
>
>
> models.py page
> from django.db import models
>
> # Create your models here.
>
> class profile(models.Model):
> name= models.CharField(max_length=30)
> age=models.IntegerField()
> image = models.URLField()
>
> my html page is :
> Home
> Working good.
> 
> 
> {% for x in up %}
> 
> {{x.name}}
> 
> {% endfor %}
> 
>
> 
> 
> 
>  {% csrf_token
> %}
> 
> 
> 
> 
>
>
>
> 
>
>
>
> my urls.py page
>
> from django.contrib import admin
> from django.urls import path
> from . import views
> from django.conf import settings
> from django.conf.urls.static import static
> urlpatterns = [
> path('', views.home),
> path('home/', views.home),
> path('normalupload/', views.normalupload, name="normalupload"),
> ]
>
> 2nd one
>
> from django.contrib import admin
> from django.urls import path
> from upload.views import home
> from django.conf import settings
> from django.conf.urls.static import static
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('', home),
> ]
>
> if settings.DEBUG:
> urlpatterns += static(settings.MEDIA_URL,
> document_root=settings.MEDIA_ROOT)
>
> from django.contrib import admin
> from django.urls import path
> from upload.views import home
> from django.conf import settings
> from django.conf.urls.static import static
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('', home),
> ]
>
> if settings.DEBUG:
> urlpatterns += static(settings.MEDIA_URL,
> document_root=settings.MEDIA_ROOT)
> from django.contrib import admin
> from django.urls import path
> from upload.views import home
> from django.conf import settings
> from django.conf.urls.static import static
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('', home),
> ]
>
> if settings.DEBUG:
> urlpatterns += static(settings.MEDIA_URL,
> document_root=settings.MEDIA_ROOT)
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/244dc11f-b877-4198-b994-4a39b809ed75n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/244dc11f-b877-4198-b994-4a39b809ed75n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDB4SvrSdP4AeJQxrxU6fq4egMPipo-KHJmFrb%3DbHS_VUw%40mail.gmail.com.


Re: Static Folder not loading

2021-02-02 Thread Gabriel Araya Garcia
You are not saying if you trying it in local host or web server, because
the statics folder is in different location (I have some program in
PythonAnywhere).
Send your answer to gabrielaraya2...@gmail.com and I will give you the
respective configurations that I have in SETTINGS.PY
Regards.

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El jue, 28 ene 2021 a las 15:17, hari49pf () escribió:

> Hi,
>
> I am trying to load static file to my project its not loading,
> I have changed the path of static in settting.py still its not loading
> static file.
> tryed to check the file is loading by using
> *manage.py findstatic test.css*
> PLZ help
>
>
> Regards,
> Harish.B
>
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/126cf6ff-27f7-4c1b-af5e-17b619b311cfn%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/126cf6ff-27f7-4c1b-af5e-17b619b311cfn%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDD-VX54sZHaYaf3VfDh1dB_J0bf%3DL1CwZfSUn2owihhDg%40mail.gmail.com.


Re: Conectarme a un AS/400 desde Django

2021-01-28 Thread Gabriel Araya Garcia
Tal vez el conector esta pifiado. Intenta bajarlo desde otro sitio. Revisa 
este link:
https://www.programcreek.com/python/example/113615/ibm_db_dbi.connect

El miércoles, 27 de enero de 2021 a las 14:20:57 UTC-3, lugo...@gmail.com 
escribió:

> Buenos días, soy nuevo en Django y no he podido conectarme a un archivo 
> que tengo dentro de un AS/400. La Librería se llama: RORIVENTAA y el 
> archivo se llama: IVARET por favor si me pueden dar una mano, muchas 
> gracias de antemano.
>
>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d762fab5-769b-46f1-8c80-03f87d9ee096n%40googlegroups.com.


Re: How to intergrate openpyxl with django and using the excel sheet as the database to query data

2021-01-26 Thread Gabriel Araya Garcia
In top of views files (views.py) you must put:
import openpyxl
from openpyxl import Workbook
from openpyxl.styles import Alignment,Border,Font,PatternFill,Side
from openpyxl.styles import colors
from openpyxl.styles import Font, Color,Fill
from openpyxl.styles.borders import BORDER_THIN
from openpyxl.drawing.image import Image as XLIMG

...and the view which prepare the excel out, you should review this example:

# CARTOLA DE RECAUDACION en excel
@login_required(login_url='login_ini')
def acsv(request):
nom_arch = nombrearch() # Se forma string para nombre de archivo excel
string_nombre = 'pac'+nom_arch
query = Pauta_aux.objects.all().order_by('rut') # viene filtrada x rango de 
fecha

reg_x = 0
if query:
for fech_x in query:
reg_x = reg_x + 1
else:
# estas dos instrucciones van juntas siempre
messages.error(request, "No existen movimientos que mostrar !!")
return redirect("info")

mes_x = fechapautas.strftime('%m') 
ano_x = fechapautas.strftime('%Y') 
fecha_ini = str(ano_x)+"-"+str(mes_x).zfill(2)+"-01 00:00:00"
#total dias del mes
totdias = calendar.monthrange(int(ano_x),int(mes_x))[1] 
fecha_fin = str(ano_x)+"-"+str(mes_x).zfill(2)+"-"+str(totdias)+" 00:00:00"
wb = Workbook()
ws = wb.create_sheet("hoja1",0)
ws.column_dimensions['A'].width = 5
ws.column_dimensions['B'].width = 12 # rut paciente
ws.column_dimensions['C'].width = 36 # nombre paciente
ws.column_dimensions['D'].width = 17 # fecha
ws.column_dimensions['E'].width = 11 # rut cuid.
ws.column_dimensions['F'].width = 23 # nombre cuidador
ws.column_dimensions['G'].width = 12 # tipo cuidador
ws.column_dimensions['H'].width = 11 # rut cuid.
ws.column_dimensions['I'].width = 23 # nombre cuidador
ws.column_dimensions['J'].width = 12 # tipo cuidador
ws.column_dimensions['K'].width = 11 # rut cuid.
ws.column_dimensions['L'].width = 23 # nombre cuidador
ws.column_dimensions['M'].width = 12 # tipo cuidador

ws.column_dimensions['Q'].width = 12 # rut cuid.
ws.column_dimensions['R'].width = 14# nombre cuidador
ws.column_dimensions['S'].width = 12 # tipo cuidador
ws.column_dimensions['T'].width = 14 # tipo cuidador

r=4 # posicion de la primera fila
ws.cell(row=r-3,column=2).value = "CARTOLA DE RECAUDACION"
ws.cell(row=r-3,column=7).value = "1=Contratado"
ws.cell(row=r-2,column=7).value = "2=Extra"

ws.cell(row=r-3,column=20).value = "1=Normal"
ws.cell(row=r-2,column=20).value = "2=Domingo"
ws.cell(row=r-1,column=20).value = "3=Festivo"

ws.cell(row=r,column=2).value = "Rut paciente"
ws.cell(row=r,column=3).value = "Paciente"
ws.cell(row=r,column=4).value = "Fecha pauta"

ws.cell(row=r,column=5).value = "Rut turno 1"
ws.cell(row=r,column=6).value = "Cuidador t1"
ws.cell(row=r,column=7).value = "Tipo Cuid t1"

ws.cell(row=r,column=8).value = "Rut turno 2"
ws.cell(row=r,column=9).value = "Cuidador t2"
ws.cell(row=r,column=10).value = "Tipo Cuid t2"

ws.cell(row=r,column=11).value = "Rut turno 3"
ws.cell(row=r,column=12).value = "Cuidador t3"
ws.cell(row=r,column=13).value = "Tipo Cuid t3"

ws.cell(row=r,column=14).value = "$ turno 1"
ws.cell(row=r,column=15).value = "$ turno 2"
ws.cell(row=r,column=16).value = "$ turno 3"

ws.cell(row=r,column=17).value = "$ paciente t1"
ws.cell(row=r,column=18).value = "$ paciente t2"
ws.cell(row=r,column=19).value = "$ paciente t3"

ws.cell(row=r,column=20).value = "recargo"
ws.cell(row=r,column=21).value = "Tot.turnos"
cell_range = ws['B1':'T4']
#cell_range.bold = True

tot1=0 # valores de cuidador
tot2=0
tot3=0
tot_pac1 = 0 # valores de paciente (o lo que pagael apoderado)
tot_pac2 = 0 # valores de paciente (o lo que pagael apoderado)
tot_pac3 = 0 # valores de paciente (o lo que pagael apoderado)
va1=0
va2=0
va3=0

tRecauda = 0
subtot = 0
rut_x = ''
r=r+1
for q in query: # pauta_aux - dia a dia
if q.rut != rut_x:
ws.cell(row=r,column=20).value = "Subtotal:" 
ws.cell(row=r,column=21).value = subtot

r=r+1
ws.cell(row=r,column=20).value = "Tot.Anticipo:"
totAnticipo = anticipos(rut_x,fecha_ini,fecha_fin)

ws.cell(row=r,column=21).value = totAnticipo

r=r+1
ws.cell(row=r,column=20).value = "Recauda:"
ws.cell(row=r,column=21).value = subtot - totAnticipo

tRecauda = 0
subtot = 0

va1=0
va2=0
va3=0

rut_x = q.rut # paciente
r=r+2

ws.cell(row=r,column=2).value = q.rut 
ws.cell(row=r,column=3).value = q.paciente 
ws.cell(row=r,column=4).value = q.fecha   # fecha de la pauta 

ws.cell(row=r,column=5).value = q.rut_t1   # rut cuidador
ws.cell(row=r,column=6).value = q.turno1 # nombre cuidador
ws.cell(row=r,column=7).value = q.tipo_turno1 # Contratado - Extra

ws.cell(row=r,column=8).value = q.rut_t2   # rut cuidador
ws.cell(row=r,column=9).value = q.turno2 # nombre cuidador
ws.cell(row=r,column=10).value = q.tipo_turno2 # Contratado - Extra

ws.cell(row=r,column=11).value = q.rut_t3   # rut cuidador
ws.cell(row=r,column=12).value = q.turno3   # nombre cuidador
ws.cell(row=r,column=13).value = q.tipo_turno3 # Contratado - Extra

ws.cell(row=r,column=14).value = q.valor_t1 # valor cuidador1
ws.cell(row=r,column=15).value = 

Re: How to set daily update limit for django model(db)?

2021-01-22 Thread Gabriel Araya Garcia
Hi Sahilesh:
Try with this:
https://www.kite.com/python/answers/how-to-count-the-number-of-rows-in-a-pandas-dataframe-in-python

El viernes, 22 de enero de 2021 a las 14:39:35 UTC-3, shailesh...@gmail.com 
escribió:

> Thanks! but Can you elaborate more? 
> *howmany = mytable.count()* = Here How it'll work and how to reset the 
> value in 1 day. how I can use it in my code.
>
>
> import xlrd   = 
>
> I was trying something like this
> def CTA_upload(request):
> i = 1
> count = (1,)
> print('Counter value at starting :', len(count))
> allcta = CTA.objecta.all()
> allcta7 = len(tuple(allcta)) // 2
> print('Tuple Check:', allcta7)
>
> try:
> if request.method == 'POST':
> movie_resource = CTAResource()
> ##we will get data in movie_resources
> dataset = Dataset()
> new_movie = request.FILES['file']
> if not new_movie.name.endswith('xls'):
> messages.info(request, 'Sorry Wrong File Format.Please Upload valid 
> format')
> return render(request, 'apple/uploadcts.html')
> messages.info(request, 'Processing...')
>
> imported_data = dataset.load(new_movie.read(), format='xls')
> for data in imported_data:
> value = CTA(
> data[0],
> data[1],
> data[2],
> data[3],
> data[4],
> data[5],
> data[6],
> data[7],
> data[8],
> )
> if len(count) <= allcta7:
> value.save()
> i+= 1
> count = append(i)
> else:
> messages.info(request, 'Sorry You have uploaded more data than specified 
> limit...')
> count.clear()
>
> except:
> messages.info(request,'Same Email ID has been observed more than 
> once.Except that other records has been added../nPlease Make sure Email 
> field should be unique.')
> print("Problem hai kuch to")
>
> return render(request,'app/uploadcts.html')
>
> On Friday, January 22, 2021 at 10:45:54 PM UTC+5:30 gabriela...@gmail.com 
> wrote:
>
>> Previous, you can use:
>> howmany = mytable.count()
>>
>> Also you can use xlrd library, for instance:
>> import xlrd
>>  
>> #open excel file
>> documento = xlrd.open_workbook("ejemplo.xls")
>>  
>> #We can save each one of the spreadsheet separately
>> libros = documento.sheet_by_index(0)
>> peliculas = documento.sheet_by_index(1)
>>   
>> On the other hand, the model has not contains records, it's only an 
>> structure definition of a table
>>
>>
>> Gabriel Araya Garcia
>> GMI - Desarrollo de Sistemas Informáticos
>>
>>
>>
>>
>> El vie, 22 ene 2021 a las 12:58, Shailesh Yadav () 
>> escribió:
>>
>>> Hi I'm having one Django web app where My *model A *contains 1000 
>>> records and I want to set a daily update limit for example if users are 
>>> updating that data by uploading a .xls file then it should count how many 
>>> records updated and once it is more than 500 then the user should get an 
>>> Error message.
>>>
>>> Can Anyone help me how to implement this (Is there a SQLite parameter 
>>> where so that I can define value in settings.py)
>>>
>>> below is my upload code. (Here I have tried to store the count value and 
>>> comparing it with half of the record but again how to reset it after 12 
>>> hrs?)
>>>
>>>
>>> def CTA_upload(request):
>>> try:
>>> if request.method == 'POST':
>>> movie_resource = CTAResource()
>>> ##we will get data in movie_resources
>>> dataset = Dataset()
>>> new_movie = request.FILES['file']
>>> if not new_movie.name.endswith('xls'):
>>> messages.info(request, 'Sorry Wrong File Format.Please Upload valid 
>>> format')
>>> return render(request, 'apple/uploadinfosys.html')
>>> messages.info(request, 'Uploading Data Line by Line...')
>>> imported_data = dataset.load(new_movie.read(), format='xls')
>>> count = 1
>>> for data in imported_data:
>>> value = CTA(
>>> data[0],
>>> data[1],
>>> data[2],
>>> data[3],
>>> data[4],
>>> data[5],
>>> data[6],
>>> data[7],
>>> data[8],
>>> )
>>> count = count + 1
>>> value.save()
>>> # messages.info(request, count)
>>> # time.sleep(1)
>>> messages.info(request, 'File Uploaded Successfully...')
>>>
>>> except:
>>> messages.info(request,
>>> 'Same Email ID has been observed more than once.Except that other 
>>> records has been added../nPlease Make sure Email field should be unique.')
>>>
>>> return render(request, 'apple/cta.html')
>>>
>>> -- 
>>> Y

Re: How to set daily update limit for django model(db)?

2021-01-22 Thread Gabriel Araya Garcia
Previous, you can use:
howmany = mytable.count()

Also you can use xlrd library, for instance:
import xlrd

#open excel file
documento = xlrd.open_workbook("ejemplo.xls")

#We can save each one of the spreadsheet separately
libros = documento.sheet_by_index(0)
peliculas = documento.sheet_by_index(1)

On the other hand, the model has not contains records, it's only an
structure definition of a table


Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El vie, 22 ene 2021 a las 12:58, Shailesh Yadav (<
shaileshyadav7...@gmail.com>) escribió:

> Hi I'm having one Django web app where My *model A *contains 1000 records
> and I want to set a daily update limit for example if users are updating
> that data by uploading a .xls file then it should count how many records
> updated and once it is more than 500 then the user should get an Error
> message.
>
> Can Anyone help me how to implement this (Is there a SQLite parameter
> where so that I can define value in settings.py)
>
> below is my upload code. (Here I have tried to store the count value and
> comparing it with half of the record but again how to reset it after 12
> hrs?)
>
>
> def CTA_upload(request):
> try:
> if request.method == 'POST':
> movie_resource = CTAResource()
> ##we will get data in movie_resources
> dataset = Dataset()
> new_movie = request.FILES['file']
> if not new_movie.name.endswith('xls'):
> messages.info(request, 'Sorry Wrong File Format.Please Upload valid
> format')
> return render(request, 'apple/uploadinfosys.html')
> messages.info(request, 'Uploading Data Line by Line...')
> imported_data = dataset.load(new_movie.read(), format='xls')
> count = 1
> for data in imported_data:
> value = CTA(
> data[0],
> data[1],
> data[2],
> data[3],
> data[4],
> data[5],
> data[6],
> data[7],
> data[8],
> )
> count = count + 1
> value.save()
> # messages.info(request, count)
> # time.sleep(1)
> messages.info(request, 'File Uploaded Successfully...')
>
> except:
> messages.info(request,
> 'Same Email ID has been observed more than once.Except that other records
> has been added../nPlease Make sure Email field should be unique.')
>
> return render(request, 'apple/cta.html')
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/95a6c5e9-ad98-4036-bcbb-109562a7df06n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/95a6c5e9-ad98-4036-bcbb-109562a7df06n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDAh8Bs383m3mLNNc13GGQU6hoOyeV4OypgPf2aZsaM_eQ%40mail.gmail.com.


Re: hello guys, help me please, I could not associate username to a post

2020-12-15 Thread Gabriel Araya Garcia
I don't undertand that you say. Can you explain with more details?

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El mar, 15 dic 2020 a las 15:25, Chelsea Fan ()
escribió:

> [image: image.png]
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJwZnddXepqo9Ea73GPZYTt4CK9V5tz5V8sS1xU-WVqeYg8qMQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAJwZnddXepqo9Ea73GPZYTt4CK9V5tz5V8sS1xU-WVqeYg8qMQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDBqDmgCsjyPQ97H6xW5bHi-A5WEJX2ibFDO_Eer5z8p%2Bw%40mail.gmail.com.


Re: Debbuging

2020-11-16 Thread Gabriel Araya Garcia
Did you make the migrations ? ,...and What is database are you using ?

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El lun., 16 nov. 2020 a las 0:23, Luciano Martins ()
escribió:

> please post your repository
>
> Em domingo, 15 de novembro de 2020 às 19:42:30 UTC-3, sidymo...@gmail.com
> escreveu:
>
>> OperationalError at /admin/products/products/add/no such table:
>> main.auth_user__old
>> Can u help me plz?
>>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/dd6ab047-cba7-4c13-9954-dec0c755ec0bn%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/dd6ab047-cba7-4c13-9954-dec0c755ec0bn%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDD%3DtoDNRxpy%3DOh28uE33iF6QPf39dNxNoaWL_vx6zCKxg%40mail.gmail.com.


Re: Regarding OTP based login- Django

2020-10-09 Thread Gabriel Araya Garcia
Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos


ja,ja,ja,...gracias Carlos

El mar., 29 sept. 2020 a las 17:18, carlos ()
escribió:

> Gabriel
> one-time password
>
> On Tue, Sep 29, 2020 at 12:34 PM Gabriel Araya Garcia <
> gabrielaraya2...@gmail.com> wrote:
>
>> Que es eso de OTP?,...que significan esas siglas ?
>>
>> Gabriel Araya Garcia
>> GMI - Desarrollo de Sistemas Informáticos
>>
>>
>>
>>
>> El vie., 25 sept. 2020 a las 10:55, Rahul Gour ()
>> escribió:
>>
>>> Hello,
>>>
>>> TIA.
>>>
>>> I am new in django, can anyone help me for OTP based login in my app.
>>>
>>> I am working on a ecommerce app and want to login otp based login and
>>> dont know or getting much on google that how to integrate phone number with
>>> django user model or want to use custom user model.
>>>
>>>
>>> Regards,
>>> Rahul Gour
>>>
>>> --
>>> 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.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAFi6BNX1qfhDF1zqY7xt4aD%2B7F7mgNXmApxZ%2BquigQYxSgsinw%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAFi6BNX1qfhDF1zqY7xt4aD%2B7F7mgNXmApxZ%2BquigQYxSgsinw%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAKVvSDCPEc%2BWqDD4Yk2o9_o9_F9uFT_8TpmheiVMJ_3O%3DTNuPw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAKVvSDCPEc%2BWqDD4Yk2o9_o9_F9uFT_8TpmheiVMJ_3O%3DTNuPw%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
>
>
> --
> att.
> Carlos Rocha
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAM-7rO3eAK1gOAm5KFOxG9F%3DXxgBt9kmW5zd0DVTNzxXV4PjSg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAM-7rO3eAK1gOAm5KFOxG9F%3DXxgBt9kmW5zd0DVTNzxXV4PjSg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDBk%3DP%2BKPEQeoDxMVK0YTdmy7AxbjosSDZue9PoiiFcipA%40mail.gmail.com.


Re: Regarding OTP based login- Django

2020-09-29 Thread Gabriel Araya Garcia
Que es eso de OTP?,...que significan esas siglas ?

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El vie., 25 sept. 2020 a las 10:55, Rahul Gour ()
escribió:

> Hello,
>
> TIA.
>
> I am new in django, can anyone help me for OTP based login in my app.
>
> I am working on a ecommerce app and want to login otp based login and dont
> know or getting much on google that how to integrate phone number with
> django user model or want to use custom user model.
>
>
> Regards,
> Rahul Gour
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAFi6BNX1qfhDF1zqY7xt4aD%2B7F7mgNXmApxZ%2BquigQYxSgsinw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAFi6BNX1qfhDF1zqY7xt4aD%2B7F7mgNXmApxZ%2BquigQYxSgsinw%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDCPEc%2BWqDD4Yk2o9_o9_F9uFT_8TpmheiVMJ_3O%3DTNuPw%40mail.gmail.com.


Re: Inline Formset

2020-09-20 Thread Gabriel Araya Garcia
I believe that there is not other way to do this with AJAX. This is
an asynchronous call to database server. This not refresh your html
bye

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El vie., 18 sept. 2020 a las 1:49, Emmanuel Oppong Ntiamoah (<
ladamo...@gmail.com>) escribió:

> Good day friends, Please i have a small challenge, I have an inline
> formset in my admin where users can add more products to a store. The user
> can also add a product if It doesn’t already exist. The problem is when the
> user adds a new product and wants to add more product fields to the Store
> model the product the user added doesn’t show in the dropdown of the new
> field unless i refresh the whole interface.  Please any way to fix this.
> Thanks
>
> From Ntiamoah
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/8F6B832D-E616-4330-B7FE-EA3E9C4A6CF6%40gmail.com
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDCZzwFzhb99_QQUYHd_gQk1V3kDM%3D1QRMgeTYB52Hb5Hg%40mail.gmail.com.


Re: Members rating system in DJango applications

2020-09-20 Thread Gabriel Araya Garcia
You could try it with pandas (pandas works with python)

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El dom., 20 sept. 2020 a las 23:27, Ram ()
escribió:

> Hi,
> We are planning to implement members rating system in our web application
> for Classifieds Ad transaction that each member does. Is there any an
> existing project or feature available by default in DJango FWK?
>
> I appreciate for suitable pointers and suggestions here.
>
> Best regards,
> ~Ram
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2BOi5F0E3uTzk7_6S1kXq3gHpEHo1Dmpx_koFnzAQ6%3D%3DSmr0Cw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CA%2BOi5F0E3uTzk7_6S1kXq3gHpEHo1Dmpx_koFnzAQ6%3D%3DSmr0Cw%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDDnYhUA5U1zG9%2B2ChP8DKjqVSCd-xjDYvO_Zi0KDp6gmA%40mail.gmail.com.


Re: Django and Pandas

2020-09-10 Thread Gabriel Araya Garcia
Jajaja,...es muy simple. Debes hacer lo que la mayoría de nosotros hacemos,
seguir los foros, mira que hay decenas de ellos. No pretenderas que te
hagamos la tarea

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El jue., 10 sept. 2020 a las 12:21, Emmanuel Oppong Ntiamoah (<
ladamo...@gmail.com>) escribió:

>
>
> Hello family, please i want to know can i use pandas to generate report on
> django, if so how?
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/B42ABA36-23B5-4504-B960-B8B54D9B2C6C%40gmail.com
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDCoN1pAAppAFr8n878Gm%3DZCci%2B_WMr-VxHBfWTRABRkzQ%40mail.gmail.com.


Re: Ransomeware

2020-09-05 Thread Gabriel Araya Garcia
You are an unethical person if you are thinking of doing that
the world is more rotten with people like you.

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El sáb., 5 sept. 2020 a las 13:33, Mustafa Mahmoud ()
escribió:

> Who know how Much Ransomeware sell it I can make it and i will sell it
> enyone know I can sell it and how much
>
> On Sat, Sep 5, 2020, 6:50 PM Yogendra Yadav 
> wrote:
>
>> Please suggest open source projects to learn subject combination
>>
>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/4af9efdc-1b3a-4170-93e3-403cc2b2e241n%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/4af9efdc-1b3a-4170-93e3-403cc2b2e241n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAO-epS_G8Nf%2Ba%2BfsJ%2BV-rQYymn8LqJqzi0PSabqopePa4y0S3A%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAO-epS_G8Nf%2Ba%2BfsJ%2BV-rQYymn8LqJqzi0PSabqopePa4y0S3A%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDCit5bS%3DAU%3DTdCJV5X2jnUzs-BS7TDebnYyxmRE7%3D0BLQ%40mail.gmail.com.


Re: HOW TO REDIRECT DIFFERENT CATEGORY OF USERS THROUGH LOGIN REDIRECT (two login redirects instead of one)

2020-07-11 Thread Gabriel Araya Garcia
Kuntal:
I have resolved that issue, but we can make interchange of information:
I need the Ajax code where I can evaluate in onblur text html if one
patient is found or not. The field key in the text box is RUT (each person
have one in my country)
for example, my rut is 7841349-2, and it's only, no other person have it.
In other words, I need evaluate the information text when the user get out
of this field (text box).
It doesn't help me evaluate it in submit buttom.
I need the following things:
-The template with with two fields, rut and name
-The AJAX code
-The DJANGO VIEW, where it do the seek patient
If you send this information I will send you one bit WORD file with images
how can controller the users permissions

We can help each other to achieve our respective goals






Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
99.7721.15.70



El sáb., 11 jul. 2020 a las 13:22, Kuntal Paul ()
escribió:

> Thank you for your response. I did this way and it was giving me a 405
> error. I couldn't find my mistake. I was saving both of them as student and
> as teacher separately from auth.user.
>  Also, do I have to provide a separate temple for that view?
>
>
> On Sat, Jul 11, 2020, 10:41 PM oba stephen  wrote:
>
>> You can consider redirecting to a URL that handles the request.
>>
>> That is a View function that checks if the user is a student or teacher,
>> then renders the respective profiles.
>>
>> Regards
>>
>> On Sat, Jul 11, 2020 at 5:58 PM Kuntal Paul  wrote:
>>
>>> The *LOGIN_REDIRECT_URL*  only allowing to redirect to a particular
>>> profile page. But in scenarios like where there are *students* and
>>> *teachers*, both of them need their specific profile page after login.
>>>
>>> Using* LOGIN_REDIRECT_URL*, both the teachers and the students are
>>> getting redirected to the same profile ( in my case, both of them either
>>> entirely to teachers profile or entirely to students profile).
>>>
>>> How can I set *two login redirects instead of one*? I searched in the
>>> documentation, online videos, and everything but couldn't find such. Please
>>> help me with resources/codes/guide/etc from where I can learn from and
>>> implement. I'm pretty new to this and have tried whatever I know till now.
>>>
>>> Thank You.
>>>
>>> --
>>> 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.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/e185b4ba-2219-4a1b-bba2-8ef4e4466682o%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/e185b4ba-2219-4a1b-bba2-8ef4e4466682o%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAAJsLnqfSPy0VEjpv9TrPS-qcFTWjrtQqhFMMQs8B6qqUX5XOw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAAJsLnqfSPy0VEjpv9TrPS-qcFTWjrtQqhFMMQs8B6qqUX5XOw%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CABD8006ftC%3DtPyk%2BFWikZ0mGLGpiNBnFicU6eq2cL-mRcO-LbA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CABD8006ftC%3DtPyk%2BFWikZ0mGLGpiNBnFicU6eq2cL-mRcO-LbA%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDC2MzBCQYiSs7CSbEYxj1LD28cMFDqF5HWVZz89TtBkGw%40mail.gmail.com.


Re: REUTILISER UN CITE DJANGO

2020-07-05 Thread Gabriel Araya Garcia
Je ne comprends pas ce que tu dis. Pourquoi n'utilisez-vous pas l'anglais

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
99.7721.15.70



El dom., 5 jul. 2020 a las 18:36, FLAVIEN HERI ()
escribió:

> je pense tu peux reutiliser tout en activant ton environement
>
> On 7/5/20, C L A S S E 1  wrote:
> > *BONJOUR A TOUTES   A TOUS*
> >
> > *si je décharge  un site(une application django)   est ce que je peut l
> > utiliser sur mon environnement de développement  qui lui contient déjà
> > porte un site  qui existe déjà. ou je dois créer  un environnement
> appart.
> >
> > si possible comment   merci*
> >
> > --
> > 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.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/django-users/a1e9d327-0220-4fce-85e7-dcbb6380c281o%40googlegroups.com
> .
> >
>
>
> --
> FLAVIEN HERI
>
> *Information management AscociateUNHCR-Kinshasa*
> Tél:+243978587009
> Skype: flavien.heri1
> Facebook: flavien semi
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAG3GEnxou7hK33brNQxakq6JdViFh53-D%2Bi5Rkp9sCzcHHWAaw%40mail.gmail.com
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDDRwn7axmOy0kZ_fWbZrPJw8SHWasetfF3JvOMWWeKbQw%40mail.gmail.com.


Re: how to give permission to a logged in specific user in a list of users profile

2020-07-05 Thread Gabriel Araya Garcia
I also, I have build one program with health environment, and the user
controlls is following manner:

def login_ini(request):
variable1 = 'Pantalla de Acceso al Sistema'
error_log = 'ok'
username = request.POST.get('username')
password = request.POST.get('password') # valor del template
user = auth.authenticate(username=username, password=password)
if request.method == "POST":
if user is not None and user.is_active:
# Correct password, and the user is marked "active"
auth.login(request, user)
request.session['username_x'] = username # variable gobal
request.session['id_x'] = user.id # variable gobal
#return HttpResponse(str(user.id))
return HttpResponseRedirect("principal")

error_log = "error"

context ={"variable1":variable1,"error_log":error_log,}
return render(request,"login_ini.html",context)
context ={
'user':user,
"variable1":variable1,
"error_log":error_log,
}
return render(request,'login_ini.html',context)


def log_out(request):
id_x = request.session.get('id_x')
log_out_x  = datetime.now()
cursor = connection.cursor()
cursor.execute(
"update auth_user set log_out=%s where id=%s",[log_out_x,id_x]  #
)
logout(request)
return redirect('login_ini')

and in template:
   {% if perms.ai.btn_acep_fichacui %}
Aceptar
{%else%}
Aceptar
{%endif%}

if you have some question, contact me to: gabrielaraya2...@gmail.com


Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
99.7721.15.70



El dom., 5 jul. 2020 a las 15:57, Exactly musty ()
escribió:

> how can i specify a user in django templates, for example i have a page
> which consist of list of users available but i want it to show "Talk to a
> patient" for only the logged in user on his own profile here is what am
> saying in picture and here is my code, i actually don't know how to put the
> code i have tried many code but it does show Talk to a patient for every
> users or it wont show at all,i attached a picture to it,that shows what am
> saying,i checked the doc but couldn't find anything to use,so i wanted to
> try the custom templates tags,but i still don't how to comport the code in
> the templatetags views
>
> *Models.py*
>
>
>
> class Doctor(models.Model):
> GENDER_CHOICES = (
> ('Male', 'Male'),
> ('Female', 'Female'),
> )
> user = models.OneToOneField(CustomUser, on_delete=models.CASCADE, null=
> True, related_name="doctor")
> image = models.ImageField(default='jazeera.jpg', upload_to='
> profile_pics')
> full_name = models.CharField(max_length=100)
> bio = models.TextField()
> speciality = models.CharField(max_length=300)
> describtion = models.CharField(max_length=100)
> status = models.ManyToManyField(Status)
> gender = models.CharField(max_length=6, choices=GENDER_CHOICES)
> location = models.CharField(max_length=100)
> certification = models.CharField(max_length=300)
> place_of_work = models.CharField(max_length=300)
>
>
>
>
>
> *##template*
> {% if request.user == doctor %}
> Talk to a Patient
>   {% endif %}
>
>
>
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4278d2eb-53a1-4b9c-89fa-a5d09f96c458o%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/4278d2eb-53a1-4b9c-89fa-a5d09f96c458o%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDC2K-zPX8NE73SxS-5FeQs5pce5%3DqJ5Y-8Qy0bEHq%3DU2g%40mail.gmail.com.


Re: Migrar solo una tabla

2020-06-06 Thread Gabriel Araya Garcia
Amigo Cosmos, he puesto el nombre de la aplicacion al final de la 
instruccion pero me dice lo mismo. "no migrations to apply".
lo ideal seria algo como:
python manage.py makemigrations mitabla


El sábado, 6 de junio de 2020, 20:37:50 (UTC-4), cosmos multi escribió:
>
> si se puede solo es poner el comando normal y el nombre de la aplicacion
>
> El sáb., 6 jun. 2020 a las 19:32, Gabriel Araya Garcia (<
> gabriela...@gmail.com >) escribió:
>
>> Pregunta:
>> Se puede migrar solo una tabla, ya que las otras estan ok. Es decir, 
>> ¿sepuede:
>> python manage.py makemigrations solo para una tabla recién definida en el 
>> modelo ?
>>
>> Gracias desde ya
>>
>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/db170756-9389-4c3f-aa0c-751dbb2f34ebo%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/db170756-9389-4c3f-aa0c-751dbb2f34ebo%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/62c908de-822f-43b2-91a7-9771ed5f4679o%40googlegroups.com.


Re: Hosting para demostración

2020-06-06 Thread Gabriel Araya Garcia
Ok, gracias por el dato. 
Mi inquieud es, estando en Pythonanywhere, y una vez que he avanzado en mi 
proyecto y encuentro que la velocidad es adecuada, y la operatividad es 
buena en este hosting ¿podre contratar una cuenta pagada sin grandes 
modificaciones ni efectuar copias ?

Gracias 

El viernes, 9 de agosto de 2019, 15:46:47 (UTC-4), Gerardo Palazuelos 
escribió:
>
> hola,
> Antes mencionaron pythonanywhere.com, aca tienes una liga/tutorial:
>
>
> https://www.pythoncircle.com/post/18/how-to-host-django-app-on-pythonanywhere-for-free/
>
> también puedes consultar el tutorial de DjangoGirls para más detalle.
>
> Saludos,
>
>
> --
> Gerardo Palazuelos Guerrero
>
>
>
> On Fri, Aug 9, 2019 at 11:57 AM Gabriel Araya Garcia <
> gabriela...@gmail.com > wrote:
>
>> ¿Donde y como subir mi proyecto básico en calidad de demostracion?. Es 
>> muy basico, con apenas 60 registros, en Sqlite3. Necesito mostrar el estado 
>> de avance para un cliente. He intentado subir a Heroku, pero me ha sido 
>> imposible, pues me alega sobre la mi version de Python 3.7.4 cabe señalar 
>> que Heroku tolera solo 3 versiones de Python (la pagina así lo informa). El 
>> mensaje de error es:
>>
>> "Push rejected, file to compile Python app"
>>
>>
>> Python 3.7.3, 3.6.8, y 2.7.16
>>
>> Por supuesto he efectuado todas las modificaciones al setting.py, creando 
>> los archivos y carpetas necesarios (requierements.txt, profile, local,..etc)
>> Estoy trabajando con Django version 2.1.7
>>
>> En consecuencia, necesito una alternativa para subir mi proyecto
>>
>> Desde ya agradezco la ayuda que me puedes brindar.
>>
>> Saludos
>> gabriela...@gmail.com 
>>
>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/5fb08f5c-1e99-4193-a27c-a9c6cea184bb%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/5fb08f5c-1e99-4193-a27c-a9c6cea184bb%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c606c364-7cbb-450f-9d1f-87923f668274o%40googlegroups.com.


Migrar solo una tabla

2020-06-06 Thread Gabriel Araya Garcia
Pregunta:
Se puede migrar solo una tabla, ya que las otras estan ok. Es decir, 
¿sepuede:
python manage.py makemigrations solo para una tabla recién definida en el 
modelo ?

Gracias desde ya

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/db170756-9389-4c3f-aa0c-751dbb2f34ebo%40googlegroups.com.


Re: How to convert the static image files of a readymade template to dynamic

2020-06-05 Thread Gabriel Araya Garcia
..and... why you don't try make theses things that you are asking ?

El 12:03 Vie Jun 5, 2020, Vishesh Mangla 
escribió:

> First of all, if you will use .css file, it would be better. In that you
> can include image the usual way.
>
> But still if you would like it as inline element thenn use “...{% url
> ‘’ %}...”. Mind the single commas and double commas.
>
> Sent from Mail  for
> Windows 10
>
>
>
> *From: *Rabbi Rabbi 
> *Sent: *05 June 2020 20:57
> *To: *Django users 
> *Subject: *How to convert the static image files of a readymade template
> to dynamic
>
>
>
> Please help me to fix this. Do I need to use a double quotation before and
> after the .jpg link?
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/9abe66f6-06d2-4851-a41c-b45ab129033bo%40googlegroups.com
> 
> .
>
>
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CD689EDE-504B-44D6-B043-685D0F7F50D4%40hxcore.ol
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDC4z-BXqJ9ny6%3DcYE_O2tDr9AT40NjkTQaFZq6xyEKN6Q%40mail.gmail.com.


Re: Database audit fields in Django

2020-05-22 Thread Gabriel Araya Garcia
You can see it in ADMIN tables of Django

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
99.7721.15.70



El vie., 22 may. 2020 a las 17:39, Sujata Aghor ()
escribió:

> I am looking to create a database audit fields such as 'created by' , '
> modified by', 'created on time', ' modified on time' and Archive table
> where i can see the changes over the time about perticular row.
>
> this was possible in web2py automatically. Does anyone knows any such
> thing exist in Django?
> Any idea will be a gr8 help.
> Thanks
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/05b8bddb-d2b3-4c97-a2ef-f02ad4311e3c%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/05b8bddb-d2b3-4c97-a2ef-f02ad4311e3c%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDAsduA57vxhcm2gFUs_EwFmq5e%3DMJzuMwY0GEjPnvv2nA%40mail.gmail.com.


Re: How to create custom tag - break for tamplate?

2020-05-17 Thread Gabriel Araya Garcia
Sergei, you just to have put an conditional flag. It could be defined in
your view. Example:
flag_ = 0
if pedrito > 16
   flag_ = 1

and flag_ send it in context

in template you must include:
{%  if flag_ == 0 %}
  brek
  etc.

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
99.7721.15.70



El dom., 17 may. 2020 a las 11:10, Sergei Sokov ()
escribió:

> views.py
>
> class MyClassCreateView(LoginRequiredMixin, CustomSuccessMessageMixin, 
> CreateView):
> model = MyClass
> template_name = 'mypage.html'
> form_class = MyClassForm
> success_url = reverse_lazy('mypage')
> success_msg = 'сохранён'
> def get_context_data(self, **kwargs):
> kwargs['list_mylist'] = MyClass.objects.all()
> list_mylist = kwargs['list_mylist']
> for i in list_mylist:
> if i.author == self.request.user:
> print('my_button')
> kwargs['my_button'] = True
> break
> return super().get_context_data(**kwargs)
>
> template
>
> {% if my_button %}
>{% for i in list_mylist %}
>  {% if request.user == i.author %}
> 
>   кнопка первая
> 
>  {% endif %}
>{% endfor %}
> {% else %}
>  data-target="#class">
>   кнопка вторая
> 
> {% endif %}
>
>
>
>
> суббота, 16 мая 2020 г., 20:05:01 UTC+2 пользователь Sergei Sokov написал:
>>
>> Hi
>> I would like abort a loop in my template.
>> How to create custom tag - break for tamplate?
>>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5f05fc6e-13a0-47ba-be33-9c860dc48dee%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/5f05fc6e-13a0-47ba-be33-9c860dc48dee%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDDFFeTzd_MhvK4ebD9eGRd%2BJ%2Btg8gVy9_Sdv_Y8HnTmzA%40mail.gmail.com.


Re: how to write Ajax for a Like button in Django

2020-05-17 Thread Gabriel Araya Garcia
Hi Ahmed, I was looking for that during several months and I have found
examples than not run, and therefore I`ve get one conclution: "It`s not
posible to get that functionality in Django". No one could demostrate with
example code.
If you find something, please send me the code.

Thanks


Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos




El dom., 17 may. 2020 a las 20:15, Ahmed Khairy (<
ahmed.heshamel...@gmail.com>) escribió:

> Hi all,
>
> I need some help writing the ajax for a like button instead of refreshing
> every time a like is posted
>
> here is the template:
>
>   method='POST'>
> {% csrf_token %}
> {% if user.is_authenticated %}
> {% if liked %}
>  = "btn btn-danger btn-sm" value="{{post.id}}"> Unlike  >
> {% else %}
>  = "btn btn-primary btn-sm" value="{{post.id}}"> Like  >
> {% endif  %}
> {% else %}
>  Login > to Like 
> {{total_likes}} Likes 
> {% endif %}
> 
>
> Here is the urls:
> path('like/', LikeView, name='like_post'),
>
> here is the views:
> def LikeView(request, pk):
> post = get_object_or_404(Post, id=request.POST.get('post_id'))
> like = False
> if post.likes.filter(id=request.user.id).exists():
> post.likes.remove(request.user)
> like = False
>
> else:
> post.likes.add(request.user)
> like = True
> return redirect('score:post-detail', pk=pk)
>
> class PostDetailView(DetailView):
> model = Post
> template_name = "post_detail.html"
>
> def get_context_data(self, *args, **kwargs):
> context = super(PostDetailView, self).get_context_data()
>
> stuff = get_object_or_404(Post, id=self.kwargs['pk'])
> total_likes = stuff.total_likes()
>
> liked = False
> if stuff.likes.filter(id=self.request.user.id).exists():
> liked = True
>
> context["total_likes"] = total_likes
> context["liked"] = liked
> return context
>
>
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/00707977-9b68-4329-a13d-adb9ab7b8813%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/00707977-9b68-4329-a13d-adb9ab7b8813%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDCuegzvsZQ_Rfms3yMA_EO914T0yJ_n929mnx7bNDodUA%40mail.gmail.com.


Re: Best hosting for Django Application?

2020-05-06 Thread Gabriel Araya Garcia
I've learned Django for a year, and I have my project hosted in
PYTHONANYWHERE, however, I never had have a problem. It's very easy, you
can If you are a beginner to use the free account, or else a paid one.
If you have any question, don't hesitate to ask me.

Regards,

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
Santiago de Chile
99.7721.15.70



El mié., 6 may. 2020 a las 14:18, Nomeh Uchenna Gabriel (<
nomehgabri...@gmail.com>) escribió:

> please don't ever use "python-anywhere" for a serious project unless you
> have enough tears  in your eye balls to cry out when the time comes.
>
> ... I suggest "digitalocean/linode" so that the heavy problems of "SSL
> certificates" won't beat you up
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/ee7b3e5b-20f8-4f70-aca2-3fc689a30a37%40googlegroups.com
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDDzT8xJf5c1qxpb6CL%3DSUeNZ_evHEnfLyPihaBiZi17OA%40mail.gmail.com.


Recorrer una tabla sqlite3 en una view Django

2019-10-18 Thread Gabriel Araya Garcia
¿Como puedo recorrer registro a registro una tabla e ir insertando dicha 
informacion en otra tabla segun criterio de lo que tenga en un campo de la 
primera tabla?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/40adc444-46a4-4ad9-b3f5-f3cda65fae1d%40googlegroups.com.


Re: forms name could't import are some error

2019-09-26 Thread Gabriel Araya Garcia
I can't see the error

El vie., 27 sept. 2019 a las 1:07, MEGA NATHAN ()
escribió:

> Hi.
>
> i was creating simple django forms . some error in views and urls please
> solve 
>
>
>
>
>
>
> *Regards*
> Meganathan,
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e4349773-f5f1-4d86-94da-517c390417e5%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/e4349773-f5f1-4d86-94da-517c390417e5%40googlegroups.com?utm_medium=email_source=footer>
> .
>


-- 
Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
99.7721.15.70

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDBAcXxUROmAmFzwHxUd7B7w2uoTyKU8r4B0N7B6gkwmqw%40mail.gmail.com.


Re: Help for building recommendation system in django

2019-09-23 Thread Gabriel Araya Garcia
Hi, What is an  recommendation system ? I live in Chile, and I do not know
what is that.
Have you something done in this minute ?

El mar., 24 sept. 2019 a las 0:35, Mahir Shah ()
escribió:

> Hello , I am trying to build an recommendation system on books using
> django framework but am not been able do it . Please help me out with this
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/27027877-2836-452b-a608-473100edc83e%40googlegroups.com
> .
>


-- 
Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
99.7721.15.70

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDCHwtWZSrAbgarmevWNR%3D81EfZDfh%2BnmecTeaLHRQw5xQ%40mail.gmail.com.


Re: how to rectify this error

2019-09-21 Thread Gabriel Araya Garcia
Did you run the makemigrations and migrate command from console ?



El vie., 20 sept. 2019 a las 13:29, idb solutions (<
suman.flyhigh123...@gmail.com>) escribió:

> the server isn't running.
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/cb8e6300-15a5-4a22-a054-117439311a86%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/cb8e6300-15a5-4a22-a054-117439311a86%40googlegroups.com?utm_medium=email_source=footer>
> .
>


-- 
Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
99.7721.15.70

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDA-S2kcudHW5jzG1aO2ba9Goe1dXBYuL5uFazPQ45fUcw%40mail.gmail.com.


Re: Get authorization and list users in auth via http request

2019-09-09 Thread Gabriel Araya Garcia
...and why you don't use the Django admin  app ?

El lun., 9 sept. 2019 a las 15:00, Ezequias Rocha ()
escribió:

> Hi everyone
>
> Could someone tell me if Django encourages the community to implement
> auth/user authentication and user creation via http requests?
>
> I would like to *create *new users and *get users list* via a simple
> POST/GET http requests.
>
> Have someone did it here?
>
> Sincerely
> Ezequias
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/eb99b343-bf08-47da-9a5a-dc1bf0ccb797%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/eb99b343-bf08-47da-9a5a-dc1bf0ccb797%40googlegroups.com?utm_medium=email_source=footer>
> .
>


-- 
Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
99.7721.15.70

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDCaKSTNLbdNKPs-HS2XTQ19f4cjUmO7w4kbOaoyhOUBSw%40mail.gmail.com.


Re: Error: Not able to create table using models (Backend mysql)

2019-09-03 Thread Gabriel Araya Garcia
I believe that Simon says.
Get out the date and time fields and see what appen. After you can add the
date and time fields directly on DB and put them in your models and forms
also

luck

El mar., 3 sept. 2019 a las 9:57, johnsi rani ()
escribió:

>
>
> i nstalled django2 and mysql 5.0
>> I am getting this error while i give python manage.py migrate
>>
>> raise MigrationSchemaMissing("Unable to create the django_migrations
>> table (%s)" % exc)
>> django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create
>> the django_migrations table ((1064, "You have an error in your SQL syntax;
>> check the manual that corresponds to your MySQL server version for the
>> right syntax to use near '(6) NOT NULL)' at line 1"))
>>
>> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c58dc01f-95ae-4902-9cb9-99daccdaf8e6%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/c58dc01f-95ae-4902-9cb9-99daccdaf8e6%40googlegroups.com?utm_medium=email_source=footer>
> .
>


-- 
Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
99.7721.15.70

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDCrVymdS7i6_RmD2hAMNBHOD5LZt9JUGEr8F2pb4TQU9g%40mail.gmail.com.


Re: Help with Django

2019-09-01 Thread Gabriel Araya Garcia
There are millions tutorials that you can read step by step. I am also new
in django, but i was long six month study by myself  and I've achieved
build a project.


El dom., 1 sept. 2019 a las 14:51, Elmaco7 ()
escribió:

> Hello, I'm new and it's the first time that I use Django.
> I should create a site with a database containing Students, exams and
> grades.
> Furthermore I should give the possibility to insert a student and to know
> how many exams he has given and also to insert an exam and know which
> students have passed it.
> Can someone help me?
> Thanks.
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/8858e1b6-0448-43da-a495-5e314cf5b220%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/8858e1b6-0448-43da-a495-5e314cf5b220%40googlegroups.com?utm_medium=email_source=footer>
> .
>


-- 
Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
99.7721.15.70

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDCBGk%3DfohLuqM76uZn%2BaQpjRMwuCfA3q0YTYDVQOYSu_Q%40mail.gmail.com.


Re: Please help me to solve the error

2019-09-01 Thread Gabriel Araya Garcia
Manas:
Recuerda que existen dos  urlpatterns, una exterior y otra que está en la
carpeta de tu APLICACION, ojo con eso. La exterior es la que direcciona al
ADMIN y la otra es la que define la ubicacion de las URLS de tu aplicacion,
yo creo que esta ultima no la has construido.

Keep in mind that there are two URLPATTERNS one exterior and the other
inside of your aplication (app). The exterior give us the address to ADMIN
and the other is where will be all PATH's of your project.

gabrielaraya2...@gmail.com


El dom., 1 sept. 2019 a las 9:37, Manas Sanas ()
escribió:

> There is an error when i add url to url.py. The url.py file is as follow-
> from django.contrib import admin
> from django.urls import path, include
>
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('polls/', include('polls.urls')),
> ]
> when i run the code in terminal : 'python manage.py runserver' ; then the
> follwing error is displayed in the terminal -
>
> django.core.exceptions.ImproperlyConfigured: The included URLconf ' 'polls.urls' from
> 'C:\\Users\\Administrator\\PycharmProjects\\website2\\mysite\\polls\\urls.py'>'
> 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.
>
> Please help me to solve the error
>
> Regards,
> Django user
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e77ae50b-dbdb-447a-9e91-b04e996197c9%40googlegroups.com
> .
>


-- 
Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
99.7721.15.70

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDB-O67cC51sGeD602Fyh_78HH_yxO8p42k67c8hho%3DBLw%40mail.gmail.com.


Re: Hi, I'm new django. I want to learn Django. What's the first step.

2019-09-01 Thread Gabriel Araya Garcia
Jorge Luis:
La clave para comenzar, es meterte en los tutoriales, Por ejemplo y si te
encuentras que las rutas se construyen con PATH, entonces es un tutorial
moderno. En caso contrario, te van a sugerir comandos e instrucciones que
están obsoletas y vas a intentar llevarlas a cabo y no te funcionaran, y te
frustarás, etc.etc.
Yo tambien soy nuevo en esto, y he logrado ir construyendo un sistema he
implementandole funcionalidades y validaciones con JS.
Que te vaya bien

gabrielaraya2...@gmail.com



El dom., 1 sept. 2019 a las 9:37, Jorge Luis Callalle Torres (<
jlcalla...@gmail.com>) escribió:

> Hi, I'm new django. I want to learn Django.  What's the first step
> What advice you could give me.
> Any course, resources, or books
>
> thanks a lot friends
>
> --
> *Jorge Luis Callalle Torres*
> 5359480 / 934835047
>
>
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CALps_2HgbSwAWo7fwFoLJ7tbz4poCtqOkKs3jQLMj1gQ97Wf%3Dg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CALps_2HgbSwAWo7fwFoLJ7tbz4poCtqOkKs3jQLMj1gQ97Wf%3Dg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>


-- 
Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
99.7721.15.70

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDAi%2BG2M2EmMbQD8UUZfP6GR8KssAqBj9tJaZRLpE-gtFg%40mail.gmail.com.


Re: Hi, I'm new django. I want to learn Django. What's the first step.

2019-09-01 Thread Gabriel Araya Garcia
Work with the last version of python and django. Take care about the old
sintaxis. The new sintaxis is more easy.

have a good day
gabrielaraya2...@gmail.com


El dom., 1 sept. 2019 a las 9:37, Jorge Luis Callalle Torres (<
jlcalla...@gmail.com>) escribió:

> Hi, I'm new django. I want to learn Django.  What's the first step
> What advice you could give me.
> Any course, resources, or books
>
> thanks a lot friends
>
> --
> *Jorge Luis Callalle Torres*
> 5359480 / 934835047
>
>
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CALps_2HgbSwAWo7fwFoLJ7tbz4poCtqOkKs3jQLMj1gQ97Wf%3Dg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CALps_2HgbSwAWo7fwFoLJ7tbz4poCtqOkKs3jQLMj1gQ97Wf%3Dg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>


-- 
Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
99.7721.15.70

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDD9nx91uvGTbXtcgJM9N5BHzpRVN8j1H39JpK2t2hpDxw%40mail.gmail.com.


Re: User Register form not validating or returning errors.

2019-08-27 Thread Gabriel Araya Garcia
Only see the 'error_new' variable in my view
this variable has taken two values: "ok" or "error1" (true or false, error
or not error,..etc)

def NuevoPac(request):
# Manda al formulario todos los campos vacios
variable1 = 'Agregando nueva Ficha de Paciente'
variable2 = "modifica_rut"
error_new = "ok"
form   =  PacientesForm(request.POST or None)
region=  Param.objects.filter(tipo='REGI').order_by('descrip')
comuna=  Param.objects.filter(tipo='COMU').order_by('descrip')
sexo  =  Param.objects.filter(tipo='SEXO').order_by('codigo')
context = {
'form':form,
'variable1':variable1,
'variable2':variable2,
'region':region,
'comuna':comuna,
'sexo':sexo,
'error_new':error_new,
}
if request.method == "POST":
paciente = Pacientes# modelo
rut_x = request.POST.get('rut') # valor del template
existe = paciente.objects.filter(rut=rut_x).exists()
if existe == True:
error_new = 'error1'
context = {
'form':form,
'variable1':variable1,
'variable2':variable2,
'region':region,
'comuna':comuna,
'sexo':sexo,
'error_new':error_new,
}
else:
if form.is_valid():
paciente = Pacientes# modelo
form.save()
return redirect('grid_pacientes')
return render(request, 'ficha_pacientes.html',context)

Remember that 'POST' is when you give a submit botton, and you must put
this cod lines in your template:

{% if error_new == "error1" %}
 R.U.T. de Paciente ya existe !!
{% endif %}

You should put it before of the disply text fields in your template.
Therefore the alert message will be showed at the top.

please tell me if your trouble has been fixed

Sorry for my english

Gabriel Araya Garcia
Chile




El sáb., 24 ago. 2019 a las 12:34, Kean () escribió:

> Hi,
>
> New to Django.
> I've created a user registration form, the issue is it does not run
> validations or report errors with the data entered. It simply routes to the
> redirect url.
> Please can I ensure the user sees the correct error in a post case scenari
> for both a django form, and customsied django form.
>
> forms.py
>
> class UserRegisterForm(UserCreationForm):
> email = forms.EmailField()
>
> class Meta:
> model = User
> fields = 'username', 'email', 'password1', 'password2'
>
> Views.py
>
> def register(request):
> if request.method == 'POST':
> form = UserRegisterForm(request.POST)
> if form.is_valid():
> form.save()
> username = form.cleaned_data.get('username')
> messages.success(request, f'Account created for {username}')
> return HttpResponseRedirect('cprofile')
> else:
> form = UserRegisterForm()
> context = {'form': form}
> return render(request, "register.html", context,)
>
> template.html
>
> 
> Registration
> 
> 
> 
> 
> 
> {% csrf_token %}
> 
> Register
> {{ form|crispy }}
> {% if messages %}
> {% for messages in messages %}
> 
> {{ messages }}
> 
> {% endfor %}
> {% endif %}
> 
> 
> 
> Register
>
> Any help would be much appreciated
>
> Best,
>
> K
>
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5a003506-de8d-4587-863d-3fc26e4c45c1%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/5a003506-de8d-4587-863d-3fc26e4c45c1%40googlegroups.com?utm_medium=email_source=footer>
> .
>


-- 
Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
99.7721.15.70

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDDDhWAQz8pAXenCoeiOcPkVBZVR6oRXBHy21GT6UJv0Aw%40mail.gmail.com.


Re: django-admin error

2019-08-18 Thread Gabriel Araya Garcia
Hi Daniel:
I have build a little app in Django, but i have two problems:
1) I can not see the tables in ADMIN, but nevertheless y put in admin.py:
from .models import Pacientes
admin.site.register(Pacientes)

But it not run.

2) I can not upload my project to HEROKU, I've follow all the steps for to
do this, but not run
Do you know some cpanel to upload my app for demo only (it have 120 records)

Please, can you help about this?

Thanks
(excusme my english, my native language is spanish)

El sáb., 17 ago. 2019 a las 18:38, Daniel Agbaji ()
escribió:

> Please check to see it you got install Django properly with the version of
> Python you are using.
>
> On Sat, Aug 17, 2019, 4:38 PM Muhammad Nadeem 
> wrote:
>
>> FIRST U NEED TO START A NEW PROJECT USING FOLLOWING CODE:
>> django-admin startproject mysite
>> WHERE "mysite" is the name of your project. you can change this name as
>> you desired.
>>
>>
>> if further u have any error fell free ping me
>>
>>
>> On Sun, Aug 18, 2019 at 1:32 AM Naty Mina  wrote:
>>
>>> hi, i'm new in django and trying to create my first project
>>> i followed the documentation and when i try to execute the django-admin
>>> startproject mysite i get error that 'no django settings specified' and to
>>> try 'django-admin.py help' instead for usage.
>>> the problem is when i try to do so, i get again the same error message
>>> i need help with that.
>>> i attached file so you can see
>>> *thank you*
>>>
>>> --
>>> 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.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/1690dca2-2728-452e-81fe-1458af63ba95%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/1690dca2-2728-452e-81fe-1458af63ba95%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CALYW77hm8aK%2BNPpfPPexB10ikmQ7Y%2BzezZZULe5mDvgLyVYSSQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CALYW77hm8aK%2BNPpfPPexB10ikmQ7Y%2BzezZZULe5mDvgLyVYSSQ%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAEnL_2nXTu13StMpfL8EQR6zwhZ6TmpW8RhHYoH69cc-9xWAog%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAEnL_2nXTu13StMpfL8EQR6zwhZ6TmpW8RhHYoH69cc-9xWAog%40mail.gmail.com?utm_medium=email_source=footer>
> .
>


-- 
Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
99.7721.15.70

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDAW0r1hJ7muJ0cEB9NhTwhWVq1O5yCMo1%3D7OsV04nGLtA%40mail.gmail.com.


Hosting para demostración

2019-08-09 Thread Gabriel Araya Garcia
¿Donde y como subir mi proyecto básico en calidad de demostracion?. Es muy 
basico, con apenas 60 registros, en Sqlite3. Necesito mostrar el estado de 
avance para un cliente. He intentado subir a Heroku, pero me ha sido 
imposible, pues me alega sobre la mi version de Python 3.7.4 cabe señalar 
que Heroku tolera solo 3 versiones de Python (la pagina así lo informa). El 
mensaje de error es:

"Push rejected, file to compile Python app"


Python 3.7.3, 3.6.8, y 2.7.16

Por supuesto he efectuado todas las modificaciones al setting.py, creando 
los archivos y carpetas necesarios (requierements.txt, profile, local,..etc)
Estoy trabajando con Django version 2.1.7

En consecuencia, necesito una alternativa para subir mi proyecto

Desde ya agradezco la ayuda que me puedes brindar.

Saludos
gabrielaraya2...@gmail.com

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5fb08f5c-1e99-4193-a27c-a9c6cea184bb%40googlegroups.com.


Re: FRONTEND AND BACKEND-DJANGO

2019-08-02 Thread Gabriel Araya Garcia
I dont underatand your question. You should study all about Django, because
it is not easy find all in one tutorial. Why you Don`t pay one teacher and
ready?


El vie., 2 ago. 2019 a las 13:32, CodingManiac ()
escribió:

> hey @mung_valte
> you can start by this tutorial:
> https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django
>
> On Fri, Aug 2, 2019 at 4:29 PM mung_valte  wrote:
>
>> Hi All,
>> I know it sounds too much, yet am just strating to learn DJANGO. So,
>> anyone who can show me the tutorial for building website(travel website)
>> back and front end of website using django.
>> 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 an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/4eef3ec3-0c6c-4325-9c6e-5bf5dd183ee8%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/4eef3ec3-0c6c-4325-9c6e-5bf5dd183ee8%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAFN7gTzoXmNm1Dq_cJPzT1cTfrkbLJ_Z1W5F0iB%3DE4H3g_n8Vw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAFN7gTzoXmNm1Dq_cJPzT1cTfrkbLJ_Z1W5F0iB%3DE4H3g_n8Vw%40mail.gmail.com?utm_medium=email_source=footer>
> .
>


-- 
Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
99.7721.15.70

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDAS6Sjq981TcZHfYdjS3osS3mRbUd9fg-H%3D3q9wgQxd%2BA%40mail.gmail.com.