Re: My first django website

2019-10-06 Thread Motaz Hejaze
Tried it on mobile , simple and beautifull , keep the good work !!

On Sun, 6 Oct 2019, 7:25 pm Ehab Al-Qabbani,  wrote:

> Thank you.
> Good luck.
>
>
> Warmest Regards,
> Ehab
> --
> *From:* django-users@googlegroups.com on behalf of Ivan Kasvan <
> ivankas...@gmail.com>
> *Sent:* Sunday, October 6, 2019 7:13 PM
> *To:* django-users@googlegroups.com
> *Subject:* Re: My first django website
>
> Hi,
> This is cool. I tried it and loved it.
> I will also try doing the same.
>
> Regards.
>
> On Sun, 6 Oct 2019 at 03:15, Ehab Al-Qabbani  wrote:
>
>> https://my-private-blog.herokuapp.com/
>>
>> Please try it
>>
>>
>>
>> Warmest Regards,
>> Ehab
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email todjango-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/DB7PR07MB388428ECD7DB6A10C8221A41AB980%40DB7PR07MB3884.eurprd07.prod.outlook.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 todjango-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAB8EzMHSvZVKy1JxgOLgD732hon8bbBnZSo_2r%2Bc_jafgLS54A%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/DB7PR07MB388423C1909FE2F54895FA5CAB980%40DB7PR07MB3884.eurprd07.prod.outlook.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/CAHV4E-fi0uM7_q70-0KX3b_qaBZQePq3HkfQZBTFYGYU67qAww%40mail.gmail.com.


Why would check_password(..) return True but authenticate(.., ..) never return user?

2019-10-06 Thread Christian Seberino
Why would check_password(..) return True but authenticate(.., ..) never 
return user?

See this session in a Django shell below...

>>> u


>>> u.username
'xx'

>>> u.password
'pbkdf2_sha256$10$f3zIUwPXtnEM$zbQdcgPNgRi6CBPQu8wlRg4T7egH80S9bnL0FPunZRo='

>>> u.check_password("yy")
True

>>> django.contrib.auth.authenticate(username="xx", password="yy")
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"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/8e4ce1d6-d997-4f4e-b100-40082343d960%40googlegroups.com.


Channels chat consumer behaves differently in prodcution vs development

2019-10-06 Thread Adam Simon


I am using channels 2.x (along with nginx, daphne, redis and gunicorn) 


In the local console I can see the user data I added in the chat consumer 
but not in my production environment 


(in production everything else works, but the user is undefined. Note: the 
user is logged in.


Does anyone have any idea why that might be?


I followed the doc tutorial and the only thing i added was the line 
commented below


class ChatConsumer(WebsocketConsumer):

def chat_message(self, event): 
message = event['message'] # Send message to WebSocket 
self.send(text_data=json.dumps({
'user': self.scope["user"].first_name, # <<< this is the line I 
added 
'message': message 
}))


Thanks,

Adam 

-- 
You received this message because you are subscribed to the Google Groups 
"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/83adb17f-da67-4c2e-aec2-658566a43e7e%40googlegroups.com.


Re: getting error when i changed database sqllite3 to mysql

2019-10-06 Thread 'Dick in Texas' via Django users
I just got by the ' 'install_as_MySqldb' error.  SQL needed to be in upper 
case.  Now, got new error.  
new error:  mysqlclient 1.3.13 or newer is required; you have 0.9.3.  Does 
it ever end?

On Saturday, October 5, 2019 at 4:37:11 PM UTC-5, Gulsher Khan wrote:
>
> 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/8e617136-2955-4e9a-91aa-52a6f78093ce%40googlegroups.com.


Re: getting error when i changed database sqllite3 to mysql

2019-10-06 Thread 'Dick in Texas' via Django users
I have tried to use a new, empty database, but that did not work.  Still 
got the question if I have installed MySQLclient.

Tried the statements from Desh Deepak.  The install and import went well.  
However, when I tried to migrate, I got the message:  module 'pymysql' has 
no attribute 'install_as_MySqldb'.  I put this statement directly below the 
import statement.


Below is some of my additional background info that may help.

i am begining a django project and want to use MySQL instead of SQLlite.  
So, I watched a video to learn how to use MySQL with Python.  VBased on 
that, I was able to install MySQL into a C:\MySQL directory successfully.  
I also created a database with userid(root) and password.  Then I wrote a 
Python program that read in a CSV file, created a table in the same 
database and then INSERTed the rows into the table.  Also needed to 'import 
mysql.connector'.  Using SQL Workbench, I was able to verify that all was 
successful.  
Next I tried to access this database from Django without success.  Here's 
what I did.  First I created a virtual environment and then activated it.  
Next, ran 'django-admin startproject  .  This created the 
settings file, but it is set up for SQLlite.  I edited this file to change 
these parameters:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'gammon',
'USER':'root',
'PASSWORD':'1ltarty#',
'HOST': 'localhost',
'PORT': '3306',
I skip the 'migrate' step.  Next was 'python manage.py runserver. This 
failed.  I got many error message which I saved in a text file.  At the 
beginning of the messages MySQLdb could not be imported as it couldn't be 
found.  Neat the end of the errors, there is a message asking if I had 
insjtalled mysqlclient.
I have researched these two errors without much success.  I tried to 
install MySQLclient, but always get a message that the requirement was 
already satisfied.  I cannot find any module MySQLdb anywhere on  my PC.  I 
think these two areas are related.  Since I am able to use MySQL with 
vanilla Python successfully, I suspect I have a PATH error perhaps.
I am now at a loss as to what I might try next.  Does anyone have any 
ideas?  All comments appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"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/d4b3ffa0-cab7-473e-8615-993b4aac4609%40googlegroups.com.


Re: Widgets not working for dynamically added formset forms

2019-10-06 Thread Dmitri S.
I meant, when I click on Select2 widget (combobox with autocomplete), list 
of items does not show up. And when I click on calendar icon, calendar does 
not show up.

"It's better to use pure js" - what do you mean exactly? to make new forms 
duplicating existing rather than using django empty_form? or to make 
autocomplete and calendar with pure JS? or...?

воскресенье, 6 октября 2019 г., 17:42:49 UTC+3 пользователь lemme smash 
написал:
>
> okay, but what you actually mean by "widgets don't work"?
> also, from my experience I can say that when you have to work with some 
> dynamic forms is't much better to use pure js on client and only validate 
> it on backend
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/42e930ad-00fc-4ee7-9188-a706f5cdab9d%40googlegroups.com.


Re: Widgets not working for dynamically added formset forms

2019-10-06 Thread Dmitri S.
I meant, when I click on Select2 widget (combobox), list of items does not 
show up. And when I click on calendar icon, calendar does not show up.

"It's better to use pure js" - what to you mean exactly?

воскресенье, 6 октября 2019 г., 17:42:49 UTC+3 пользователь lemme smash 
написал:
>
> okay, but what you actually mean by "widgets don't work"?
> also, from my experience I can say that when you have to work with some 
> dynamic forms is't much better to use pure js on client and only validate 
> it on backend
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/61b4a377-79d2-4894-ac2f-0e18c9ba81cf%40googlegroups.com.


Re: My first django website

2019-10-06 Thread Ehab Al-Qabbani
Thank you.
Good luck.


Warmest Regards,
Ehab

From: django-users@googlegroups.com on behalf of Ivan Kasvan 

Sent: Sunday, October 6, 2019 7:13 PM
To: django-users@googlegroups.com
Subject: Re: My first django website

Hi,
This is cool. I tried it and loved it.
I will also try doing the same.

Regards.

On Sun, 6 Oct 2019 at 03:15, Ehab Al-Qabbani 
mailto:eqabb...@gmail.com>> wrote:
https://my-private-blog.herokuapp.com/

Please try it



Warmest Regards,
Ehab

--
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
todjango-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/DB7PR07MB388428ECD7DB6A10C8221A41AB980%40DB7PR07MB3884.eurprd07.prod.outlook.com.


--
[https://docs.google.com/uc?export=download&id=1HU1MsvFrTmTafW392Rm0bOoTXpgLaFFh&revid=0B3rhYn1QNS7ib3JQZjFPTUdZSnBHeUorcUZNNTRaaXdOVEdnPQ]
[https://docs.google.com/uc?export=download&id=1g7u3KXPb1LhJVIooVRGGqvTe8pjkdhGF&revid=0B3rhYn1QNS7iTExKYW96V3VXajlhRGZ3RS96QUZaMnNYcjhJPQ][https://docs.google.com/uc?export=download&id=1TwsHyRb0Y7BbEHHYB8CFxkPaRXxCeS4H&revid=0B3rhYn1QNS7iRDVjbHFQR2ptSHJCYUZHelF4UDRGY0g0ODQwPQ]

--
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
todjango-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAB8EzMHSvZVKy1JxgOLgD732hon8bbBnZSo_2r%2Bc_jafgLS54A%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/DB7PR07MB388423C1909FE2F54895FA5CAB980%40DB7PR07MB3884.eurprd07.prod.outlook.com.


Re: My first django website

2019-10-06 Thread Ivan Kasvan
Hi,
This is cool. I tried it and loved it.
I will also try doing the same.

Regards.

On Sun, 6 Oct 2019 at 03:15, Ehab Al-Qabbani  wrote:

> https://my-private-blog.herokuapp.com/
>
> Please try it
>
>
>
> Warmest Regards,
> Ehab
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/DB7PR07MB388428ECD7DB6A10C8221A41AB980%40DB7PR07MB3884.eurprd07.prod.outlook.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/CAB8EzMHSvZVKy1JxgOLgD732hon8bbBnZSo_2r%2Bc_jafgLS54A%40mail.gmail.com.


Re: My first django website

2019-10-06 Thread Ehab Al-Qabbani
Thank you for your notice will be considered.


Warmest Regards,
Ehab

From: django-users@googlegroups.com on behalf of Samiul Sk 
Sent: Sunday, October 6, 2019 6:42 PM
To: django-users@googlegroups.com
Subject: Re: My first django website

Hi,  Good work. The only flaw I noticed was in the calendar. When creating a 
post and selecting a date by mouse clicking the calendar is not disappearing.
otherwise good work. Carry on.



On Sun, 6 Oct 2019 at 20:40, Ehab Al-Qabbani 
mailto:eqabb...@gmail.com>> wrote:
Thanks so much

On Sun, Oct 6, 2019 at 4:51 PM Rached Alaya 
mailto:rached.al...@gmail.com>> wrote:
Hi,

I try it ans it's simple and beautiful :)
Keep going :)

Le dim. 6 oct. 2019 à 01:15, Ehab Al-Qabbani 
mailto:eqabb...@gmail.com>> a écrit :
https://my-private-blog.herokuapp.com/

Please try it



Warmest Regards,
Ehab

--
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
todjango-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/DB7PR07MB388428ECD7DB6A10C8221A41AB980%40DB7PR07MB3884.eurprd07.prod.outlook.com.


--
Rached ALAYA
Enseignant et Encadrant à l'EPI
http://episousse.com.tn/
Président et membre fondateur Association CLibre
https://www.clibre.tn
Membre du LoCo Team ubuntu-tn
http://www.ubuntu-tn.org

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed.

--
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
todjango-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE8BnrOu8UHGac7esWgW%2Bi_%2Bu6dZP4XgUm0KwZGp53%2BbqQx4OA%40mail.gmail.com.


--

Best Regards
===
Ehab Saeed Al-Qabbani
Oracle Team Leader
Mobile: +201117083310

--
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
todjango-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAF9M2B_581AFp9yLf%2BiBHNhZLKuivufiqmVpdXgsZ2BvZ-LdpQ%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 
todjango-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPTaHEtvuVqE3ScpiX6FeEvmyjgfFK%3Dx0iz4YrpQFo63QYF5FQ%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/DB7PR07MB3884108EFC7AC5DF7001D280AB980%40DB7PR07MB3884.eurprd07.prod.outlook.com.


Re: My first django website

2019-10-06 Thread Samiul Sk
Hi,  Good work. The only flaw I noticed was in the calendar. When creating
a post and selecting a date by mouse clicking the calendar is not
disappearing.
otherwise good work. Carry on.



On Sun, 6 Oct 2019 at 20:40, Ehab Al-Qabbani  wrote:

> Thanks so much
>
> On Sun, Oct 6, 2019 at 4:51 PM Rached Alaya 
> wrote:
>
>> Hi,
>>
>> I try it ans it's simple and beautiful :)
>> Keep going :)
>>
>> Le dim. 6 oct. 2019 à 01:15, Ehab Al-Qabbani  a
>> écrit :
>>
>>> https://my-private-blog.herokuapp.com/
>>>
>>> Please try it
>>>
>>>
>>>
>>> Warmest Regards,
>>> Ehab
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "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/DB7PR07MB388428ECD7DB6A10C8221A41AB980%40DB7PR07MB3884.eurprd07.prod.outlook.com
>>> 
>>> .
>>>
>>
>>
>> --
>> Rached ALAYA
>> Enseignant et Encadrant à l'EPI
>> http://episousse.com.tn/
>> Président et membre fondateur Association CLibre
>> https://www.clibre.tn
>> Membre du LoCo Team ubuntu-tn
>> http://www.ubuntu-tn.org
>>
>> This email and any files transmitted with it are confidential and
>> intended solely for the use of the individual or entity to whom they are
>> addressed.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "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/CAE8BnrOu8UHGac7esWgW%2Bi_%2Bu6dZP4XgUm0KwZGp53%2BbqQx4OA%40mail.gmail.com
>> 
>> .
>>
>
>
> --
>
> *Best Regards*
> *===*
> *Ehab Saeed Al-Qabbani*
> *Oracle Team Leader*
> *Mobile: +201117083310*
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/CAF9M2B_581AFp9yLf%2BiBHNhZLKuivufiqmVpdXgsZ2BvZ-LdpQ%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/CAPTaHEtvuVqE3ScpiX6FeEvmyjgfFK%3Dx0iz4YrpQFo63QYF5FQ%40mail.gmail.com.


Re: Entire Application in Django shuts down with single error

2019-10-06 Thread Andréas Kühne
Hi again,

I think you are a bit confused about the difference between django and a
php framework. In PHP all pages are php files - and PHP has the stupid
preference to try to run everything, even if there is an error (except when
you have a syntax error - that will also break your php site). What you
referred to in your first question was a syntax error in a python file.
That doesn't compile and therefore runserver won't work. Like I said
earlier - these types of errors halt the runserver. However running a
django application in production, you will be running something else for
serving the python files. So all files that are used for startup, need to
have correct syntax. But if a view file that doesn't get run on startup
doesn't have that, only the process serving the request will stop and not
the entire server.

Mostly when you run a django application you will get an error from a view
file or from a html template. This will not break the entire application,
but only the view for the user requesting invalid data.

So it will not break. Don't forget that Youtube and Instagram are running
on django - they are developed by several thousands of developers, and it
works perfectly.

Andréas


Den tors 3 okt. 2019 kl 09:04 skrev Amit Sharma :

> Hi ,
> I agree with your point and i do follow same. But what my main concern
> here is :--
>
> Can we have in django that if one page has got some error than other page
> do not stop working. This was only thing i want to know. Kindly help.
>
>
>
>
> On Wednesday, October 2, 2019 at 1:19:49 PM UTC+5:30, Andréas Kühne wrote:
>>
>> Hi,
>>
>> You shouldn't use runserver in production - that's not what it's for. So
>> first read how to deploy django in production. When in production, you
>> don't deploy code that doesn't work - so that means that you won't get this
>> issue.
>>
>> You shouldn't work on live working websites - that's not how you do it
>> professionally. You should work locally on your machine and then update the
>> production server WHEN everything works. Allowing someone to work live on a
>> production server is a major issue. Like you said, you will probably crash
>> the server when doing that.
>>
>> Django development is very friendly - as long as you work in the correct
>> way:
>>
>> 1. Work on a development machine - update the changes and run your tests
>> to make sure that everything works as expected.
>> 2. Create a package for the website somehow (git archive, create a docker
>> image or something like that).
>> 2a. Test your code on a staging server.
>> 3. Update your production server with the working code.
>> 4. Restart the application server on the production server.
>>
>> If you follow that mindset it won't be a problem when working  - and this
>> is basically the way you should be working REGARDLESS of what framework you
>> are using. Otherwise you will get changes done in several places - you
>> won't know what is the latest code and so on.
>>
>> The list above is a minimal list - you could of course expand on that as
>> well.
>>
>>
>> Regards,
>>
>> Andréas
>>
>>
>> Den tis 1 okt. 2019 kl 13:13 skrev Amit Sharma :
>>
>>> I am new to Python and django , I worked on C# and php as developer
>>> earlier. My problem here is Entire Application in Django shuts down with
>>> single error.
>>>
>>> for example i start my website with "python3 manage.py runserver
>>> 0.0.0.0:8000" example:-- i have two pages home and register
>>> 1) if i make error in register page code(register.py) , It shuts down
>>> home page too. Is there a way to prevent that as in php and C# in both one
>>> page do not effect other.
>>> 2) how to work in django with team one errors full team hangs.
>>>
>>> 3) How to work with live working websites things may become too risky.
>>>
>>> 4) can we make django development as friendly as C#, PHP  . and
>>> other programming language
>>>
>>> also i am not able to find article related to this. kindly 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/7d81706a-2f84-4f55-a25c-1bae726a8879%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/807cd268-aecc-45db-84b9-6d3371bb5d49%40googlegroups.com
> 

Re: My first django website

2019-10-06 Thread Ehab Al-Qabbani
Thanks so much

On Sun, Oct 6, 2019 at 4:51 PM Rached Alaya  wrote:

> Hi,
>
> I try it ans it's simple and beautiful :)
> Keep going :)
>
> Le dim. 6 oct. 2019 à 01:15, Ehab Al-Qabbani  a
> écrit :
>
>> https://my-private-blog.herokuapp.com/
>>
>> Please try it
>>
>>
>>
>> Warmest Regards,
>> Ehab
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "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/DB7PR07MB388428ECD7DB6A10C8221A41AB980%40DB7PR07MB3884.eurprd07.prod.outlook.com
>> 
>> .
>>
>
>
> --
> Rached ALAYA
> Enseignant et Encadrant à l'EPI
> http://episousse.com.tn/
> Président et membre fondateur Association CLibre
> https://www.clibre.tn
> Membre du LoCo Team ubuntu-tn
> http://www.ubuntu-tn.org
>
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/CAE8BnrOu8UHGac7esWgW%2Bi_%2Bu6dZP4XgUm0KwZGp53%2BbqQx4OA%40mail.gmail.com
> 
> .
>


-- 

*Best Regards*
*===*
*Ehab Saeed Al-Qabbani*
*Oracle Team Leader*
*Mobile: +201117083310*

-- 
You received this message because you are subscribed to the Google Groups 
"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/CAF9M2B_581AFp9yLf%2BiBHNhZLKuivufiqmVpdXgsZ2BvZ-LdpQ%40mail.gmail.com.


Re: My first django website

2019-10-06 Thread Rached Alaya
Hi,

I try it ans it's simple and beautiful :)
Keep going :)

Le dim. 6 oct. 2019 à 01:15, Ehab Al-Qabbani  a écrit :

> https://my-private-blog.herokuapp.com/
>
> Please try it
>
>
>
> Warmest Regards,
> Ehab
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/DB7PR07MB388428ECD7DB6A10C8221A41AB980%40DB7PR07MB3884.eurprd07.prod.outlook.com
> 
> .
>


-- 
Rached ALAYA
Enseignant et Encadrant à l'EPI
http://episousse.com.tn/
Président et membre fondateur Association CLibre
https://www.clibre.tn
Membre du LoCo Team ubuntu-tn
http://www.ubuntu-tn.org

This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.

-- 
You received this message because you are subscribed to the Google Groups 
"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/CAE8BnrOu8UHGac7esWgW%2Bi_%2Bu6dZP4XgUm0KwZGp53%2BbqQx4OA%40mail.gmail.com.


Re: Widgets not working for dynamically added formset forms

2019-10-06 Thread lemme smash
okay, but what you actually mean by "widgets don't work"?
also, from my experience I can say that when you have to work with some 
dynamic forms is't much better to use pure js on client and only validate 
it on backend

On Tuesday, October 1, 2019 at 11:41:28 PM UTC+3, Dmitri S. wrote:
>
> I have a formset with fields with Select2 widgets and a calendar 
> (date-picker) from django app.
>
> And I use dynamic addition of formset forms.
>
>
> When I render a template for the first time, all widgets work fine. *But 
> when I add new formset form, widgets of this new form don't work.*
>
>
> I think, this 
> 
>  ('formset:add') 
> is somehow related to my problem, but I can't figure how to use it.
>
> I also found this: 
>
> $('.django-select2').djangoSelect2();
>
> With this line dropdowns start working, but they become empty.
>
>
> For adding new form I use 'empty form' and this jQuery:
>
> 
> $('.buttons').on('click', '#add_form', function() {
> var form_idx = $('#id_resolution_set-TOTAL_FORMS').val();
> $('#form_set').append($('#empty_form').html().replace(/__prefix__/g, 
> form_idx));
> $('#id_resolution_set-TOTAL_FORMS').val(parseInt(form_idx) + 1);
> });
> 
>
>
> Form in HTML:
>
> {% if mat_id == None %}
>  enctype="multipart/form-data" method="post">
> {% else %}
>  enctype="multipart/form-data" method="post">
> {% endif %}
>
> {% csrf_token %}
> 
> {% for field in form_matter %}
> 
> {% if field.errors %}
> {{ field.errors }}
> {% endif %}
> {{ field.label_tag }}
> {{ field }}
> 
> {% endfor %}
> 
> RESOLUTIONS
>
> 
> {{ formset_resolutions.management_form }}
> {% for form in formset_resolutions %}
> 
> {% for hidden in form.hidden_fields %}
> {{ hidden }}
> {% endfor %}
> {% for field in form.visible_fields %}
> 
> {% if field.errors %}
> {{ field.errors }}
> {% endif %}
> {{ field.label_tag 
> }}
> {{ field }}
> 
> {% endfor %}
> 
> {% endfor %}
> 
> 
> ADD
> SAVE
> 
> 
> 
> {% for field in formset_resolutions.empty_form.visible_fields %}
> 
> {% if field.errors %}
> {{ field.errors }}
> {% endif %}
> {{ field.label_tag }}
> {{ field }}
> 
> {% endfor %}
> 
> 
> 
>
>
> Other scripts:
>
> 
> 
>
> {{ form_matter.media.js }}
>
>
> {{ form_matter.media.js }} are:
>
> 
>
> 
>  src="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.5/js/select2.min.js">
>  src="/static/admin/js/admin/DateTimeShortcuts.js">
> 
>  src="/static/django_select2/django_select2.js">
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/09b7bf10-beb4-4a5d-8f27-3d597c9d18f8%40googlegroups.com.


Re: getting error when i changed database sqllite3 to mysql

2019-10-06 Thread Joseph Emeka
I think you need to create the database "django" on you database  back-end.
And try making migrations again.

On Sat, Oct 5, 2019, 22:36 Gulsher Khan  wrote:

> 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/CA%2B3vCYTX7ouQkiUXEx1xATDNfhLNddr%3D%2BQhqbO%2BzjMuYmEEQPg%40mail.gmail.com.


Re: My first django website

2019-10-06 Thread yashwanth .k
Thank you!

On Sun, Oct 6, 2019 at 6:17 PM Ehab Al-Qabbani  wrote:

> I used "XHTML2PDF"  https://pypi.org/project/django-xhtml2pdf/
>
>
> On Sun, Oct 6, 2019 at 2:36 PM yashwanth .k 
> wrote:
>
>> Nice!,
>> How did you enable post view as pdf,
>> Need some help,
>> Thank you!
>>
>> On Sun, Oct 6, 2019 at 5:45 AM Ehab Al-Qabbani 
>> wrote:
>>
>>> https://my-private-blog.herokuapp.com/
>>>
>>> Please try it
>>>
>>>
>>>
>>> Warmest Regards,
>>> Ehab
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "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/DB7PR07MB388428ECD7DB6A10C8221A41AB980%40DB7PR07MB3884.eurprd07.prod.outlook.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/CALgTQAKCrvW3sDdRqaZZoAoWm1JO0Z4ytB%2BR%3DWC3cBX-2EdHdg%40mail.gmail.com
>> 
>> .
>>
>
>
> --
>
> *Best Regards*
> *===*
> *Ehab Saeed Al-Qabbani*
> *Oracle Team Leader*
> *Mobile: +201117083310*
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/CAF9M2B8Cyt%2BfLrnApyQfdHFqXygHY3k4myBvngGXHMROc99wHg%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/CALgTQAK0_c5g%3DSuxqvf99YHHkk7rx9KX%2B%2BghyoGDiOG4HOYQ9g%40mail.gmail.com.


Re: My first django website

2019-10-06 Thread Ehab Al-Qabbani
I used "XHTML2PDF"  https://pypi.org/project/django-xhtml2pdf/


On Sun, Oct 6, 2019 at 2:36 PM yashwanth .k  wrote:

> Nice!,
> How did you enable post view as pdf,
> Need some help,
> Thank you!
>
> On Sun, Oct 6, 2019 at 5:45 AM Ehab Al-Qabbani  wrote:
>
>> https://my-private-blog.herokuapp.com/
>>
>> Please try it
>>
>>
>>
>> Warmest Regards,
>> Ehab
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "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/DB7PR07MB388428ECD7DB6A10C8221A41AB980%40DB7PR07MB3884.eurprd07.prod.outlook.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/CALgTQAKCrvW3sDdRqaZZoAoWm1JO0Z4ytB%2BR%3DWC3cBX-2EdHdg%40mail.gmail.com
> 
> .
>


-- 

*Best Regards*
*===*
*Ehab Saeed Al-Qabbani*
*Oracle Team Leader*
*Mobile: +201117083310*

-- 
You received this message because you are subscribed to the Google Groups 
"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/CAF9M2B8Cyt%2BfLrnApyQfdHFqXygHY3k4myBvngGXHMROc99wHg%40mail.gmail.com.


Re: My first django website

2019-10-06 Thread yashwanth .k
Nice!,
How did you enable post view as pdf,
Need some help,
Thank you!

On Sun, Oct 6, 2019 at 5:45 AM Ehab Al-Qabbani  wrote:

> https://my-private-blog.herokuapp.com/
>
> Please try it
>
>
>
> Warmest Regards,
> Ehab
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/DB7PR07MB388428ECD7DB6A10C8221A41AB980%40DB7PR07MB3884.eurprd07.prod.outlook.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/CALgTQAKCrvW3sDdRqaZZoAoWm1JO0Z4ytB%2BR%3DWC3cBX-2EdHdg%40mail.gmail.com.


[Django] Any generalised or optimized way of handling multiple class based generic listviews in django ?

2019-10-06 Thread Dilipkumar Noone
Dear Django Users,

I am beginner in Django .

I have multiple generic list views in my django application where each list 
is handled under different navigation item of navigation bar .

Still i need to handle few more list views using class based generic view.

Is there any way to generalize or optimize in handling classbased 
genericlistview which reduces the code size when we need to handle multiple
lists in django application under each navigation item of navbar.?

*Note*: Each navigation item(webpage) has a list  & above the list we have 
a search form with filter button to search for a particular value.
  Each list view handles get_query_set and get_context_data .  

  *get_query_set *displays to retrieve the list of objects for a 
specific filter in a model when GET request occurs.

  *get_context_data* used to display the list of  objects and 
checks if request is GET and requested for a page in a list of pages listed 
using pagination.
  If key is a page continues the loop and it returns the context 
with the list of objects for the requested page as a key.



==
List1:

class GSPDCList(ListView):


List2:

class GSPECList(ListView):

List3:
 =:

List4:
 (ListView):

*This concept i need to apply in my django app with multiple class based 
generic views where each listview specific to diff model and filter 
options.*

*So please suggest and optimized way of handling this requirement 
to reduce the code size.*


Regards,
N.Dilip Kumar.

-- 
You received this message because you are subscribed to the Google Groups 
"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/7cdeceec-7720-44fb-833f-f30db7c00a12%40googlegroups.com.