Re: About Django performance

2020-02-28 Thread Gil Obradors
Hi !
I 'm curious too!

How much data?

With CPU and RAM, may be the problem will be in Wifi Channel, instead of at
the server.

You will explain us ;)

Thank you!

Missatge de 이바울  del dia dv., 28 de febr. 2020 a les
11:33:

> I'm trying to build a server.
>
> Data transmitted from the wireless communication device enters the
> database via this server.
>
> We will use Message Queue to avoid losing data (VernaMQ).
>
> I'm curious to see if Django is a suitable server for sending and
> receiving data from multiple wireless devices, and if there is a problem,
> is there an alternative to using Django?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/581a2e10-95fd-47c9-a680-3eeaf7a8eb1e%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/CAK-JoTQn6H9dU%2B52bVqmjuidxPStAzUSJNSrcbv%2B4r3xxCTCjw%40mail.gmail.com.


Re: Many to Many relationships in template

2020-02-27 Thread Gil Obradors
Hi!

https://docs.djangoproject.com/en/3.0/ref/contrib/admin/#modeladmin-objects
or
https://docs.djangoproject.com/en/3.0/intro/tutorial07/#writing-your-first-django-app-part-7

Missatge de Robb Rodirguez Jr.  del dia dv.,
28 de febr. 2020 a les 1:14:

> Good day guys, im new to django im having in many to many relationship
> display in template
>
> How can display this into a normal list..
>
> from .
> , , , ,
> ]>
>
> to.
> webadmin
> kim
> sem
> quinito
> user1
>
> Here's my code
>
> model.py
>
> class ListOfUser(models.Model):
> users = models.ManyToManyField(User, verbose_name='List of User')
>
>
>
> views.py
>
> def listofusers(request):
> userlist = ListOfUser.objects.get(id=1)
>
> form = ListofUserForms()
>
> context = {
> 'form': form,
> 'userlist': userlist
> }
> return render(request, 'listofusers.html', context)
>
>
> template
>
> {{userlist.users.all}}
>
>
> --
> 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/f3e604a7-5613-4f12-8aa6-526b19ae0fc7%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/CAK-JoTQQr%2BQODZoqWfJLNcdFsrkvLWXmUOqES0wcxSfCSHO59A%40mail.gmail.com.


Re: django context data into javascript

2020-02-25 Thread Gil Obradors
Hi!

The context is a dictionary mapping template variable names to Python
objects.
from https://docs.djangoproject.com/en/3.0/intro/tutorial03/

May be you need to test with a dict nor string directly.
I haven't test a direct variable.

Try not using JS, first resolve dict context in html , then JS.

Luck!

Missatge de Soumen Khatua  del dia dt., 25 de
febr. 2020 a les 11:25:

> Hi Folks,
>
> I'm sending some context data into html like
> name = 'soumen'
> return render(request,'xyz.html', context = {'name':name})
>
> inside myjs.js(js script has been integrated to html):
> ---
> var my_name = {{name}};
>
> I'm getting an error::: Uncaught SyntaxError: Unexpected token '{'
>
> So,How I can render data into frontend??
>
> 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/CAPUw6WYM%2BvkoRqOaUn0%2Bt0j9fBf%2BhUZ2myvfsfY4qoBmLAgTfw%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/CAK-JoTRqi_2rRoshwmr7G74%3DH6STp0LSL_4nKBsODpi4%2BwrrCw%40mail.gmail.com.


Re: Problem with Admin Page

2020-02-09 Thread Gil Obradors
Hi Alessandro, can you report python version and django version?

Missatge de Alessandro D' Oronzo  del dia dg., 9 de
febr. 2020 a les 19:38:

> Hi everyone,
> I have a problem with local web server and admin page.
> When I try to connect to admin page the web server of Django close without
> errors.
> Do you have any ideas?
>
> Thanks 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/DB0F065D-5D63-438D-B5AA-DBFB05B28A54%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/CAK-JoTSN45%3DG2s6aE5%3Dk8KbDdOhERSvV_NsjddRzxq187BM1Hw%40mail.gmail.com.


Re: add icmp test

2020-01-26 Thread Gil Obradors
Of course, as pure python


https://stackoverflow.com/a/10402323

Missatge de paulo milo escano  del dia dg., 26
de gen. 2020 a les 16:41:

> can django support ping test, such as using subprocess module
>
> --
> 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/08519882-2a8b-408b-b939-8ab80c718bf8%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/CAK-JoTT6%3DiX5Dy0WiqUH%3DSSLtujscNToghcXa4B_CnkZ_PYyew%40mail.gmail.com.


Re: Django >=3 closes dev server when trying to log in in admin

2020-01-07 Thread Gil Obradors
Oh yes, sorry, i didnt read right...

Mn, no more output to paste?
Do you use an IDE?

i have django 2 and 3 working without this behaveor

Have you introduced changes to admin?


El dc., 8 de gen. 2020, 7:55, Gil Obradors  va
escriure:

> Hi, 302 response status isnt an error
> 
> https://developer.mozilla.org/es/docs/Web/HTTP/Status/302
>
> El dc., 8 de gen. 2020, 2:29, Cristhiam Gabriel Fernández <
> cristhiang...@gmail.com> va escriure:
>
>> Greetings
>>
>> From version 3 I'm getting this error. When I try log in in admin site
>> django closes dev server with no error, only `"POST
>> /admin/login/?next=/admin/ HTTP/1.1" 302 0``
>>
>> Any suggestion?
>>
>> --
>> 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/6b053e2c-d559-44ed-98e0-c7a5f5d3ef9b%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/6b053e2c-d559-44ed-98e0-c7a5f5d3ef9b%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/CAK-JoTS34PpgNruQLqzki%3DSrhEJ%3DHie2bMHj%2BTOTGTCJnNTJQg%40mail.gmail.com.


Re: Django >=3 closes dev server when trying to log in in admin

2020-01-07 Thread Gil Obradors
Hi, 302 response status isnt an error

https://developer.mozilla.org/es/docs/Web/HTTP/Status/302

El dc., 8 de gen. 2020, 2:29, Cristhiam Gabriel Fernández <
cristhiang...@gmail.com> va escriure:

> Greetings
>
> From version 3 I'm getting this error. When I try log in in admin site
> django closes dev server with no error, only `"POST
> /admin/login/?next=/admin/ HTTP/1.1" 302 0``
>
> Any suggestion?
>
> --
> 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/6b053e2c-d559-44ed-98e0-c7a5f5d3ef9b%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/CAK-JoTSDB%2BRyu%3Dv31Fe-KH7iRgVtKW3DnSmjPvBUGfE32gTYeQ%40mail.gmail.com.


Re: Necessary to learn React/ Angular with backend Django

2020-01-07 Thread Gil Obradors
My opinion,

If you want a great powerful user interface ( and experience) of the front
end, yes, interesting to spend hours.
If the users won't appreciate it, no.


Other voice...


Good luck!


Missatge de Karan Mittal  del dia dt., 7 de
gen. 2020 a les 19:38:

> Hello friend,
> In my opinion if it is working with current implementation you need not
> add any react or angular.
> Learning perspective they are good but implementation of the same in your
> already working project may raise new errors.
> That's my opinion, feel free to incorporate them once you have learned and
> get the response to do so by your users.
> Regards,
> Karan Mittal
>
> On Tue, 7 Jan, 2020, 11:17 PM Balaji Shetty, 
> wrote:
>
>> Hi
>>
>> Currently i deployed application on pythonanywhere. It is online office
>> file management system with around 100 users under 10 different department
>> in hierarchical manner.
>>
>> User and department may increase in future.
>>
>> Entire application is developed in Django back end.
>>
>> Used bootstrap for custom report generation.
>>
>> question arises in My mind is
>>
>> Is it Necessary to learn and implement in React/ Angular for front end.
>>
>>
>> Because I am comfortable with current implementation.
>>
>>
>> May I know what are gains i may get or what are the disadvantage i may
>> suffer in future.
>>
>> Kindly guide me to avoid future inconvenience.
>>
>>
>> --
>> Mr Shetty Balaji
>> Asst. Prof.
>> IT Department
>> SGGS I
>> Nanded. My. India
>>
>> --
>> 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/CAECSbOuN%2BBsvoGZ4nBA5D9batL9UAYQ4crZGWmaMxYMJQ5X1sQ%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/CAO24gqwBgRkr8LYhpHXS2A0o2i4Lcx1WdL%3DqnAuQPtOmtmnXvw%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/CAK-JoTQQQJnTHwT6dZi5ZUBCAj2L-u3t3KE5G9Snp0j8gk7-eg%40mail.gmail.com.


Re: Integrate Django with React

2020-01-03 Thread Gil Obradors
Hi Santhosh,

Nice tutorial https://www.youtube.com/watch?v=Uyei2iDA4Hs

Basically, React is for a nice User Interface, django templates is not
exactly the essence.


The advantage is a frontend programed as a component , better UI.
Django frontend is a  MVC renders with django templates.

All of two are nice and usefully, the difference is the functionality.
In React, every button, every component is programmed and can be different
from each other. Every component is defined.
You can do it with django template renders, but maybe more work.




Good luck!






Missatge de Santhosh sridhar  del dia dv., 3 de
gen. 2020 a les 16:53:

> Is there a way to integrate React JS framework with Django? How to do that?
> What is the advantage of using such frontend frameworks over normal ajax?
> Any help or explanation would be helpful. 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/0d673a79-cbb3-4ef6-a490-48687a680be2%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/CAK-JoTQQ4HXa0nwogL_VkB1SrD_sgG30oV_FNuaYYMPS%3DdS3qw%40mail.gmail.com.


Re: How to use django-request module to log all the user activities in a table?

2019-12-26 Thread Gil Obradors
Hi bro,


there's a logger from django.requests
Maybe is your solution

https://docs.djangoproject.com/en/3.0/topics/logging/#django-request


Missatge de Santhosh sridhar  del dia dj., 26 de
des. 2019 a les 10:47:

> I'm using Django 1.8 version. Need to know how to use django-request or
> any other module to capture the all the user activities of a website.
>
> --
> 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/f9666901-ae28-4449-be41-378be1e2b73f%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/CAK-JoTSUZgUoniP6t6RCeVpeYdcRXPcpVfAQy665oC6Q_GsGwg%40mail.gmail.com.


Re: Integrate React with Django

2019-12-24 Thread Gil Obradors
Yes!

The advantatge is a frontend component bases programed. Very interesting
for a great UI interface
It requires time

I started with this https://www.youtube.com/watch?v=Uyei2iDA4Hs

And next, I countinued with this Software Enginner _>
https://codewithmosh.com

Good luck



Missatge de Santhosh sridhar  del dia dc., 25 de
des. 2019 a les 6:53:

> Is it possible to integrate React Js framework with Django? What is the
> advantage of using react over Ajax with Django? Any example would help 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/d682ecc9-4550-45e9-81b1-94372553dee1%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/CAK-JoTQt3MpdRuKrD4d6smiQty4%3DcjT_qCZCFOcxn%2BMU-c9OPQ%40mail.gmail.com.


Re: how to send to sms to moblie number on one click at time to 25 numbers from django website ,,,,,, please anyone here for guidance

2019-12-17 Thread Gil Obradors
Hi Jani!


First you need a provider able to send SMS via rest-API

Second,write some methods codes to talk to this api, python is good.

Third, make a frontend, to call this methodos via web.  You can start with
static content via django templates and requests , for example


Good luck!


Missatge de Jani Eric  del dia dt., 17 de des. 2019
a les 13:29:

> how to send to sms to  moblie number on one click at time to 25 numbers
> from django website ,, please anyone  here for guidance
>
> --
> 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/0426b23d-47a5-471f-b135-335346fafac6%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/CAK-JoTQfwSKXtHgwUyc-VuC22GqhdSM8rHPcriKuSbbVq7yfFg%40mail.gmail.com.


Re: Python problem

2019-12-15 Thread Gil Obradors
Chetan, you're a genius!

Missatge de Chetan Ganji  del dia dg., 15 de des.
2019 a les 16:28:

> # input: h123456ello
> # output: o123456lleh
>
> # input: th34isisast56ring3
> # output: gn34irtsasi56siht3
>
>
> order = {}
> characters = ""
> input_string = "h123456ello"
> # input_string = "th34isisast56ring3"
> counter = 0
> output_string = ""
>
>
> for index, character in enumerate(input_string):
> order[index] = character
>
> for item in range(0, len(input_string)):
> if input_string[item].isalpha():
> characters += input_string[item]
>
> # reversing the string
> characters = characters[::-1]
>
> for index, item in enumerate(range(0, len(input_string))) :
> if input_string[item].isalpha():
> order[index] = characters[counter]
> counter += 1
>
> for index in range(0, len(input_string)):
> output_string += order[index]
>
> print()
> print(input_string)
> print(output_string)
> print()
>
>
>
>
> Regards,
> Chetan Ganji
> +91-900-483-4183
> ganji.che...@gmail.com
> http://ryucoder.in
>
>
> On Sun, Dec 15, 2019 at 8:14 PM Soumen Khatua 
> wrote:
>
>> Hi Folks,
>> I'm stucking in this problem from 5 hours but still I'm not bale to logic
>> to solve this problem, Please help me guys to solve this problem:
>>
>> Example:-
>> input: h123456ello
>> output: o123456lleh
>>
>> input: th34isisast56ring3
>> output: gn34irtsasi56siht3
>>
>> Thank you in advance.
>>
>> regards,
>> Soumen
>>
>> --
>> 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/CAPUw6Wa8LqGGnqbsiKvYrBw6WQkBaqjm9b8Re65PM3zJr1rdkA%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/CAMKMUjsLe0zo9_B70dNNq%2Bk_xwOTGt-cs%2BGeqagM-wZk8yYzLA%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/CAK-JoTStv3AUaAt7gOJjUhXtmqxXgaDqE3eC_fj5ak48Gb73Cg%40mail.gmail.com.


Re: Trying to update a record using UpdateView Error: Circuitinfotable matching query does not exist

2019-11-26 Thread Gil Obradors
This is the link ?
 Edit Jira Info


My project level urls.py is:

from django.contrib import admin
from django.urls import path, include
from django.conf.urls import url
import debug_toolbar

urlpatterns = [
path('admin/', admin.site.urls),
path('', include('homepage.urls')),
path('searchlit/', include('searchLit.urls')),
path('viewLit/edit/', include('editLit.urls')),
path('viewLit/', include('viewLit.urls')),
path('edit/', include('editLit.urls')),
path(r'^__debug__/', include(debug_toolbar.urls)),
]

So, *editLit.urls* will be:

[...]
urlpatterns = [
[...]
 path('jira/', views.editLit.as_view(),name='editLit'),
[]

]




Missatge de Patrick Carra  del dia dt., 26 de nov.
2019 a les 22:35:

> Correct me if i'm wrong but I think you meant:
>
> urlpatterns= [
>  path('circuit/',
> views.editLit.as_view(),name='editLit'),
> ]
>
> I did make that change but the results were the same.
>
> --
> 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/53dd1d57-4465-4af3-9b9e-183a2f9b6913%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/CAK-JoTTi%3D1swLbefyCRFAWmdGN8gbHmajKrmVPYSTqvsGzttmQ%40mail.gmail.com.


Re: Trying to update a record using UpdateView Error: Circuitinfotable matching query does not exist

2019-11-26 Thread Gil Obradors
Easy, urlpatterns from  editLit.urls must be:

urlpatterns= [
 path('jira/', views.editLit.as_view(),name='editLit'),
]


Missatge de Patrick Carra  del dia dt., 26 de nov.
2019 a les 22:09:

> Yea! This toolbar is an awesome tool thanks for the tip.  So now I guess
> I'm not understanding how to route url's really.  The a href is:
>   target="blank" title="Edit">Edit Jira Info
>
> My project level urls.py is:
>
> from django.contrib import admin
> from django.urls import path, include
> from django.conf.urls import url
> import debug_toolbar
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('', include('homepage.urls')),
> path('searchlit/', include('searchLit.urls')),
> path('viewLit/edit/', include('editLit.urls')),
> path('viewLit/', include('viewLit.urls')),
> path('edit/', include('editLit.urls')),
> path(r'^__debug__/', include(debug_toolbar.urls)),
> ]
>
> my editLit urls.py is:
> from django.urls import path, include
> from django.conf.urls import  url
> from . import views
>
> urlpatterns= [
>  path('edit/circuit/',
> views.editLit.as_view(),name='editLit'),
> ]
>
>
> And finally my editLit views.py is:
> class editLit(UpdateView):
> pk_url_kwarg = 'circuitid'
> model=Circuitinfotable
> template="/editLit/editCircuit.html"
> fields = '__all__'
>
>
> So I don't understand either how to just pull the param without the
> edit/circuit/ part or can that be stripped before it is passed to the view?
>
> --
> 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/9685efa1-b9b1-46e2-b831-d6144e0ebdf2%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/CAK-JoTTMKiT9AOCCQoMEtdC2nA1c7Oa0w%3Dd7_Ny%3DOwJTqgODfw%40mail.gmail.com.


Re: Trying to update a record using UpdateView Error: Circuitinfotable matching query does not exist

2019-11-26 Thread Gil Obradors
Yeah!
Can you see the error?
*WHERE* "circuitinfotable"."circuitid" =
'edit/circuit/STTK-100G-18040-01-WRBB'
would be : *WHERE* "circuitinfotable"."circuitid" =
'STTK-100G-18040-01-WRBB'

Link incorrect, or uls pattern incorrect
Edit Circuit Info



Missatge de Patrick Carra  del dia dt., 26 de nov.
2019 a les 21:54:

> I figured out the weirdness with the django-debug-toolbar I wasn't serving
> my static files from the apache/mod_wsgi configuration.  After I figured
> that out this is what I have now:
>
>  QueryTimelineTime (ms)Action
>   +
> 
> *SELECT* ••• *FROM* "circuitinfotable" *WHERE* "circuitinfotable"."circuitid"
> = 'edit/circuit/STTK-100G-18040-01-WRBB'
> 53.76007636826474%
> 2.42 SelExpl
>   +
> 
> *SELECT* ••• *FROM* "circuitinfotable" *LIMIT* 21
> 15.353203224437845%
> 0.69 SelExpl
>   +
> 
> *SELECT* ••• *FROM* "django_session" *WHERE* ("django_session"."expire_date"
> > '2019-11-26T20:52:52.260094+00:00'::timestamptz *AND* 
> > "django_session"."session_key"
> = '0b3x3t7gx8sbl09y5vsbonxtlfmynib4')
> 16.928298684768777%
> 0.76 SelExpl
>   +
> 
> *SELECT* ••• *FROM* "auth_user" *WHERE* "auth_user"."id" = 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/fbd433a9-bf5d-4ee4-b51c-51efbe110a57%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/CAK-JoTRrbOpxQXmWfzSvD1vWsSRWrfGNj3XWuVh4P-5ez%2B60WA%40mail.gmail.com.


Re: Trying to update a record using UpdateView Error: Circuitinfotable matching query does not exist

2019-11-26 Thread Gil Obradors
After the page is loaded, click to SQL queries and paste or make a
screenshot of the content.
In this tab you will see all transactions to DB


Missatge de Patrick Carra  del dia dt., 26 de nov.
2019 a les 19:57:

> Okay I have worked on it I do have the toolbar on there but it's not
> display correctly it shows up at the bottom of each page and looks like
> this:
>
>
>- Hide » 
>-  Versions
>Django 2.2.4 
>-  Time
>CPU: 51.78ms (56.68ms) 
>-  Settings 
>-  Headers 
>-  Request
>index 
>-  SQL
>2 queries in 2.67ms 
>-  Static files
>0 files used 
>-  Templates
>homepage/homepage.html 
>-  Cache
>0 calls in 0.00ms 
>-  Signals
>7 receivers of 12 signals 
>-  Logging
>0 messages 
>- Intercept redirects
>- Profiling
>
> «
> Versions
> [image: loading]
> Time
> [image: loading]
> Settings from ciopsdb.settings
> [image: loading]
> Headers
> [image: loading]
> Request
> [image: loading]
> SQL queries from 1 connection
> [image: loading]
> Static files (134 found, 0 used)
> [image: loading]
> Templates (1 rendered)
> [image: loading]
> Cache calls from 1 backend
> [image: loading]
> Signals
> [image: loading]
> Log messages
> [image: loading]
>
> --
> 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/863520f7-65dc-4605-98d9-3d28ec1c6d1f%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/CAK-JoTQcwaHmjh97v8zgcwGeetRcceAkn_zOJCKq%3DM8fEuX4AQ%40mail.gmail.com.


Re: Trying to update a record using UpdateView Error: Circuitinfotable matching query does not exist

2019-11-26 Thread Gil Obradors
and
Configuring Internal IPs

The Debug Toolbar is shown only if your IP address is listed in the
INTERNAL_IPS

setting. This means that for local development, you *must* add '127.0.0.1'
to INTERNAL_IPS
;
you’ll need to create this setting if it doesn’t already exist in your
settings module:

INTERNAL_IPS = [
# ...
'127.0.0.1',
# ...]


Missatge de Patrick Carra  del dia dt., 26 de nov.
2019 a les 18:04:

> I installed the django-debug-toolbar but its not doing anything. I
> imported it added it to settings.py installed apps and middleware, added
> the if statement to the project level urls.py and Debug is set to True.
>
> --
> 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/bcc80c18-c3e8-4f29-844e-463014476c1e%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/CAK-JoTT7-QN-w-9UDDHC%3DhGQYvswvYJeXHpbHcVn_e5v%3DDSofA%40mail.gmail.com.


Re: Trying to update a record using UpdateView Error: Circuitinfotable matching query does not exist

2019-11-26 Thread Gil Obradors
Can you try to add to the view class this argument?

https://docs.djangoproject.com/en/2.2/ref/class-based-views/mixins-single-object/#django.views.generic.detail.SingleObjectMixin.pk_url_kwarg

pk_url_kwarg = 'circuitid'

And check what query is doing with django-debug-toolbar

Missatge de Gil Obradors  del dia dt., 26 de nov.
2019 a les 17:01:

> May be,
>
> Or you aren t querying for circuitid ( by view class code) , normally the
> urls are with the int pk parameter...
> For this, django-debug-toolbar can help to see what are you quering to db,
> i recommend to install and play with this great tool
>
> I will read about, i want to know whats happening
>
>
>
>
> El dt., 26 de nov. 2019, 16:47, Patrick Carra  va
> escriure:
>
>> Could it possibly be that it is trying to match this entire value?
>> /viewLit/edit/circuit/STTK-100G-18040-01-WRBB/ and if so what am I doing
>> wrong in my urls and views that I am not dropping /viewLit/edit/circuit/?
>>
>> --
>> 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/0f2a1551-27b4-42c0-b251-e17dcb264ab2%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/0f2a1551-27b4-42c0-b251-e17dcb264ab2%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/CAK-JoTTOwuvpLG2M_C2wg3bH5Zuy0_hjApakBwtDpE43OSNmPA%40mail.gmail.com.


Re: Trying to update a record using UpdateView Error: Circuitinfotable matching query does not exist

2019-11-26 Thread Gil Obradors
May be,

Or you aren t querying for circuitid ( by view class code) , normally the
urls are with the int pk parameter...
For this, django-debug-toolbar can help to see what are you quering to db,
i recommend to install and play with this great tool

I will read about, i want to know whats happening




El dt., 26 de nov. 2019, 16:47, Patrick Carra  va
escriure:

> Could it possibly be that it is trying to match this entire value?
> /viewLit/edit/circuit/STTK-100G-18040-01-WRBB/ and if so what am I doing
> wrong in my urls and views that I am not dropping /viewLit/edit/circuit/?
>
> --
> 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/0f2a1551-27b4-42c0-b251-e17dcb264ab2%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/CAK-JoTSvEm86x4hKPXcGNzWstyvQvjHPyOWh6-_JtCJEn%2BrLyw%40mail.gmail.com.


Re: Trying to update a record using UpdateView Error: Circuitinfotable matching query does not exist

2019-11-25 Thread Gil Obradors
Hi!
Matching query doesn't exists says that this entry with this id not exists
in db
Are you sure that this object exists? STTK-100G-18040-01-WRBB

Can you open a shell and:

from xxx.models import Circuitinfotable
obj = Circuitinfotable.objects.all()
print(len(obj))
obj = Obj.get(circuitid='STTK-100G-18040-01-WRBB')
print(obj)


Are you following me?
Or confirm that exists via admin?




Missatge de Patrick Carra  del dia dl., 25 de nov.
2019 a les 22:37:

> Sorry I forgot one! My models.py for this class is below:
>
> class Circuitinfotable(models.Model):
>id1 = models.IntegerField(blank=True, null=True)
>pid = models.CharField(max_length=255, blank=True, null=True)
>circuitid = models.CharField(primary_key=True, max_length=255, blank=
> False, null=False)
>bandwidth = models.CharField(max_length=255, blank=True, null=True)
>region = models.CharField(max_length=255, blank=True, null=True)
>bw = models.IntegerField(blank=True, null=True)
>tableaupathname = models.CharField(max_length=255, blank=True, null=
> True)
>handoffalocaddress = models.CharField(max_length=255, blank=True, null=
> True)
>handoffaloccity = models.CharField(max_length=255, blank=True, null=
> True)
>handoffalocst = models.CharField(max_length=255, blank=True, null=True)
>alocationaddress = models.CharField(max_length=255, blank=True, null=
> True)
>alocationcity = models.CharField(max_length=255, blank=True, null=True)
>alocst = models.CharField(max_length=255, blank=True, null=True)
>handoffzlocaddress = models.CharField(max_length=255, blank=True, null=
> True)
>carrier = models.CharField(max_length=255, blank=True, null=True)
>handoffzloccity = models.CharField(max_length=255, blank=True, null=
> True)
>handoffzlocst = models.CharField(max_length=255, blank=True, null=True)
>zlocationaddress = models.CharField(max_length=255, blank=True, null=
> True)
>zlocationcity = models.CharField(max_length=255, blank=True, null=True)
>zlocst = models.CharField(max_length=255, blank=True, null=True)
>segmentid = models.CharField(max_length=255, blank=True, null=True)
>segmenttype = models.CharField(max_length=255, blank=True, null=True)
>status = models.CharField(max_length=255, blank=True, null=True)
>purpose = models.CharField(max_length=255, blank=True, null=True)
>installdate = models.DateField(blank=True, null=True)
>termdate = models.DateField(blank=True, null=True)
>termlengthmos = models.IntegerField(blank=True, null=True)
>legacy = models.CharField(max_length=255, blank=True, null=True)
>installciopsticket = models.CharField(max_length=255, blank=True, null=
> True)
>retermciopsticket = models.CharField(max_length=255, blank=True, null=
> True)
>discociopsticket = models.CharField(max_length=255, blank=True, null=
> True)
>notes = models.CharField(max_length=255, blank=True, null=True)
>kma = models.CharField(max_length=255, blank=True, null=True)
>group = models.IntegerField(blank=True, null=True)
>cktidkey = models.IntegerField(blank=True, null=True)
>visiolink = models.CharField(max_length=255, blank=True, null=True)
>latestjiraticket = models.CharField(max_length=255, blank=True, null=
> True, unique=True)
>disconnectdate = models.DateField(blank=True, null=True)
>segmentname = models.CharField(max_length=255, blank=True, null=True)
>mrcnew = models.TextField(blank=True, null=True)  # This field type is
> a guess.
>termyrs = models.IntegerField(blank=True, null=True)
>monthbudget = models.IntegerField(blank=True, null=True)
>monthdisco = models.IntegerField(blank=True, null=True)
>mrcold = models.TextField(blank=True, null=True)  # This field type is
> a guess.
>kmz = models.CharField(max_length=255, blank=True, null=True)
>
> class Meta:
>managed = False
>db_table = 'circuitinfotable'
>
> def __str__(self):
>return self.circuitid
>
> def get_absolute_url(self):
>return reverse('home')
>
>
>
> --
> 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/b407aac9-aec7-4e45-b91a-9864c4be2d80%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/CAK-JoTRKYihP_1DAqOudi5dHfGb5b0pi3%3DtBM04yOZ7-6OoRgA%40mail.gmail.com.


Re: What technology can Django do to paginate the content page of a single article Do not use front-end JS to page content. If you just use Django technology to page a single article content page.

2019-11-17 Thread Gil Obradors
Hi zbpython-cn,
I don't know any.
You must create it.
It depends of the origen of the article, db or template

Isn't difficult to achieve


Best regards


Missatge de zbpython-cn  del dia ds., 16 de nov. 2019 a les
14:53:

> What technology can Django do to paginate the content page of a single
> article Do not use front-end JS to page content. If you just use Django
> technology to page a single article content page.I searched a lot of
> information. It is found that there are many front-end JS pages.
> To develop web with Django, you need to paginate a single article on the
> back end.
> What's the idea?
> Especially in the case of text + picture mixing.
> Thank you
>
> django 对单个文章内容页分页,有什么技术实现好? 不用前端 js 对内容分页。单纯的用 django 技术对单个对单个文章内容页分页的话。
>
> 搜了不少信息。发现都是前端js分页的多。
> 用django 开发web,要想实现后端单个文章分页的话。
> 有什么思路好?
>
> 特别是遇到 文字+图片多混合的情况下。
> 谢谢
>
>
>
> --
> 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/f810f012-086d-446a-8a25-8977311a02a4%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/CAK-JoTQFQxg-YbTF1hX4BSioj2o3NiWHrw%3DJMeHq7k8SmPP8Dg%40mail.gmail.com.


Re: How to retrieve data from different related model (This post was posted earlier on but was deleted due code not being clear)

2019-10-24 Thread Gil Obradors
What field of Category you want to get from post model ? name?
maybe k.category instead of k.name? ( template)

Or explain better :P


Missatge de Benedict Uwazie  del dia dj., 24 d’oct.
2019 a les 21:19:

> Thanks, but this did not help
>
> On Thursday, 24 October 2019 19:43:51 UTC+1, Gil Obradors wrote:
>>
>> Hi,
>>
>> I don't know if I understand what you mean...
>>
>> Is this good for you?
>> from first_app.models import Author, Category, Post
>> def post_from_cat(request, cat_id):
>> b = Category.objects.get(pk=cat_id)
>> return render(request, 'first_app/index.html', {'key': b})
>>
>>
>> Missatge de Benedict Uwazie  del dia dj., 24 d’oct.
>> 2019 a les 18:41:
>>
>>> *Please I am new to using google groups. This post have been posted
>>> earlier but the*
>>> *code was not clear enough*
>>>
>>> I have an issue that I have been battling for a long time I
>>> want to get data out from different related models. I have three
>>> models. Category, Author, Post. The Category model categories my post
>>> that are on the Post model. The issue I am having is this, when I
>>> perform my loop
>>> on my template (i.e html file) I can get data out from my Post model but
>>> I can not
>>> get data out from my Category model. Please I need someone to help me
>>> out or tell me
>>> what I am doing wrong.
>>> below is my sample code for you to know what I am talking about.
>>>
>>>
>>> class Category(models.Model):
>>> name = models.CharField(max_length=100)
>>> tagline = models.TextField()
>>>
>>> def __str__(self):
>>> return self.name
>>>
>>> class Author(models.Model):
>>> name = models.CharField(max_length=200)
>>> email = models.EmailField()
>>>
>>> def __str__(self):
>>> return self.name
>>>
>>> class Post(models.Model):
>>> category = models.ForeignKey(Category, on_delete=models.CASCADE,
>>> null=True, related_name='my_category')
>>> headline = models.CharField(max_length=255)
>>> body_text = models.TextField()
>>> authors = models.ManyToManyField(Author)
>>>
>>>
>>> def __str__(self):
>>> return self.headline
>>> on views.py
>>> from first_app.models import Author, Category, Post
>>> def post_from_cat(request, cat_id):
>>> b = Category.objects.get(pk=cat_id)
>>> result = b.my_category.all()
>>> return render(request, 'first_app/index.html', {'key':result})
>>>
>>> on urls.py
>>> from first_app import views
>>>
>>> urlpatterns = [
>>> path('', views.home_app, name='home_app'),
>>> path('post-cat//', views.post_from_cat,
>>> name='post_from_cat'),
>>> ]
>>>
>>>
>>>
>>> on my template that (my html file)
>>>
>>> {% if key %}
>>> {% for k in key %}
>>> Category:  {{ k.name }}
>>> Title{{ k.headline }}
>>> Body{{ k.body_text }}
>>> 
>>> {% endfor %}
>>> {% else %}
>>> No data
>>> {% 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/493caf8b-d3c8-4033-99ab-e01f9eb4ed93%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/493caf8b-d3c8-4033-99ab-e01f9eb4ed93%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/72e30f40-f636-45fb-88c1-6ac96c5c9c11%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/72e30f40-f636-45fb-88c1-6ac96c5c9c11%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/CAK-JoTTSCEcaOr-uZvR_VXBgqRaS_xVO0h6htHsD7yMRSrGM%3DA%40mail.gmail.com.


Re: How to retrieve data from different related model (This post was posted earlier on but was deleted due code not being clear)

2019-10-24 Thread Gil Obradors
Hi,

I don't know if I understand what you mean...

Is this good for you?
from first_app.models import Author, Category, Post
def post_from_cat(request, cat_id):
b = Category.objects.get(pk=cat_id)
return render(request, 'first_app/index.html', {'key': b})


Missatge de Benedict Uwazie  del dia dj., 24 d’oct.
2019 a les 18:41:

> *Please I am new to using google groups. This post have been posted
> earlier but the*
> *code was not clear enough*
>
> I have an issue that I have been battling for a long time I
> want to get data out from different related models. I have three
> models. Category, Author, Post. The Category model categories my post
> that are on the Post model. The issue I am having is this, when I perform
> my loop
> on my template (i.e html file) I can get data out from my Post model but I
> can not
> get data out from my Category model. Please I need someone to help me out
> or tell me
> what I am doing wrong.
> below is my sample code for you to know what I am talking about.
>
>
> class Category(models.Model):
> name = models.CharField(max_length=100)
> tagline = models.TextField()
>
> def __str__(self):
> return self.name
>
> class Author(models.Model):
> name = models.CharField(max_length=200)
> email = models.EmailField()
>
> def __str__(self):
> return self.name
>
> class Post(models.Model):
> category = models.ForeignKey(Category, on_delete=models.CASCADE,
> null=True, related_name='my_category')
> headline = models.CharField(max_length=255)
> body_text = models.TextField()
> authors = models.ManyToManyField(Author)
>
>
> def __str__(self):
> return self.headline
> on views.py
> from first_app.models import Author, Category, Post
> def post_from_cat(request, cat_id):
> b = Category.objects.get(pk=cat_id)
> result = b.my_category.all()
> return render(request, 'first_app/index.html', {'key':result})
>
> on urls.py
> from first_app import views
>
> urlpatterns = [
> path('', views.home_app, name='home_app'),
> path('post-cat//', views.post_from_cat, name='post_from_cat'),
> ]
>
>
>
> on my template that (my html file)
>
> {% if key %}
> {% for k in key %}
> Category:  {{ k.name }}
> Title{{ k.headline }}
> Body{{ k.body_text }}
> 
> {% endfor %}
> {% else %}
> No data
> {% 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/493caf8b-d3c8-4033-99ab-e01f9eb4ed93%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/CAK-JoTRD1aF9pnmHToB1oxj4So9x4AeF%3DLzLcsSs_n%2BEXuMQwQ%40mail.gmail.com.


Re: Exception Value: (1048, "Column 'active_year_id' cannot be null")

2019-10-20 Thread Gil Obradors
Maybe you wan to fill this field, so last mail isn t the solution.

Can you paste the code of form? Html amb form py?

The user selects the year, or its automatically filled in view post class ?


El dl., 21 d’oct. 2019, 7:27, Gil Obradors  va
escriure:

> Hi!
> This field cant be null
>
> Add null=True, blank=True
> To parameters of active_year and solved
>
> El dg., 20 d’oct. 2019, 18:58, Rain  va
> escriure:
>
>> Hello Guys Hopefully someone can help me on this.! any help i appreciate
>> it.
>>
>> My Problem is This.. I do my research and still cant figure out what the
>> solution for this..!
>> i do Try alot of things but still cant get this right.
>> what i want is to populate the active_year_id. automatically when
>> submitting the form..
>> Thanks in Advance...
>>
>>
>> My Model Look Like This:
>> And My Views Look Like 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/53f9c9b6-fdb5-4a1a-b2b0-2ef384bd82a5%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/53f9c9b6-fdb5-4a1a-b2b0-2ef384bd82a5%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/CAK-JoTRHqit9_qNzw5yjDzAQW1MFWzo%2Braryi4vsXhAY-QaZ6g%40mail.gmail.com.


Re: Exception Value: (1048, "Column 'active_year_id' cannot be null")

2019-10-20 Thread Gil Obradors
Hi!
This field cant be null

Add null=True, blank=True
To parameters of active_year and solved

El dg., 20 d’oct. 2019, 18:58, Rain  va
escriure:

> Hello Guys Hopefully someone can help me on this.! any help i appreciate
> it.
>
> My Problem is This.. I do my research and still cant figure out what the
> solution for this..!
> i do Try alot of things but still cant get this right.
> what i want is to populate the active_year_id. automatically when
> submitting the form..
> Thanks in Advance...
>
>
> My Model Look Like This:
> And My Views Look Like 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/53f9c9b6-fdb5-4a1a-b2b0-2ef384bd82a5%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/CAK-JoTQexJ0TzYHAw4X7zOoQ6Jn3qQYEvUbqtU2o-DAKndLLOw%40mail.gmail.com.


Re: Django admin no recuerda mi superusuario

2019-10-13 Thread Gil Obradors
Hi Francisco!

What are you trying to do?  Step to step
What is the expected behavior?
What is the real behaviour?
Are you talking to save the password to the browser?



Missatge de DANIEL URBANO DE LA RUA  del dia dg.,
13 d’oct. 2019 a les 22:03:

> Cuando ejecutas un migrate se crean las tablas en la db que tengas en el
> setting
>
> On Sun, 13 Oct 2019, 22:00 Julio Cojom,  wrote:
>
>> Pensé en la BD pero cuando ejecuta manager.py eso debería de afectar la
>> base que tenga en settings. Sera que hay 2 proyectos y ejecutas sobre uno
>> pero necesitas los resultados en otro? Has revisado la tabla de usuarios en
>> la BD para ver si está creado el registro?
>>
>> El dom., 13 de octubre de 2019 1:54 p. m., DANIEL URBANO DE LA RUA <
>> dannybombas...@gmail.com> escribió:
>>
>>> Que base de datos tienes configurada rn el setting.py
>>>
>>> On Sun, 13 Oct 2019, 21:53 DANIEL URBANO DE LA RUA, <
>>> dannybombas...@gmail.com> wrote:
>>>
 No tienes nada que hacer en el setting

 On Sun, 13 Oct 2019, 21:23 Francisco Muller, <
 franciscojavierlevi...@gmail.com> wrote:

> When creating a super user in django with python3 manage.py
> createsuperuser
> and at another time I want to log in to the administrator of my
> project with my super user who does not let me connect with my username 
> and
> password.
> What should I change in the settings so that django can remember my
> superuser account every time I log in?
>
> --
> 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/ccf5f81b-74a4-4149-ab93-76164d056c39%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/CAO_yRT0h9s35OXyr-DUUHs3FsfzBt0dAo2Bn3Xt_wykEY82YBw%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/CAHRQUHmav__1bHK%2Bin-OKrfyUDNzuuybv7PpkpvZ%2Bd8xoQRU%3DQ%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/CAO_yRT1r%2BRw%3DRUG%2BTpYOm1jwNuKFRLDN%2BZyyZ-Y0omfQtB5ZMg%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/CAK-JoTRcarZqwwHnV0qch%3DHrTnwYnOni6MrPrX9wLxicJq9_4A%40mail.gmail.com.


Re: getting error when i changed database sqllite3 to mysql

2019-10-05 Thread Gil Obradors
HI!

Maybe this tutorial can help you
https://medium.com/@a01207543/django-conecta-tu-proyecto-con-la-base-de-datos-mysql-2d329c73192a

(in Spanish)


Missatge de Gulsher Khan  del dia ds., 5 d’oct.
2019 a les 23:36:

> I trying to change default database(sqllite) which is given by the Django.
> I want to use mysql database. I put lots of effort but nothing went well. I
> successfully has been install mysql, mysqlclient, mysql-connector whatever
> i have read in the documentation.
>
> I'm using OS: Ubuntu 19.04
>
> --
> 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/ea48f010-5ea5-4d58-9033-2e83a3e1de06%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/CAK-JoTTn_i5yzUYM0Mp6ayPqXraHy2d732jV4KCu09xKrHZJHQ%40mail.gmail.com.


Re: Reg: Django Error

2019-10-05 Thread Gil Obradors
Hi,

Try without regex, with int indication:

path('articles//', views.year_archive),


https://docs.djangoproject.com/en/2.2/topics/http/urls/

Missatge de anil polineni  del dia ds., 5 d’oct.
2019 a les 3:55:

> @ Dear all,
>
>
> please reslove the  djangoerror
>
> --
> 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/1dcd5a57-efae-455c-8dcc-2afb1dba1e9b%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/CAK-JoTS7VVCeEGEu0PY9e6sXrp6W4TMGSiYFqMgVwbMvdKXaXQ%40mail.gmail.com.


Re: HOW TO DISPLAY THE COLLAPSED DATA IN CARD using django and bootstrap

2019-09-28 Thread Gil Obradors
How do you know? Not seeing in you code


If it were in my desk, I will try first copy a example demo code.  If
works, then template it, but not the second  before the "core" isn't working
Console log browser can give help


Missatge de leb dev  del dia ds., 28 de set. 2019 a
les 10:27:

> js and bootstrap files are loaded correctly.
>
> On Saturday, September 28, 2019 at 10:56:41 AM UTC+3, leb dev wrote:
>>
>> I have a django project that includes cards where each card contains a
>> collapse that will hide or show the data.
>>
>> Problem is once i do a **foreach loop** the cards appear but the collapse
>> is not working and doesn't display any data.
>>
>> I used the below steps:
>>
>> create function in views.py
>> 
>>
>> def displaydata(request,pk):
>> c = cursor.execute('SELECT ID,Nickname_,Date_of_Birth FROM Person_
>> WHERE ID = pk ')
>> print("c ===>",c)
>> return redirect("search")
>> return render(request,"displaydata.html",{"c":c})
>>
>> create URL in urls.py
>> ==
>>
>>  path("displaydata//",displaydata,name = "displaydata")
>>
>> create a template that display the cards
>> =
>>
>>   
>> 
>> {% for obj in object_list %}
>>
>> 
>>
>> 
>> 
>> 
>> > alt="...">
>> 
>> 
>> > "#table-collapsed" caller-id ="" aria-controls="collapse-collapsed"
>> id="heading-collapsed{{obj.0}">
>> 
>>  Details
>>
>> 
>>
>> $(document).on('click','.collapsed d-block',function(){
>>
>> $('#heading-collapsed').attr('caller-id',$(this).attr('id'));
>> });
>> 
>>
>>
>> 
>>
>>
>> create a template that display the **collapsed data**
>> =
>>
>>   {% for row in c %}
>> > aria-labelledby="heading-collapsed">
>> 
>> 
>> 
>> NICKNAME
>> {{ row.1 }}
>> 
>> 
>> DOB
>> {{ row.2 }}
>> 
>> 
>> 
>> 
>>
>> {% endfor %}
>>
> --
> 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/b9f6644b-fe3b-4b5e-9838-cc06d194fb42%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/CAK-JoTQF0pNkGsj5kDjwwDfAxZMg97CFwpAhMg5edA3WU3j1iw%40mail.gmail.com.


Re: HOW TO DISPLAY THE COLLAPSED DATA IN CARD using django and bootstrap

2019-09-28 Thread Gil Obradors
HI!

Can you paste console log from browser? Maybe you can see and error here ,
when you collapse down/up
Can you assure that js files an css files from bootstrap are correctly
loaded? ( network tab of browse debug tools)





Missatge de leb dev  del dia ds., 28 de set. 2019 a
les 9:57:

> I have a django project that includes cards where each card contains a
> collapse that will hide or show the data.
>
> Problem is once i do a **foreach loop** the cards appear but the collapse
> is not working and doesn't display any data.
>
> I used the below steps:
>
> create function in views.py
> 
>
> def displaydata(request,pk):
> c = cursor.execute('SELECT ID,Nickname_,Date_of_Birth FROM Person_
> WHERE ID = pk ')
> print("c ===>",c)
> return redirect("search")
> return render(request,"displaydata.html",{"c":c})
>
> create URL in urls.py
> ==
>
>  path("displaydata//",displaydata,name = "displaydata")
>
> create a template that display the cards
> =
>
>   
> 
> {% for obj in object_list %}
>
> 
>
> 
> 
> 
>  alt="...">
> 
> 
>  "#table-collapsed" caller-id ="" aria-controls="collapse-collapsed"
> id="heading-collapsed{{obj.0}">
> 
>  Details
>
> 
>
> $(document).on('click','.collapsed d-block',function(){
>
> $('#heading-collapsed').attr('caller-id',$(this).attr('id'));
> });
> 
>
>
> 
>
>
> create a template that display the **collapsed data**
> =
>
>   {% for row in c %}
>  aria-labelledby="heading-collapsed">
> 
> 
> 
> NICKNAME
> {{ row.1 }}
> 
> 
> DOB
> {{ row.2 }}
> 
> 
> 
> 
>
> {% endfor %}
>
> --
> 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/4e300433-1840-4f00-9e88-2109d9da625d%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/CAK-JoTT3rKcuNBhckhr1XRRUtdL41rNuhbR3XmJF9d0cZXcn6Q%40mail.gmail.com.


Re: about {% with %}

2019-09-10 Thread Gil Obradors
Hi Mohamed!

It's the open tag for django template language. Very similar to jinja2

https://docs.djangoproject.com/en/2.2/ref/templates/language/

Missatge de mohamed khaled  del dia dt., 10
de set. 2019 a les 17:55:

> what the {% with %}  actually does ???
>
> --
> 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/455a8e15-6eb0-46d0-8d00-b0f4ed8dfd7d%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/CAK-JoTT%3DeoqJa%2Bp6XFxB4z07MOjx1%2BPK1WE5nQdO%2BHKNh1B80A%40mail.gmail.com.


Re: Django + Python new tool creation

2019-09-09 Thread Gil Obradors
t;   
>   
> BHR
>  Created by Praisy
> Email: pra...@companyemail.com
> Participants: Ajith,Rommel,Raakesh,Arun,Gopi,Praisy
> Start date: 09/10/2019
> Completion date: 09/13/2019
> No of participants: 12
> Action Items : Lorem ipsum dolor sit amet, consectetur
> adipiscing elit.
> Sed tincidunt ante et ante congue faucibus quis eu mauris.
> Donec quis ex vitae turpis mattis gravida.
> Praesent ac ipsum porta, eleifend ipsum lacinia, fermentum velit.
> Donec sed ligula maximus, facilisis nulla ut, volutpat felis.
> Fusce egestas ipsum id enim cursus, non ultricies lorem condimentum.
> Nullam at erat dignissim, dapibus nibh ac, dictum nibh.
> Owner: Praisy
> Comments: Maecenas venenatis ligula in ipsum dignissim, nec
> imperdiet nisl tincidunt.
> Nam in magna molestie, scelerisque lorem in, elementum diam.
> Pellentesque scelerisque enim eget ipsum varius pellentesque.
> In eu massa fringilla, dapibus erat et, accumsan massa.l
>   
>
> 
>   
> Amazon.in
>  Created by Vijay
> Emailvij...@companyemail.com
> Participants: Ajith,Rommel,Raakesh,Arun,Gopi,Praisy
> Start date: 09/10/2019
> Completion date: 09/13/2019
> No of participants: 10
> Action Items : Lorem ipsum dolor sit amet, consectetur
> adipiscing elit.
> Sed tincidunt ante et ante congue faucibus quis eu mauris.
> Donec quis ex vitae turpis mattis gravida.
> Praesent ac ipsum porta, eleifend ipsum lacinia, fermentum velit.
> Donec sed ligula maximus, facilisis nulla ut, volutpat felis.
> Fusce egestas ipsum id enim cursus, non ultricies lorem condimentum.
> Nullam at erat dignissim, dapibus nibh ac, dictum nibh.
> Owner: Vijay
> Comments: Maecenas venenatis ligula in ipsum dignissim, nec
> imperdiet nisl tincidunt.
> Nam in magna molestie, scelerisque lorem in, elementum diam.
> Pellentesque scelerisque enim eget ipsum varius pellentesque.
> In eu massa fringilla, dapibus erat et, accumsan massa.l
>   
>
>   
> Amazon NA
>  Created by Joel
> Email:vij...@companyemail.com
> Participants: Ajith,Rommel,Raakesh,Arun,Gopi,Praisy
> Start date: 09/17/2019
> Completion date: 09/21/2019
> No of participants: 10
> Action Items : Lorem ipsum dolor sit amet, consectetur
> adipiscing elit.
> Sed tincidunt ante et ante congue faucibus quis eu mauris.
> Donec quis ex vitae turpis mattis gravida.
> Praesent ac ipsum porta, eleifend ipsum lacinia, fermentum velit.
> Donec sed ligula maximus, facilisis nulla ut, volutpat felis.
> Fusce egestas ipsum id enim cursus, non ultricies lorem condimentum.
> Nullam at erat dignissim, dapibus nibh ac, dictum nibh.
> Owner: Joel
> Comments: Maecenas venenatis ligula in ipsum dignissim, nec
> imperdiet nisl tincidunt.
> Nam in magna molestie, scelerisque lorem in, elementum diam.
> Pellentesque scelerisque enim eget ipsum varius pellentesque.
> In eu massa fringilla, dapibus erat et, accumsan massa.l
>   
>
> 
> // Get the elements with class="column"
> var elements = document.getElementsByClassName("column");
>
> // Declare a loop variable
> var i;
>
> // List View
> function listView() {
>   for (i = 0; i < elements.length; i++) {
> elements[i].style.width = "100%";
>   }
> }
>
> // Grid View
> function gridView() {
>   for (i = 0; i < elements.length; i++) {
> elements[i].style.width = "50%";
>   }
> }
>
> /* Optional: Add active class to the current button (highlight it) */
> var container = document.getElementById("btnContainer");
> var btns = container.getElementsByClassName("btn");
> for (var i = 0; i < btns.length; i++) {
>   btns[i].addEventListener("click", function() {
> var current = document.getElementsByClassName("active");
> current[0].className = current[0].className.replace(" active", "");
> this.className += " active";
>   });
> }
> 
>
> 
> 
>
>
>
>
>
>
> On Monday, September 9, 2019 at 10:30:58 PM UTC+5:30, Gil Obradors wrote:
>>
>> Welcome, one suggestion:
>>
>> -Paste code direct to email or with paste tools. Not attaching files
>>
>> Welcome
>>
>>
>>
>> Missatge de Raakesh Vanaraj  del dia dl., 9 de set.
>> 2019 a les 18:39:
>>
>>> Good day,
>>>
>>> I'm new to Django and a very new beginner, I've to create a tool for my
>>> with Django so I've create one HTML template. If Anyone help to create this
>>> tool?
>>>
>>> Eagerly waiting for your response.
>>>
>>> I've

Re: Django + Python new tool creation

2019-09-09 Thread Gil Obradors
Welcome, one suggestion:

-Paste code direct to email or with paste tools. Not attaching files

Welcome



Missatge de Raakesh Vanaraj  del dia dl., 9 de set.
2019 a les 18:39:

> Good day,
>
> I'm new to Django and a very new beginner, I've to create a tool for my
> with Django so I've create one HTML template. If Anyone help to create this
> tool?
>
> Eagerly waiting for your response.
>
> I've attached  HTML template
>
>
> A brief explanation of the project.
>
> For users panel
>
> Its minutes of meeting tool, our staff's will able to create a meeting
> with HR, admin, Security team.  Once they raised the TT the automated email
> will send to the appropriate team.
>
> For Admin panel:
>
> They are a separate member for each function. Admin can able to change TT
> status, and send conclusion email automated.
>
> Please help me to make this Tool.
>
>
>
>
>
> --
> 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/f9158ef9-f281-47bd-8a04-209145816a00%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/CAK-JoTQZ3m9nJgZJmdHyi9%2BpVu05YiG6mhceS0t_zB2yuBUeqA%40mail.gmail.com.


Re: How to create a a drop-down menu from the logged in username

2019-09-09 Thread Gil Obradors
Combination of
Backend ( django view , for manage data)
Template ( bootstrap nav dropdown menus, for example )






El dl., 9 de set. 2019, 10:29, Sandip Nath  va
escriure:

> Am new to Django. Am trying to build a car rental web site. After logging
> in the home page navbar at the top is showing the "hello " as
> expected. But I want a drop-down menu from that welcome message which will
> contain the user edit profile option, his/her bookings and a logout
> options. I have created edit profile and logout features but they are
> separately shown. How can I bring them under the drop-down menu in the
> "hello  welcome message?
> Please give a detailed explanation.
>
> --
> 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/1a839db3-af01-401b-8f76-a487da4843c8%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/CAK-JoTSmis40%3DUYsCEZaK-DFg%2BGLPCc3aSk_mA2x9kW0dBFhyQ%40mail.gmail.com.


Re: Django River - ModuleNotFoundError: No module named 'river'

2019-09-01 Thread Gil Obradors
With venv deactivated, your are installing onto system library.

If you run django , without venv, you will run with system lib.  Not
recommended.


When you works with venv, you need yo install into this virtal enviorment.
How?
1.- activate venv
2- pip install

And go!

El dg., 1 de set. 2019, 23:26, Kean  va escriure:

> Hi Gil,
>
> Thank you for the response.
> In the first step, I closed the venv, then installed river, (please see
> process below)
> This is when I get the issue of Module not found.
>
> please clarify, are you saying solution is to install django-river with
> venv active and then it will work?
> would I need to unistall the current instance of django-river firs,t and
> then re-install django-river wihen venv active?
>
> Best,
>
> K
>
> On 1 Sep 2019, at 22:05, Gil Obradors  wrote:
>
> Hi,
>
>
> If you deactivate ( close?) venv, and then you install with pip3, it will
> be installet to system.
> If you are using venv, pip3 with venv activated
>
>
> Bests djangos,
>
>
>
>
> Missatge de Kean  del dia dg., 1 de set. 2019 a les
> 21:56:
>
>> Hi,
>>
>> New to Django, but can't seem to get django to run the module.
>> The process I followed:
>>
>> Process.
>>
>> 1) Closed venv
>> 2) shell: pip3 install django-river
>> 3) Add 'river' to Installed_apps in settings.py
>>
>> Please can anyone advise if they have seen this issue before and how
>> resolved?
>>
>> Best,
>>
>> Kean
>>
>>
>> --
>> 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/bdb4011d-a896-4bc7-b968-45719c8b9e4f%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/bdb4011d-a896-4bc7-b968-45719c8b9e4f%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/CAK-JoTQRf%3DZ%2BV6nXa%3DeTDR%3DLU6jqn%3DuV8powdhmvfD7%3D4ouE8w%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAK-JoTQRf%3DZ%2BV6nXa%3DeTDR%3DLU6jqn%3DuV8powdhmvfD7%3D4ouE8w%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/4DB5DF59-AB23-460B-858C-E7C2B22D8598%40gmail.com
> <https://groups.google.com/d/msgid/django-users/4DB5DF59-AB23-460B-858C-E7C2B22D8598%40gmail.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/CAK-JoTQ9LxP%2B37VtbjFyRFZEE1PKxhR9nSKw3Xgjkh-M2hjFCQ%40mail.gmail.com.


Re: Help with Django

2019-09-01 Thread Gil Obradors
Welcome @Elmaco7
You're in the right side!

When you understand this tutorial, you will be prepared to start designing
your project, with the help of thousands of more advanced online tutorials

https://docs.djangoproject.com/en/2.2/intro/tutorial01/


Good luck!


Missatge de Gabriel Araya Garcia  del dia dg.,
1 de set. 2019 a les 22:36:

> 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
>> 
>> .
>>
>
>
> --
> 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
> 
> .
>

-- 
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/CAK-JoTR2P_dWk4f0SB4LADKYZsRVFegMeLb2Zu0tSZdFp-5fzw%40mail.gmail.com.


Re: Django River - ModuleNotFoundError: No module named 'river'

2019-09-01 Thread Gil Obradors
Hi,


If you deactivate ( close?) venv, and then you install with pip3, it will
be installet to system.
If you are using venv, pip3 with venv activated


Bests djangos,




Missatge de Kean  del dia dg., 1 de set. 2019 a les
21:56:

> Hi,
>
> New to Django, but can't seem to get django to run the module.
> The process I followed:
>
> Process.
>
> 1) Closed venv
> 2) shell: pip3 install django-river
> 3) Add 'river' to Installed_apps in settings.py
>
> Please can anyone advise if they have seen this issue before and how
> resolved?
>
> Best,
>
> Kean
>
> --
> 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/bdb4011d-a896-4bc7-b968-45719c8b9e4f%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/CAK-JoTQRf%3DZ%2BV6nXa%3DeTDR%3DLU6jqn%3DuV8powdhmvfD7%3D4ouE8w%40mail.gmail.com.


Re: Call a URLpattern via POST from a Django view through HttpResponseRedirect

2019-09-01 Thread Gil Obradors
Maybe the solution is here

https://docs.djangoproject.com/en/2.2/ref/urlresolvers/#django.core.urlresolvers.reverse
https://stackoverflow.com/questions/13202385/django-reverse-with-arguments-and-keyword-arguments-not-found

Add a name at this view, and return a reverse with kwargs


Good luck


Missatge de Most. Runa  del dia dg., 1 de set. 2019
a les 22:44:

> now i am hot
>
> On Friday, June 14, 2019 at 4:15:51 AM UTC-7, Rohit Thapliyal wrote:
>>
>> Here's the Django view:
>> def get_date(request):
>> if request.method == 'POST':
>> form = DateForm(request.POST)
>> if form.is_valid():
>> date = form.cleaned_data['date']
>> print(type(date))
>> return HttpResponseRedirect('schedule/{date}')
>>
>> else:
>> form = DateForm()
>>
>> return render(request, 'app/date.html', {'form': form})
>>
>> Here is the urls.py file:
>> from django.urls import path
>> from . import views
>>
>> urlpatterns = [
>> path('', views.get_date),
>> path('schedule/', views.get_slot),
>> ]
>>
>>
>> *I want to hit the date URL via the get_date view. But this results in
>> error.*
>>
> --
> 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/670b9fef-8871-4a18-b452-c436d5422f34%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/CAK-JoTTKQo0_b97MFcDO%2B1eLQFT7EMPxguqYVyfwo-Xr23%2Be%2BQ%40mail.gmail.com.


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

2019-09-01 Thread Gil Obradors
I started with django official tutorial :
https://docs.djangoproject.com/en/2.2/intro/tutorial01/

Nice to start APPs, and continue with admin customizations.


Welcome and good luck!

Missatge de Jorge Luis Callalle Torres  del dia dg.,
1 de set. 2019 a les 15:37:

> 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
> 
> .
>

-- 
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/CAK-JoTSfi2eitmgZ7CCrJZ1oFhDpTVN1wZ4WGw0bLHtArxbigQ%40mail.gmail.com.


Re: page not found but url exists

2019-08-26 Thread Gil Obradors
admin/ urls are working fine?
if you put print('hello0) at first line inside cregister, you see at the
console?

If yes the problem is in redirects


Missatge de Kean  del dia dl., 26 d’ag. 2019 a les 19:32:

> Hi Gil,
>
> please see
>
> views.cregister
>
> def cregister(request):
> next = request.GET.get('next')
> form = CUserRegisterForm(request.POST or None)
> if form.is_valid():
> user = form.save(commit=False)
> password1 = form.cleaned_data.get('password1')
> password1 = form.cleaned_data.get('password2')
> user.setpassword(password1)
> user.setpassword(password2)
> user.save()
> new_user = authenticate(username=username, password=password)
> login(request, user)
> if next:
> return redirect('next')
> return redirect('cpage')
>
> context = {
>
> 'form': form,
>
> }
> return render(request, "cregister.html", context)
>
> projectname/urls.py
>
> from django.contrib import admin
> from django.urls import path, include
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('', include('core.urls')),
> ]
>
> Best,
>
> K
> On 26 Aug 2019, at 18:29, Gil Obradors  wrote:
>
> Hi!
>
> Can you paste views.cregister
> and projectname/urls.py ?
>
>
>
> Missatge de Kean  del dia dl., 26 d’ag. 2019 a les
> 19:10:
>
>> Hi,
>>
>> I'm new to Django. I created several urls, in urls.py, however, when I
>> try to navigate to the URL it says page not found.
>> Page not found (404)
>> Request Method: GET
>> Request URL: http://127.0.0.1:8000/register
>>
>> Using the URLconf defined in bnt.urls, Django tried these URL patterns,
>> in this order:
>>
>>1. admin/
>>2. [name='home']
>>3. /login [name='clogin']
>>4. /login/customer [name='cpage']
>>5. /register [name='cregister']
>>6. /register/customer [name='cpage']
>>
>> The current path, register, didn't match any of these.
>>
>>
>>
>>
>>
>> urls.py
>>
>> from django.conf.urls import url
>> from django.urls import path
>> from . import views
>>
>> urlpatterns = [
>>
>> path('', views.home, name='home'),
>> path('/login', views.clogin, name='clogin'),
>> path('/login/customer', views.cpage, name='cpage'),
>> path('/register', views.cregister, name='cregister'),
>> path('/register/customer', views.cpage, name='cpage'),
>> path('/logout', views.clogout, name='clogout'),
>>
>> ]
>>
>>
>> Please can anyone advise, if they had this issue and how they resolved,
>>
>> 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/8a72d003-fcf7-4280-8635-6f4986f3e002%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/8a72d003-fcf7-4280-8635-6f4986f3e002%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/CAK-JoTTb_a4392MBgNy12vVCayYtsxzijfC%3DznY3NK5kP5Bcfg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAK-JoTTb_a4392MBgNy12vVCayYtsxzijfC%3DznY3NK5kP5Bcfg%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/AE4A7AB2-C1BA-42DE-8C45-44D8B3133FCC%40gmail.com
> <https://groups.google.com/d/msgid/django-users/AE4A7AB2-C1BA-42DE-8C45-44D8B3133FCC%40gmail.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/CAK-JoTQOb7nj%3DE9fmcnmS4tONTOfB85sGAfNy0Xr_aF5q8yP3w%40mail.gmail.com.


Re: page not found but url exists

2019-08-26 Thread Gil Obradors
Hi!

Can you paste views.cregister
and projectname/urls.py ?



Missatge de Kean  del dia dl., 26 d’ag. 2019 a les 19:10:

> Hi,
>
> I'm new to Django. I created several urls, in urls.py, however, when I try
> to navigate to the URL it says page not found.
> Page not found (404)
> Request Method: GET
> Request URL: http://127.0.0.1:8000/register
>
> Using the URLconf defined in bnt.urls, Django tried these URL patterns,
> in this order:
>
>1. admin/
>2. [name='home']
>3. /login [name='clogin']
>4. /login/customer [name='cpage']
>5. /register [name='cregister']
>6. /register/customer [name='cpage']
>
> The current path, register, didn't match any of these.
>
>
>
>
>
> urls.py
>
> from django.conf.urls import url
> from django.urls import path
> from . import views
>
> urlpatterns = [
>
> path('', views.home, name='home'),
> path('/login', views.clogin, name='clogin'),
> path('/login/customer', views.cpage, name='cpage'),
> path('/register', views.cregister, name='cregister'),
> path('/register/customer', views.cpage, name='cpage'),
> path('/logout', views.clogout, name='clogout'),
>
> ]
>
>
> Please can anyone advise, if they had this issue and how they resolved,
>
> 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/8a72d003-fcf7-4280-8635-6f4986f3e002%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/CAK-JoTTb_a4392MBgNy12vVCayYtsxzijfC%3DznY3NK5kP5Bcfg%40mail.gmail.com.


Re: Unable to display two forms in a view

2019-08-24 Thread Gil Obradors
Models and forms ?
And/Or the output of print(request.POST) ?

Where you code take you?

   - "Data in fields is incorrect, please try again"?
   - Exceptions?
   - Or  maybe to payment_form.is_valid()  as false?








Missatge de chevalier  del dia ds., 24 d’ag. 2019 a
les 18:49:

> Even after adding the instance i am unable to populate my form. However,
> if i individually populate each form both of them populate.
>
> def updatePayment(request, id):
>> sim  = get_object_or_404(Sim, pk=id)
>> payment = AddPaymentForm(request.POST or None, instance=Payment)
>> if request.method == "POST":
>> payment_form = AddPaymentForm(request.POST or None, instance=Payment)
>> sim_form = UpdatePayment(request.POST, instance=sim)
>> try:
>> if payment_form.is_valid():
>> payment_form.save()
>> sim_form.save()
>> messages.success(request, ("Payment has been updated"))
>> else:
>> messages.warning(request, ("Data in fields is incorrect, 
>> please try again"))
>> except Exception as e:
>> messages.warning(request, ("Error: {}".format(e)))
>> else:
>> form = UpdatePayment(instance=sim)
>> payment = AddPaymentForm(request.POST or None, instance=Payment)
>> context = {'payment': payment, 'form': form,}
>> return render(request, 'payment/updatePayment.html', context)
>>
>>
> Thanks for you help
>
> On Saturday, August 24, 2019 at 9:24:03 AM UTC-7, Gil Obradors wrote:
>>
>> Of course, you don't have poppulated payment_form ? Only initializated,
>>
>> payment_form = AddPaymentForm()
>>
>> If I'm not helping you, please attach more code
>>
>>
>> good luck!
>>
>>
>> Missatge de chevalier  del dia ds., 24 d’ag. 2019 a
>> les 17:37:
>>
>>> I have two related models (Sim and Payment - A Sim can have many
>>> Payment). On searching of Sim (by ID ) i want its detail to be populated in
>>> a form (*which i am able to*). But using the same form i want to save
>>> the details of Payment model as well and want to update the Sim model as
>>> well.
>>>
>>> I am only able to populate only Sim form using the id but the
>>> AddPaymentForm is not populating.
>>>
>>>
>>> def updatePayment(request, id):
>>>> sim  = get_object_or_404(Sim, pk=id)
>>>> payment = AddPaymentForm()
>>>> sim_form = UpdatePayment(request.POST, instance=sim)
>>>> if request.method == "POST":
>>>> # sim_form = UpdatePayment(request.POST, instance=payment)
>>>> payment_form = AddPaymentForm()
>>>> try:
>>>> if payment_form.is_valid():
>>>> payment_form.save()
>>>> sim_form.save()
>>>> messages.success(request, ("Payment has been updated"))
>>>> else:
>>>> messages.warning(request, ("Data in fields is incorrect, 
>>>> please try again"))
>>>> except Exception as e:
>>>> messages.warning(request, ("Error: {}".format(e)))
>>>> else:
>>>> form = UpdatePayment(instance=sim)
>>>> payment = AddPaymentForm()
>>>> context = {'payment': payment, 'form': form,}
>>>> return render(request, 'payment/updatePayment.html', 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/5a7edbc8-7d20-42aa-8d8e-e8c122026a12%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/5a7edbc8-7d20-42aa-8d8e-e8c122026a12%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/d6e0b8b8-437a-468f-a7ec-bcd1e34fa4e5%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/d6e0b8b8-437a-468f-a7ec-bcd1e34fa4e5%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/CAK-JoTTCenz4YkmCb8ZNMJU2hmzyTadBqnme_E7nSmYdpK0e5w%40mail.gmail.com.


Re: Unable to display two forms in a view

2019-08-24 Thread Gil Obradors
Of course, you don't have poppulated payment_form ? Only initializated,

payment_form = AddPaymentForm()

If I'm not helping you, please attach more code


good luck!


Missatge de chevalier  del dia ds., 24 d’ag. 2019 a
les 17:37:

> I have two related models (Sim and Payment - A Sim can have many Payment).
> On searching of Sim (by ID ) i want its detail to be populated in a form 
> (*which
> i am able to*). But using the same form i want to save the details of
> Payment model as well and want to update the Sim model as well.
>
> I am only able to populate only Sim form using the id but the
> AddPaymentForm is not populating.
>
>
> def updatePayment(request, id):
>> sim  = get_object_or_404(Sim, pk=id)
>> payment = AddPaymentForm()
>> sim_form = UpdatePayment(request.POST, instance=sim)
>> if request.method == "POST":
>> # sim_form = UpdatePayment(request.POST, instance=payment)
>> payment_form = AddPaymentForm()
>> try:
>> if payment_form.is_valid():
>> payment_form.save()
>> sim_form.save()
>> messages.success(request, ("Payment has been updated"))
>> else:
>> messages.warning(request, ("Data in fields is incorrect, 
>> please try again"))
>> except Exception as e:
>> messages.warning(request, ("Error: {}".format(e)))
>> else:
>> form = UpdatePayment(instance=sim)
>> payment = AddPaymentForm()
>> context = {'payment': payment, 'form': form,}
>> return render(request, 'payment/updatePayment.html', 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/5a7edbc8-7d20-42aa-8d8e-e8c122026a12%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/CAK-JoTTdn6-iDutuy5u2UcDf%3DoRQYme93dLmBxOiSOWh5zb_bQ%40mail.gmail.com.


Re: How to refresh part of a Django page with AJAX?

2019-08-20 Thread Gil Obradors
HI

I subscribe all @Joseph said, and add:

For url dispatcher, can you try with very different stamentlist regex? I
think you can't have 2 same regex, or if you want, you may treat this route
inside classview

About AJAX,I can't help no more, I'm newbie with AJAX,

I think that is more interesting return responses as JsonResponse,
Maybe now is complicated to restructure the code, but I think is more
powerful at long time.

Only this suggestion


Thank you  :)






Missatge de Joseph Bacchilega  del dia dl., 19 d’ag.
2019 a les 23:10:

> Do not use alerts to debug your JS code.
>
> Use console.log() and/or debugger while keeping your Chrome/Firefox
> console (opens with F12) open.
>
> In this case, try to see what "data" is set to in the response success
> callback function.
>
> > But then I think it should be set to empty because I don't want to be
> redirected to another url.
>
> $.ajax does not redirect you in any way (that's the point of using $.ajax
> over ). You must specify a URL. Default behavior for empty URL is, I
> think, to query the same URL as the page the user is currently visiting.
>
> Your problem is likely in the URL structure: try to manually visit those
> URLs to see if your views.py log fires, then put that link manually in
> $.ajax and, finally, once you've verified that works, replace the manually
> typed link with the template tag {{ }}.
>
> Il giorno domenica 18 agosto 2019 15:18:47 UTC+2, Xiaoyun Huang ha scritto:
>>
>> I am deploying a website using Django. There is an application called
>> 'forum', supporting a discussion forum on my website.
>>
>> The url of the discussion forum is 'XXX.com/forum/roomY'. I want to
>> refresh a div id = ''chat'', which includes a message list, on this page
>> when users click a refresh button. I want to use AJAX to do that.
>>
>>
>> But I find that I could not call the function
>> updatestatementlist(request) to retrieve the updated message list so it can
>> be passed to the on this page.
>>
>>
>> */forum/views.py def updatestatementlist(request):*
>>
>> log.debug("call statementlist function")
>> statements = Statement.objects.filter(discussion=discussion)return 
>> render(request, 'forum/statementlist.html', {
>> 'statements': statements
>> })
>>
>>
>> I cannot see the log info so I think by clicking the button I fail to
>> call this function.
>>
>>
>> The main html page of the discussion forum is */forum/discussion.html*,
>> which is under the template folder. I extract the html code within the div
>> id = "chat" to a separate html */forum/statementlist.html*as suggested
>> here
>> 
>>  and
>> several other SO posts.
>>
>>
>> */forum/discussion.html*
>>
>>  Refresh 
>> {% include 'forum/statementlist.html' %}
>>
>> */forum/statementlist.html*
>>
>> {% recursetree statements %}{% endrecursetree %}
>>
>> *forum.js*
>>
>> //When users click the refresh button
>> $("#Refresh").on("click", function(event){
>> alert("Refresh clicked")
>> $.ajax({
>> url: '',
>> type: "GET",
>> success: function(data) {
>> alert("success")
>> var html = $(data).filter('#chat').html();
>> $('#chat').html(html);
>> }
>> });});
>>
>>
>> I also tried a few other url in this AJAX request: {% url
>> updatestatementlist %}, {% url 'updatestatementlist' %}. But then I think
>> it should be set to empty because I don't want to be redirected to another
>> url. The discussion forum has a url of 'XXX.com/forum/roomY', by clicking
>> the refresh button on this page I only want to refresh the div and fetch an
>> updated statement list from the server.
>>
>>
>> BTW, I can see the two alerts after I click the button.
>>
>>
>> */forum/urls.py*
>>
>> urlpatterns = [...
>> url(r'^(?P[\w-]{,50})/$', views.discussion_forum, 
>> name='discussion_forum'),
>> url(r'^(?P[\w-]{,50})/$', views.statementlist, name='statementlist'),
>>
>> ]
>>
>>
>> /forum/views.py def discussion_forum() is used to load all the
>> information when the user first arrives at this forum.
>>
>>
>> I guess my problem might be that 1) the AJAX is wrong; 2) the url is
>> wrong so that the updatestatementlist() can not be called.
>>
>>
>> Can anyone help me with that? 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/ac926768-d5af-4ac8-9215-217faedad245%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this 

Re: django-admin error

2019-08-18 Thread Gil Obradors
1.-Plese detail more : "But it not run" ?  Any error?  Admin screen withous
the model?
You can try doing with the same with decorator and class:

from django.contrib import admin

@admin.register(Pacientes)
class PacientesAdmin(admin.ModelAdmin)
pass

Share errors, screen, behaveour...


2.- I don't know heroku but maybe for test/demo your selfPC it could be
easy for starting...
Port forwarding and go!




Bests djangos

Missatge de Gabriel Araya Garcia  del dia dg.,
18 d’ag. 2019 a les 21:41:

> 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
 
 .

>>> --
>>> 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
>>> 
>>> .
>>>
>> --
>> 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
>> 
>> .
>>
>
>
> --
> 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
> 
> .
>

-- 
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/CAK-JoTRhFtARycAprSZnOH77GnqUMGNNiArtrUpN__Qj1-%2Bjww%40mail.gmail.com.


Re: Cómo se pronuncia Convert date field to value 1

2019-08-16 Thread Gil Obradors
Hi!

For mi, You need 2 models:
-users
-attention


Users save the persons
Atention save one attend event

Atention, will have : -date datefield,  user foreignkey(users)


Then you can do query sets like, how many attentions has Pepito. How many
attentions has Pepito this mounth,  last days... this year.

I recommend you a lite of reading:
https://docs.djangoproject.com/en/2.2/topics/db/models/


PD: if is more easy for you, you  can do 1 model, adding user atribute to
attention

PD2: may be if you play with django-admin, you will understand a greater
idea from Models

Thanks!






Missatge de Harold A  del dia dv., 16 d’ag. 2019 a les
3:35:

> Hello everyone, I am a beginner in Django. I would like you to guide me on
> how to solve the next problem I have.
>
>
> In my application I have fields from date01 = models.DataFiled(blank =
> True, null = True) *to* date31 = models.DataFiled(blank = True, null =
> True), This to know the number of days a person attended during the month .
> Depending on the dates saved in the fields. And show the dates you attended
> and the sum of the days during the month.
>
> Example: Juan attended 15 days, Pedro attended 20 days.
>
>
> Thanks for the 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/a8f0411a-e289-4a39-bfb2-c87047d1b33d%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/CAK-JoTTj8RHxh4yGC4V87KGEam5a%2BZPY-5e9QCoGDixzXHRKKA%40mail.gmail.com.


Re: request for advice

2019-08-11 Thread Gil Obradors
For starting sqlite is enought! And better if you havn t got skills about
sysadmin and postgresql


Postgresql have more benkmarch, you can search posts in google

But is not good idea buy a bus to carry 2 people.  ( my opinion )

El dg., 11 d’ag. 2019, 18:51, ajoeiam  va escriure:

> Greetings
>
> Just beginning the odyssey of learning not only Django but also Python (3)
> for use in construction a web application.
> (Working on Debian testing but may be moving to stable if necessary.)
>
> Looking for advice on the application framework.
>
> Application proposed design is like this:
>
> application does not reside on the user's computer
>
> although the application isn't resident on the user's computer any data
> resulting for the application does reside on the user's computer
>
>
> database of items is present at the application host
>
> list of perhaps a couple thousand items with information on each item in
> up to 100 different 'features'
>
> user can add items for use in the application to the database but said
> information is stored on the user's system (NOT in the main repository)
>
>
> database items are assembled to produce a resultant 'package' (sorry not
> trying to pun!)
>
> any such packages developed (and their composition) are stored on the
> user's computer
>
>
>
> My initial thinking is to use various forms (created in perhaps
> LibreOffice Base or others) on a web application where  Django provides the
> glue between the web browser,
> Postgresql and the application.
>
>
> In searching for development ideas I am finding that SQLite is also
> perhaps usable for use in the fashion that I am presently proposing to use
> Postgresql.
>
>
> Is there a better fit between my application between Postgresql or SQLite?
>
> (Further questions would be cheerfully entertained!)
>
> TIA
>
>
>
>
>
>
>
>
>
>
>
> --
> 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/402b3ed4-b08f-49b8-8f57-952eac6d0d7b%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/CAK-JoTR-uftH%2Bc4nzj9Ysc3XJE2cF1joq_wg5aFOF6MGMWz6sw%40mail.gmail.com.


Re: Is Django + (detailed below) a good fit for this kind of application?

2019-08-11 Thread Gil Obradors
Welcome,
With this information, yes!




El dg., 11 d’ag. 2019, 18:51, ajoeiam  va escriure:

> Greetings
>
> Am beginning the odyssey of not only learning Django but also Python3
> (ain't life interesting - - - - grin).
>
> Working on an application taht I would like to work something like this:
>
>
> application uses a not large database of items (maybe a few thousand in
> total but the user can add items to the database)
>
> --
> 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/dcfdae60-6b14-4c01-93c1-81e97a9cdc9b%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/CAK-JoTRkXLz3cjKx5NAy92sfpRNDshvbX-AFHWua0w-AadXhtw%40mail.gmail.com.


Re: How to overwrite the Django Admin Panel

2019-08-05 Thread Gil Obradors
Hi,

If you are a beginner I don't recommend,
BUT, is an interesting practice or challange , so go ;)


https://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-admin-templates



Missatge de Pravin Yadav  del dia dl., 5 d’ag. 2019 a
les 13:08:

> Hello Friends,
>
> I want to overwrites the Django Admin Template.
> If anyone have good way please suggest me.
>
>
> Thanks,
> Pravin Yadav
>
> --
> 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/CAEr6%3DdzOj7MksWGE73JOBcoayOd%3D6L9QHgipAHbTJF2mawSaTg%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/CAK-JoTQ0XyhAUsc7RquLT%2BfP-jHWPN5__XZ3L_adFc6FR%3DiApQ%40mail.gmail.com.


Re: formset has_changed always return true.

2019-06-11 Thread Gil Obradors
Can you paste codes?  Forms.py and views.py

El dc., 12 de juny 2019, 1:24, Mei B  va escriure:

> Yes I am already instantiated the form and check has_changed after.
>
> On Tuesday, June 11, 2019 at 8:59:46 AM UTC-7, Gil Obradors wrote:
>>
>> Hi!
>> Have you instanced first de form?
>> Maybe this code from djano help you
>>
>> from django.http import HttpResponseRedirectfrom django.shortcuts import 
>> render
>> from .forms import NameForm
>> def get_name(request):
>> # if this is a POST request we need to process the form data
>> if request.method == 'POST':
>> # create a form instance and populate it with data from the request:
>> form = NameForm(request.POST)
>> # check whether it's valid:
>> if form.is_valid():
>> # process the data in form.cleaned_data as required
>> # ...
>> # redirect to a new URL:
>> return HttpResponseRedirect('/thanks/')
>>
>> # if a GET (or any other method) we'll create a blank form
>> else:
>> form = NameForm()
>>
>> return render(request, 'name.html', {'form': form})
>>
>>
>> Maybe you can check has_changed() after  form=
>> Nameofyourforminformspy(request.POST) ?
>> good luck
>>
>>
>> https://docs.djangoproject.com/en/2.2/topics/forms/
>> https://docs.djangoproject.com/en/2.2/topics/forms/formsets/
>>
>> Missatge de Mei B  del dia dt., 11 de juny 2019 a
>> les 4:33:
>>
>>>if request.method == "POST":
>>> formset = forms.Formset(data=request.POST, initial=initial)
>>> if not formset.has_changed(): #has_changed always returns
>>> true!
>>> msg = "No changes detected."
>>>
>>> if formset.has_changed() and formset.is_valid()
>>> do stuff...
>>> else:
>>> formset = forms.Formset(initial=initial)
>>> formset_get = formset
>>>
>>> What am i doing wrong?
>>>
>>> --
>>> 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 post to this group, send email to django...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/23af35da-2f85-4512-9842-6b6811f3988b%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/23af35da-2f85-4512-9842-6b6811f3988b%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/6c34158d-cbd0-4839-b35b-edbfea16a535%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/6c34158d-cbd0-4839-b35b-edbfea16a535%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK-JoTSAy9RQULpFUac-rXnMFgQKcMx9QvJPiTQuE%3D7%3DNr%2BzqA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: formset has_changed always return true.

2019-06-11 Thread Gil Obradors
Hi!
Have you instanced first de form?
Maybe this code from djano help you

from django.http import HttpResponseRedirectfrom django.shortcuts import render
from .forms import NameForm
def get_name(request):
# if this is a POST request we need to process the form data
if request.method == 'POST':
# create a form instance and populate it with data from the request:
form = NameForm(request.POST)
# check whether it's valid:
if form.is_valid():
# process the data in form.cleaned_data as required
# ...
# redirect to a new URL:
return HttpResponseRedirect('/thanks/')

# if a GET (or any other method) we'll create a blank form
else:
form = NameForm()

return render(request, 'name.html', {'form': form})


Maybe you can check has_changed() after  form=
Nameofyourforminformspy(request.POST) ?
good luck


https://docs.djangoproject.com/en/2.2/topics/forms/
https://docs.djangoproject.com/en/2.2/topics/forms/formsets/

Missatge de Mei B  del dia dt., 11 de juny 2019 a
les 4:33:

>if request.method == "POST":
> formset = forms.Formset(data=request.POST, initial=initial)
> if not formset.has_changed(): #has_changed always returns
> true!
> msg = "No changes detected."
>
> if formset.has_changed() and formset.is_valid()
> do stuff...
> else:
> formset = forms.Formset(initial=initial)
> formset_get = formset
>
> What am i doing wrong?
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/23af35da-2f85-4512-9842-6b6811f3988b%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK-JoTQpoiRmDHMxhGXLDN6ckK6XFNETRukWZGtVRaXEPn6T4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Periodic tasks set through django admin is not working exactly at given interval.

2019-06-07 Thread Gil Obradors
Paste code!
 One thing is every 30 minutes,
Another  at 30minute for each hour,


May be you have the second

El dv., 7 de juny 2019, 16:48, srikanth kadiyala <
srikanthkadiyal...@gmail.com> va escriure:

> Hi,
>   I set my periodic tasks in django admin to run for every 30 minutes
> through Crontab, but tasks are running for every 1hour 30 minutes. Can
> anyone help me to solve this issue.
>
>  I set my timezone to
>   TIME_ZONE = Asia/kolkata
>   USE_TZ = True
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/460bc4f4-85a1-4bad-89e4-1d43c505b0b6%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK-JoTThJgDrzo8L5Vvk8NvWpC1B5f_mb6ognM9AZBjRJDU%3DPA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: What's wrong with this model

2019-05-27 Thread Gil Obradors
Yes, your are adding new field elogin.
Table contains data
You must specify a default on all existing rows, selecting 1 and writing to
console something










Missatge de Saeed Pooladzadeh  del dia dl., 27 de maig
2019 a les 23:52:

> Hello
>
> I made this model and think everything is fine:
>
> class Smodel(models.Model):
>
> eid=models.AutoField(primary_key=True)
># eid=models.IntegerField(default=0)
> elogin = models.CharField(max_length=8)
> epassword= models.CharField(max_length=8)
>
> elikeDay=models.IntegerField(default=0)
> efollowPerDay=models.IntegerField(default=0)
>
>
>
> #esession = models.TextField()
> class Meta:
> db_table = "saeed"
>
>
>   'But when I try to 'make migration
> I get this error:
>
> You are trying to add a non-nullable field 'elogin' to smodel without a
> default; we can't do that (the database needs something to populate
> existing rows).
> Please select a fix:
>  1) Provide a one-off default now (will be set on all existing rows with a
> null value for this column)
>  2) Quit, and let me add a default in models.py
> Select an option:
>
>
> *What is wrong with this model and how can I resolve it?*
>
> regards,
> Saeed
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/dee2a6de-49e9-45c4-8536-0bed15038bd9%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK-JoTRHJaa2-QPE1CJCZnCbQBpGgGQasuNK3%2B5E6TQ6J9bQxw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Mostrar datos en un formulario (inputs) en un template.

2019-04-25 Thread Gil Obradors
Si haces un paste de la vista, te doy 4 pistas de como lo haria yo, però en
funcion de lo que ya tengas.

Sino a vote pronto yo algo parecido como:

def vistaformulario(request):
if request.POST:
#SI LLEGAMOS A ESE PUNTO, ES PORQUE EL USUARIO QUIRE
ACTUALIZAR LOS DATOS DEL FORMULARIO
#Cargar valores del formulario
nombre = request.POST['nombre']
dato = request.POST['dato']
...

entradaDB = modeloenladb()
entradaDB.nombre = nombre
...
...
entradaDB.save()
return HttpResponseRedirect('donde queiras re-enviarlo')
else:
# Aqui el usuario esta consultando el fomulario, deberian
cargarse los datos si ya existein, o en caso de que no existan,
formulario en blanco

template = loader.get_template('fichero template')
return HttpResponse(template.render(datos para importar al
template, request))


Que te parece?


Yo lo cargaria con formulario y POST, no con ajax. Pero si sabes hacer post
con ajax, da igual https://www.w3schools.com/jquERY/jquery_ajax_get_post.asp

Saludos



Missatge de Tatiana Mesa  del dia dj., 25 d’abr.
2019 a les 18:35:

> Hola Daniel,
>
> es exactamente lo que quiero y es mas capturo los datos mediante AJAX,
>
> Pero aun no entiendo bien este ultimo paso
>
> "de esa forma des de la plantilla podrías conocer si hay datos previos o
> no, y en caso afirmativo, sea por html o por javascript rellenar el
> formulario con los valores anteriores des de la mizma plantilla."
>
> ya se como mostrarlos, pero no tengo muy claro si el usuario quieres
> cambiar el valor, tambien van alli los otros datos?
>
> me facilitarías un ejemplo por favor.
>
>
> Agradezco mucho tu ayuda.
>
>
>
>
>
>
> El jue., 25 de abr. de 2019 a la(s) 11:06, Tatiana Mesa (
> tatianamesa...@gmail.com) escribió:
>
>> Hola Daniel,
>>
>> no te preocupes, quizás no he sido clara
>>
>>
>> el formulario incial es donde guardamos los datos por primera vez, ahora
>> quiero actualizar esos datos que guarde por primera vez,
>> los quiero actualizar en el mismo formulario, pero viendo los datos en
>> guarde en los inputs.
>>
>>
>>
>> El jue., 25 de abr. de 2019 a la(s) 10:48, Ing.Daniel Bojorge (
>> debs.fo...@gmail.com) escribió:
>>
>>> Cuando te refieres al inicial, es cuando se cargue el formulario?
>>> Disculpa no entiendo bien tu consulta.
>>>
>>>
>>>
>>> Dios L@s Bendiga
>>>
>>> Saludos,
>>>
>>>
>>>
>>> [image: --]
>>>
>>> daniel.bojorge
>>> [image: http://]about.me/daniel.bojorge
>>> <http://about.me/daniel.bojorge?promo=email_sig>
>>>  *Curso Desarrollo Web con Python usando Django 2.1 Para Principiantes*
>>> <https://goo.gl/oeT5Sx>
>>> *WebService RestFul API con Python usando Django RestFrameWork*
>>> <https://goo.gl/j8i34C>
>>> *Fácil Replicación de Cualquier Base de Datos y/o Sistema Operativo*
>>> <https://goo.gl/HjtExs>
>>> *Programación en Capas (Web y Escritorio)* <https://goo.gl/zGZpSD>
>>> Mi Blog <http://debsconsultores.blogspot.com>
>>> Nicaragua
>>>
>>> "Si ustedes permanecen unidos a mí, y si permanecen fieles a mis
>>> enseñanzas, pidan lo que quieran y se les dará.
>>> (Juan 15:7 DHH)
>>> Bendito el varón que se fía en el SEÑOR, y cuya confianza es el SEÑOR.
>>> (Jeremías 17:7 RV2000)
>>>
>>>
>>>
>>> El jue., 25 abr. 2019 a las 9:39, Tatiana Mesa (<
>>> tatianamesa...@gmail.com>) escribió:
>>>
>>>> Hola,
>>>>
>>>> 1.tengo un formulario donde inicialmente lo lleno y guardo unos datos
>>>> en la base.
>>>> 2. hago una consulta para traer esos registros de la base de datos.
>>>> 3. Ahora quiero que en ese mismo formulario, en el inicial, se muestren
>>>> esos datos que guarde en un principio.
>>>>
>>>> para hacer un tipo de update, pero sobre ese mismo formulario, es como
>>>> si el usuario viera lo que guardo en un principio y pueda decidir si quiere
>>>> cambiarlo o no
>>>>
>>>> El jue., 25 de abr. de 2019 a la(s) 09:44, Gil Obradors (
>>>> gil.obrad...@gmail.com) escribió:
>>>>
>>>>> Buenas,
>>>>>
>>>>> Un update, en caso que los datos ya existen quizas? Sino no lo
>>>>> entiendo?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>

Re: Mostrar datos en un formulario (inputs) en un template.

2019-04-25 Thread Gil Obradors
No se si es la mejor solución, pero para salir del paso yo haría:


-Antes de cargar el formulario, analizar si el usuario tiene alguna entrada
ya en db.
-En caso afirmativo al rendarizar el template pasaría un diccionario/lista
de los datos
-Dentro de la plantilla haria una evaluación {% if datosformulario %} , de
esa forma des de la plantilla podrías conocer si hay datos previos o no, y
en caso afirmativo, sea por html o por javascript rellenar el formulario
con los valores anteriores des de la mizma plantilla.

Que te parece? Seria una versión simple.
Con ajax también lo podrías hacer, seria lo mismo sin trabajar con el
template de django. Debe valorarse que mas conviene, para mi intentaría
trabajar el mínimo el navegador  y mas el servidor, pero puede ser
limitante en algunas ocasiones



Saludos !



Missatge de Ing.Daniel Bojorge  del dia dj., 25
d’abr. 2019 a les 17:48:

> Cuando te refieres al inicial, es cuando se cargue el formulario?
> Disculpa no entiendo bien tu consulta.
>
>
>
> Dios L@s Bendiga
>
> Saludos,
>
>
>
> [image: --]
>
> daniel.bojorge
> [image: http://]about.me/daniel.bojorge
> <http://about.me/daniel.bojorge?promo=email_sig>
>  *Curso Desarrollo Web con Python usando Django 2.1 Para Principiantes*
> <https://goo.gl/oeT5Sx>
> *WebService RestFul API con Python usando Django RestFrameWork*
> <https://goo.gl/j8i34C>
> *Fácil Replicación de Cualquier Base de Datos y/o Sistema Operativo*
> <https://goo.gl/HjtExs>
> *Programación en Capas (Web y Escritorio)* <https://goo.gl/zGZpSD>
> Mi Blog <http://debsconsultores.blogspot.com>
> Nicaragua
>
> "Si ustedes permanecen unidos a mí, y si permanecen fieles a mis
> enseñanzas, pidan lo que quieran y se les dará.
> (Juan 15:7 DHH)
> Bendito el varón que se fía en el SEÑOR, y cuya confianza es el SEÑOR.
> (Jeremías 17:7 RV2000)
>
>
>
> El jue., 25 abr. 2019 a las 9:39, Tatiana Mesa ()
> escribió:
>
>> Hola,
>>
>> 1.tengo un formulario donde inicialmente lo lleno y guardo unos datos en
>> la base.
>> 2. hago una consulta para traer esos registros de la base de datos.
>> 3. Ahora quiero que en ese mismo formulario, en el inicial, se muestren
>> esos datos que guarde en un principio.
>>
>> para hacer un tipo de update, pero sobre ese mismo formulario, es como si
>> el usuario viera lo que guardo en un principio y pueda decidir si quiere
>> cambiarlo o no
>>
>> El jue., 25 de abr. de 2019 a la(s) 09:44, Gil Obradors (
>> gil.obrad...@gmail.com) escribió:
>>
>>> Buenas,
>>>
>>> Un update, en caso que los datos ya existen quizas? Sino no lo entiendo?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> El dj., 25 d’abr. 2019, 16:09,  va escriure:
>>>
>>>> Buen día,
>>>>
>>>> Vengo trabajando con un formulario en html que captura los datos
>>>> mediante AJAX y los guarda en una base de datos postgres.
>>>>
>>>> Ahora quiero realizar un update, en ese mismo formulario,
>>>>
>>>> De que manera puedo mostrar los datos que guarde en la base de datos,
>>>> en los inputs del formulario, para decidir si quiero dejar esos datos o
>>>> quiero actualizarlos.
>>>>
>>>>
>>>> Agradezco mucho sus soluciones.
>>>>
>>>>
>>>> Este es mi formulario en el que guardo inicialmente
>>>>
>>>>
>>>> {%csrf_token%}
>>>> 
>>>> 
>>>> 
>>>> Tags
>>>> >>> placeholder='Write your tags'
>>>> class='flexdatalist data_tags'
>>>> params='["name"]',
>>>> data-search-in='name'
>>>> data-visible-properties='["name"]'
>>>> data-selection-required='true'
>>>> data-value-property='id'
>>>> data-min-length='2'
>>>> multiple='multiple'
>>>> name='country_id_multiple' required>
>>>> 
>>>> Tono
>>>> 
>>>> 
>>>> {% for t in tones %}
>>>> 
>>>> {{ t.nombre }}
>>>> 
>>>> {% endfor %}
>>>> 
>>>> 
>>>> 
>>>> Tema
>>>> 
>>>> 
>>>> 
>>>> Añadir Tema
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "

Re: Mostrar datos en un formulario (inputs) en un template.

2019-04-25 Thread Gil Obradors
Buenas,

Un update, en caso que los datos ya existen quizas? Sino no lo entiendo?







El dj., 25 d’abr. 2019, 16:09,  va escriure:

> Buen día,
>
> Vengo trabajando con un formulario en html que captura los datos mediante
> AJAX y los guarda en una base de datos postgres.
>
> Ahora quiero realizar un update, en ese mismo formulario,
>
> De que manera puedo mostrar los datos que guarde en la base de datos, en
> los inputs del formulario, para decidir si quiero dejar esos datos o quiero
> actualizarlos.
>
>
> Agradezco mucho sus soluciones.
>
>
> Este es mi formulario en el que guardo inicialmente
>
>
> {%csrf_token%}
> 
> 
> 
> Tags
>  placeholder='Write your tags'
> class='flexdatalist data_tags'
> params='["name"]',
> data-search-in='name'
> data-visible-properties='["name"]'
> data-selection-required='true'
> data-value-property='id'
> data-min-length='2'
> multiple='multiple'
> name='country_id_multiple' required>
> 
> Tono
> 
> 
> {% for t in tones %}
> 
> {{ t.nombre }}
> 
> {% endfor %}
> 
> 
> 
> Tema
> 
> 
> 
> Añadir Tema
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/202a9a2b-e6da-49ff-83ec-d884e994b5a9%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK-JoTSaJyJogke1fJ-uWbOia5uWt2Eai23HuUensoKPY8AdjA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: CSRF Verification fails in production for Cross Domain POST request

2019-04-25 Thread Gil Obradors
When I have problems with csrf and POST, I usually put a
print(request.POST) into a view function, to see what the framework recives
from client

help you?


Missatge de suresh  del dia dj., 25 d’abr. 2019 a les
8:20:

> The HTTP_X_CSRFTOKEN header does not match what is inside the csrftoken
> cookie.
>
> How can I examine the cookie? Set-Cookie is not displayed in the
> Response header for Cross Domain requests.
>
> I have already followed instructions found in:
>
>
> https://stackoverflow.com/questions/39254562/csrf-with-django-reactredux-using-axios
>
> Interestingly I found "X-CSRFTOKEN" translates to "HTTP_X_CSRFTOKEN" on
> the server request header.
>
> Thanks for any help.
>
> Suresh
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/q9rj8u%24nlf%241%40blaine.gmane.org
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK-JoTR5wGPvkbHkzcBZELrYL_nGCDbXN3C_SdGPHs4Ci-wOBA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: url not redirecting?

2019-04-21 Thread Gil Obradors
Hi!
You have two entrys with same name

path('', views.post_new, name='new_post'),
path('', TemplateView.as_view(template_name='new_post.html'), name=
'new_post'),

Try to change one


Regards

El dg., 21 d’abr. 2019, 16:18,  va escriure:

> Hello, i'm attempting to redirect to a 'new post' page when someone clicks
> 'New Post'. Problem is, it redirects back to the public_posts page. the url
> in my HTML is {%  url 'new_post' %} but when i inspect the element in my
> browser, it says the href=/public_posts/ and no matter what I do, I can't
> get it to redirect/link correctly.
>
>
> *RELEVANT FILES*
>
> #public_posts/forms.py
>
>
>
> from django import forms
> from .models import Post
>
> class PublicPostForm(forms.ModelForm):
>
> class Meta:
> model = Post
> fields = ('title', 'text',)
>
>
>
> #public_posts/urls.py
>
>
> from django.urls import path
> from django.conf.urls import url
> from . import views
> from django.views.generic import TemplateView
>
> urlpatterns = [
> path('', views.pub_post_list, name='pub_posts'),
> path('', views.post_new, name='new_post'),
> path('', TemplateView.as_view(template_name='new_post.html'), name=
> 'new_post'),
> path('', TemplateView.as_view(template_name='pub_posts.html'), name=
> 'pub_posts'),
> ]
>
>
>
> #public_posts/views.py
>
>
> from django.shortcuts import render
> from django.utils import timezone
> from .models import Post
> from django.urls import reverse_lazy
> from django.views import generic
> from django.http import HttpResponseRedirect
> from django.shortcuts import render
> from .forms import PublicPostForm
>
> # Create your views here.
>
> def pub_post_list(request):
>
> posts = Post.objects.filter(published_date__lte=timezone.now()).
> order_by('published_date')
> return render(request, 'public_posts/pub_posts.html', {'posts': posts
> })
>
> def post_new(request):
> form = PublicPostForm()
> posts = Post.objects.filter(published_date__lte=timezone.now()).
> order_by('published_date')
>
> #if this is a POST request we need to process the form data
>
> if request.method == 'POST':
> # create a form instance and populate it with data from the
> request:
> form = PublicPostForm(request.POST)
> # check whether it's valid:
> if form.is_valid():
> # process the data in form.cleaned_data as required
> post.publish()
> post.save()
>
> # redirect to a new URL:
> #return HttpResponseRedirect('/new_post/') Commented out to
> try render()
> return render(request, 'public_posts/new_post.html', {'form':
> form})
>
> # if a GET (or any other method) we'll create a blank form
> else:
> form = PublicPostForm()
> return render(request,  'public_posts/new_post.html', {'posts': posts
> })
>
>
>
>
> #public_posts/models.py
>
>
> from django.conf import settings
> from django.db import models
> from django.utils import timezone
> from django.utils.http import urlquote
> from django.utils.translation import ugettext_lazy as _
> from django.core.mail import send_mail
> from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin
> from django.contrib.auth.models import BaseUserManager
> from django.contrib.auth import get_user_model
>
>
> User = get_user_model()
>
>
> class Post(models.Model):
> author = models.ForeignKey(User, related_name='pub_poster', on_delete=
> models.CASCADE)
> title = models.CharField(max_length=200)
> text = models.TextField()
> created_date = models.DateTimeField(default=timezone.now)
> published_date = models.DateTimeField(blank=True, null=True)
>
> def publish(self):
> self.published_date = timezone.now()
> self.save()
>
> def __str__(self):
> return self.title
>
> *URLCONFIG*
>
> from django.contrib import admin
> from django.urls import path, include, resolve
> from django.conf.urls import url
> from admin_posts.views import home
> from public_posts.views import post_new, pub_post_list
> from django.views.generic.base import TemplateView
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('', home, name='home'),
> path('admin_posts/', include('admin_posts.urls')),
> path('', pub_post_list, name='pub_posts'),
> path('', post_new, name='post_new'),
> path('public_posts/', include('public_posts.urls')),
> url(r'^accounts/', include('allauth.urls')),
> path('users/', include('users.urls')),
>
> ]
>
>
>
>
>
> REVELANT HTML
>
>
>
> 
> New Post
> 
>
>
>
>
>
>
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To 

Re: How to provide function calling event for button in django html templates ?

2019-04-20 Thread Gil Obradors
Before continuing with this, read some about http methods like :
https://www.tutorialspoint.com/http/http_methods.htm

Yes, it's suported.

one example function playing with post requests:

def form(request):
form = facturaForm
if request.method == 'POST':
print(request.POST)
return render(request, 'demanoaltaform.html', {'form' : form})


Missatge de Mayur Bagul  del dia ds., 20 d’abr.
2019 a les 9:31:

> hello gil,
>
> thanks for tutorial link i will check it out that one.
> As you gave solution of calling a function via view i did so but it didnt
> worked and another thing i dint understand is about post i thought it didnt
> support in django.
>
> can you please provide me little code your talking about post method?  it
> will be helpful.
>
> thanking you.
>
> On Saturday, April 20, 2019 at 12:52:32 PM UTC+5:30, Gil Obradors wrote:
>>
>> Hi!
>>
>> If you want you can re-use django.contrib.auth package
>> Here one tutorial:
>> https://wsvincent.com/django-user-authentication-tutorial-login-and-logout/
>>
>> Otherwise, you can do a POST to a URL, and this url (url.py) call a
>> function ( views.py)
>>
>> Good luck!
>>
>>
>>
>>
>> Missatge de Mayur Bagul  del dia ds., 20 d’abr. 2019
>> a les 9:17:
>>
>>> Hello Community,
>>>
>>> i'm facing one problem. Scenario is such that i have one template
>>> login.html in Django Project, inside this file i have wrote html code for
>>> login purpose.
>>>
>>> what i want that once user click on Log-In Button it should call
>>> function ( onclick using Javascript cant use in Django) which will check
>>> password and username.
>>> if username and password is Correct then it will go to next page which
>>> is main page else it will return prompt or alert 'Wrong Credentials".
>>>
>>> but im not getting how i can do this in Django ?
>>>
>>> So guys Please help me out of this issue.
>>>
>>> Thanking you,
>>> Mayur Bagul.
>>>
>>> --
>>> 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 post to this group, send email to django...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/0fd23be8-b2d7-437e-b3e7-05c1f5bcdf4e%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/0fd23be8-b2d7-437e-b3e7-05c1f5bcdf4e%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/9986adf9-9f54-4728-892c-361c3cdedd1b%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/9986adf9-9f54-4728-892c-361c3cdedd1b%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK-JoTSpGyYU%3DNO_5_Gd%3Dc4qJ05kg8YkzPW9q%3DgGdc73jmAsvw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to provide function calling event for button in django html templates ?

2019-04-20 Thread Gil Obradors
Hi!

If you want you can re-use django.contrib.auth package
Here one tutorial:
https://wsvincent.com/django-user-authentication-tutorial-login-and-logout/

Otherwise, you can do a POST to a URL, and this url (url.py) call a
function ( views.py)

Good luck!




Missatge de Mayur Bagul  del dia ds., 20 d’abr.
2019 a les 9:17:

> Hello Community,
>
> i'm facing one problem. Scenario is such that i have one template
> login.html in Django Project, inside this file i have wrote html code for
> login purpose.
>
> what i want that once user click on Log-In Button it should call function
> ( onclick using Javascript cant use in Django) which will check password
> and username.
> if username and password is Correct then it will go to next page which is
> main page else it will return prompt or alert 'Wrong Credentials".
>
> but im not getting how i can do this in Django ?
>
> So guys Please help me out of this issue.
>
> Thanking you,
> Mayur Bagul.
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/0fd23be8-b2d7-437e-b3e7-05c1f5bcdf4e%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK-JoTTfycKS-RKGgmHRHza7rNrDM%2B6Ni6yea5H-%2BC7-v4EM2g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Why my email goes to spam?

2019-04-20 Thread Gil Obradors
May be DKIM isn't correctly configured?

Authentication-Results: mx.google.com;
   dkim=fail header.i=@myaa.ir header.s=2019 header.b=Q8G8809R;


Missatge de Mohammad Etemaddar  del dia ds.,
20 d’abr. 2019 a les 8:47:

> Here it is:
>
> 
>
> Delivered-To: arash.etemad...@gmail.com
> Received: by 2002:ab3:7117:0:0:0:0:0 with SMTP id n23csp431925lte;
> Thu, 18 Apr 2019 01:23:17 -0700 (PDT)
> X-Google-Smtp-Source: 
> APXvYqzQO4QTZZjxmg7C1RyW1QDcfvbrcM3P4GBxxK0XOLen8RntVeF2on0PDZMImrmFOwPZDCnp
> X-Received: by 2002:a24:220c:: with SMTP id o12mr2351361ito.1.175797582;
> Thu, 18 Apr 2019 01:23:17 -0700 (PDT)
> ARC-Seal: i=1; a=rsa-sha256; t=175797; cv=none;
> d=google.com; s=arc-20160816;
> b=uRIYsGsfnAGBoj+wV+KSxTcMsU0MUwmQ3tv18vgqDD5xqhkNPZ7eZhxZdeLQchVscZ
>  r+KUvqDaLS9LPH57GWeupv8eiVh4A3lEJOLOei1ZUrAzuFiACkUAju30hsuHGXcqeeSM
>  DoqD79QkhfLq4kJksD8LxKRTJpKNOz9+IzYF1lwpsW8dYMbLqfbNz7SyObVpSDIkG1Un
>  5ChRr4ckHygu6AZM04q0ymvo0PMdpoBsBFl5XYjArsNKIh/v3X+z9DwidCQO/J/kcE+y
>  Xrp+8TjyH2txoxyzmaF0o+C0M9P+RyB8u4dRC3LyYXeqjv7nCY2BZiJicH1faPzNl1LR
>  WVyQ==
> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; 
> s=arc-20160816;
> h=message-id:date:to:from:subject:content-transfer-encoding
>  :mime-version:dkim-signature;
> bh=x1QmOPfmAREqGV3IruUfKZv2zTIATOj5nVQCBw0a1KQ=;
> b=irefjZ7w+DqBs+z4OMgBe2x4SYxIP2pFb9N4UI/6QfdhwqdDMn5FYQGckFOOZhAYEW
>  iEBYptRzLmjsbYxGNoiFycHYD14IycwyXsP7hXUI2NNRm+bgG49Jdf8iqJpkIPOseyZc
>  145rF5dS+jjsbGKa9NoYjUil/f0LSruyyGELt5xjQ3AsMCY4wZzOfJbIRMMwU463dg+j
>  Siz2b9yEnlOFOXmGgZk0ERE2AmVLGVd9+jCnnLCUdWmWqAdbe5PPHOsWVaIYTa9cAfa1
>  QU42jJvk/KcN2PAykDKy4ZTB+ZOcY60EMjGw8VN3F/Ai//3d5QlJKrjmRqxAPLWSNrWx
>  Jlqg==
> ARC-Authentication-Results: i=1; mx.google.com;
>dkim=fail header.i=@myaa.ir header.s=2019 header.b=Q8G8809R;
>spf=pass (google.com: domain of nore...@myaa.ir designates 
> 198.143.182.181 as permitted sender) smtp.mailfrom=nore...@myaa.ir
> Return-Path: 
> Received: from host.myaa.ir ([198.143.182.181])
> by mx.google.com with ESMTPS id a66si894582jaa.81.2019.04.18.01.23.17
> for 
> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
> Thu, 18 Apr 2019 01:23:17 -0700 (PDT)
> Received-SPF: pass (google.com: domain of nore...@myaa.ir designates 
> 198.143.182.181 as permitted sender) client-ip=198.143.182.181;
> Authentication-Results: mx.google.com;
>dkim=fail header.i=@myaa.ir header.s=2019 header.b=Q8G8809R;
>spf=pass (google.com: domain of nore...@myaa.ir designates 
> 198.143.182.181 as permitted sender) smtp.mailfrom=nore...@myaa.ir
> Received: from host.myaa.ir (localhost [IPv6:::1]) by host.myaa.ir (Postfix) 
> with ESMTPSA id 89D20122E25 for ; Thu, 18 Apr 2019 
> 04:23:15 -0400 (EDT)
> DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=myaa.ir; s=2019; 
> t=175796; bh=x1QmOPfmAREqGV3IruUfKZv2zTIATOj5nVQCBw0a1KQ=; 
> h=Subject:From:To:Date:From; 
> b=Q8G8809R+/QKFVgsnQsuEWhJ7VmKvEpbHgNjwsW4eVO6U/s/smEi6WbjlXE8/8kLx
>0mODT/3bws2DD/Q+d7kIKvsE2VQ7GRMuV0cTD6Rt/7CA7YD4zdzuxSRE6499J4uUsJ
>LHoc2mGISKYuIwveu/Pg/+XTXHAKa+ObAHO/rbBnyDZs9Yf1YVMQ+i1+l5XiOzaabH
>rWILAMhGXzlXjbAOR4xHTkcfWiOpDEB7rNZvnQTHOzK+Sfe3kr8m4/0YUtV7oeP2ST
>pA2FRx2zcXbR9Iktf9IIIvWkHTLn/P92vjJXH7+LfG3M3zbx6uXi1zel1JAB2yefSk
>e1e6XZD4+jg0g==
> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 8bit
> Subject: [Myaa.ir] لطفا ایمیل خودتان را تأیید فرمایید
> From: nore...@myaa.ir
> To: arash.etemad...@gmail.com
> Date: Thu, 18 Apr 2019 08:23:15 -
> Message-ID: <17579553.21365.882940801908681...@host.myaa.ir>
>
> Hello from Myaa.ir!
> این ایمیل را به این دلیل دریافت کردید که کاربر arash.etemaddar آدرس ایمیل شما 
> را به عنوان آدرس خود به حساب کاربری خود متصل کرده.
>
> برای تایید درستی این موضوع، به لینک زیر 
> بروید:https://myaa.ir/accounts/confirm-email/MjA:1hH2KA:c6USpdrEt0pkN5SofEBrsav6gqk/
>
> سپاس از طرف Myaa.ir!myaa.ir
>
> 
>
>
> On Thursday, April 18, 2019 at 2:14:30 PM UTC+4:30, Kasper Laudrup wrote:
>>
>> Hi Mohammad,
>>
>> On 18/04/2019 10.05, Mohammad Etemaddar wrote:
>> > Hello. I'm working on a bussiness website. I send invitation and also
>> > confirm emails by django-allauth.
>> > Invitation and allauth emails go to spam box.
>> > I don't know what is the problem?
>> > How can I prevent emails going to spam?
>> >
>>
>> This is hardly related to Django, but anyway...
>>
>> There is really no standard way to detect spam, for good reasons, so it
>> really depends on the mail server receiving the mail.
>>
>> The first thing I would do would be to look at the headers for the mail
>> flagged as spam. Some spam scanners (eg. spamassasin) sets some
>> additional headers with scores it has used to determine the mail is
>> spam. You could use 

Re: Venv

2019-03-30 Thread Gil Obradors
You do it: source /bin/activate

Missatge de John  del dia ds., 30 de març 2019 a
les 19:32:

> Good evening
>
> I've created and activated venv like this:
> $ python3 -m venv 
> $ source /bin/activate
>
> Now Ive ‘deactivate’ the venv
>
> How do I re-activate please?
>
> 
>
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/EA2E8453-8CF9-4F32-9EB6-D364C71D3FD4%40gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK-JoTQ--pE5AKEDwjmv%2BDV_LuxsZ3U22JSmHUFqavR8qEYWGA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re:

2019-03-30 Thread Gil Obradors
Hi Carol,

The next, for example, can be doing all the official tutorial :
https://docs.djangoproject.com/en/2.1/intro/tutorial01/#
This was my way

There are books too, I recommend you this editorial:
https://www.packtpub.com/



Good luck!!






Missatge de carol caro  del dia ds., 30 de març 2019
a les 15:12:

> Hello. I am a new or beginner django developer. Where do I start from
> I have installed python and integrated with Django framework but I don't
> know what to do next
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAN%2Bowc-S7n3OX0jc_fLjro6unDSNZJU4yGbYsxTLGeh55%3DFQvA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK-JoTTsrq6SDbDAkrhRHyafcpxJOq1L1JUyJsV5_A2mKQgMiA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Link does not work correctly

2019-03-10 Thread Gil Obradors
Hi
I can't give you the exactly response,

But I know that you are playing with href=url direct, without using django
template code
I suggest you to change de href of register from about, to a href with
django template code:
Something like : href="{% static 'greenfapp/main.css' %}
But I can't see at urls.py from user app, so I don't know if user apps
register view has any name associociated to

You must write something like href="{ url :'recetas-home' % }  ( nor direct
url)


Good luck


Missatge de Barkalez XX  del dia dg., 10 de març 2019
a les 15:28:

>
> In the browser, when I'm in "http://127.0.0.1:8000/; and click in
> register it takes me to "http://127.0.0.1:8000/register; and it works
> correctly, but if I'm in "http: //127.0.0.1:8000/about/ "and click on
> register takes me to" http://127.0.0.1:8000/about/register/ "instead of"
> http://127.0.0.1:8000/register " . My project :
> https://github.com/barkalez/recetas
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f77b7e65-3e0c-4f29-b951-d052e669fe20%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK-JoTQZpMXi%3DtuVX6jOj73hJfpAhMfDGk6%3DZifWFZ8ucX5E_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Missing manage.py & settings.py

2019-03-06 Thread Gil Obradors
For create it  yourself from 0

El dj., 7 de març 2019, 01:05, lujate  va escriure:

> What purpose does startapp serve when you're only using a pip installed
> app?
>
>
>
> On Wed, Mar 6, 2019, 11:12 AM ambesh chand shahi  wrote:
>
>> You should first type django-admin startproject "your project name".
>>
>> Then if you are using python3 then type python3 manage.py startapp
>> "appname".
>>
>> After that include that app in settings.py in Installed apps.
>>
>>
>> On Tue, 5 Mar 2019, 07:29 lujate,  wrote:
>>
>>> I created a scratch project for R
>>> I did a runserver and confirmed the default landing page.
>>> I added the apps to the settings file per the docs.
>>> I ran a migrate per the docs and got an error on one of the apps.
>>> I tried a runserver and got the same error.
>>> I dug into site-packages and confirmed the app was there.
>>>
>>> I added multiple apps, and there's only an error on one. I don't know if
>>> that's because the others are fine,  or it just stopped at the first error.
>>>
>>> Thanks
>>>
>>> On Mon, Mar 4, 2019, 6:59 PM Mario Martinez >> wrote:
>>>
 Did you run the django-admin startproject your_project_name command?

 On Fri, Mar 1, 2019, 6:13 PM lujate  wrote:

> I pip installed a Django project, but it doesn’t have a manage.py or
> settings.py.  I checked the repo on GitHub, and those files don’t exist
> there either.  Is this an alternate way of doing a Django project that I’m
> not aware of?
>
> FWIW, the project is django-wiki.
>
> TIA
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/30fc5fdc-6bd6-4807-99ff-c41e6e109642%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
 --
 You received this message because you are subscribed to a topic in the
 Google Groups "Django users" group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/django-users/UNcOwcHuox8/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 django-users+unsubscr...@googlegroups.com.
 To post to this group, send email to django-users@googlegroups.com.
 Visit this group at https://groups.google.com/group/django-users.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAOXNLNvP-vePzZj1zEeN-kVRiBPwEk_A6x64aJ0Y312uaegE3w%40mail.gmail.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAA4ZjbSQQP-X6jmaYxGNCjtoSzWTG-ZdwXohYwJv-yo6-2Gwqw%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/UNcOwcHuox8/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CA%2BM-f1c2ycqtZ4i%3DPBs6nS6n9MP6FV959XdmmtGBOb3Sn%3DO5yg%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> 

Re: Hi all

2019-03-05 Thread Gil Obradors
With httpresoponseredirect!
https://docs.djangoproject.com/en/2.1/ref/request-response/#httpresponse-subclasses


Missatge de l'adreça  del dia dt., 5 de març 2019
a les 19:31:

> how can i redirect to Login.html page
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/6ee7553c-7028-4755-84e1-c77c66deab27%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK-JoTTdMDMtW-XZGWDGPUfH1xzrVjL8RbhndDO%2BowkQRhEFEw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re:

2019-02-20 Thread Gil Obradors
Or  python manage.py  or python3 manage.py

Or you not have manage.py inside your dir

Not recommended( i think isn best practice to put +x the file manage.py and
execute directly ./manage.py )

Can you paste ls ?
El dc., 20 de febr. 2019, 13:16, bhushan patil  va
escriure:

> Guys I am not able to run the file manage.py on runserver.Its showing that
> no such file or directory.Can anyone help me 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJ%3Ds-My__xLUdSt6vV%2BJ%2B1AAir8LAfFxX7P9kxf5cG-eFCKEHA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK-JoTSn%2BKYp7Cef_sFmpfmM6mZFkf6h1SRZdF1vbjjXMeBb_w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: My django-admin startproject (project name) is not working

2019-01-31 Thread Gil Obradors
Please , can you copy cmd reply?

Thanks

El dj., 31 de gen. 2019, 12:23, Vkash Poudel  va
escriure:

> My django-admin startproject (project name)  is not working
>
> I have tried alot and alot.But theres always a problem in the cmd
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/17912272-683d-4e0d-8a08-2413fc53bc4e%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK-JoTRHE1j0EYz8MS3iO%2BwkVqGayo0z2PoOfeUBBZDvZheiJg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Begginner

2019-01-30 Thread Gil Obradors
Hi Franjhohn,

With a bit knowleges of python, and time you can start here :
https://www.djangoproject.com/start/
Read and do the first app that is in the manual.

Or you can start with a book : I recommend you this editorial
https://www.packtpub.com/

Else at the beginning is not easy, the learning curve exists. But in the
middle I can assure you will recollect fruits.




Good luck!



Missatge de Frank john thompson  del dia dc., 30 de
gen. 2019 a les 13:24:

> how do i build webside on python using django?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/a9b4d604-f34e-494e-a156-8170aa1e9a75%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK-JoTRpv37HuR53ujSWx6JzcrzCns4VabXOGUEkHgPSE%3DcRag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.