Re: How to upload pdf files in django

2019-03-03 Thread Derek
Simple tutorial here:

https://simpleisbetterthancomplex.com/tutorial/2016/08/01/how-to-upload-files-with-django.html


On Saturday, 2 March 2019 17:12:01 UTC+2, Akshay Gupta wrote:
>
> and to get back data from form  request.POST['file_name'] ??
>
>
>
> Sent from my Redmi 4
> On mazz ahmed >, 02-Mar-2019 7:35 PM 
> wrote:
>
> Use FileField to upload files.
>
> On Sat, Mar 2, 2019 at 7:01 PM Akshay Gupta  > wrote:
>
>> Can Anyone tell me how to upload pdf files in django
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@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/51e07ac8-9029-4811-be41-c9c9a418602f%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...@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/CABuXbh_2%3DWead%2Bjbh6GZW9dkNawmFa3unLM1bUttW0YiDn4T6A%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/94f9bad1-7a44-4797-a416-7d9651f7beb9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Missing manage.py & settings.py

2019-03-03 Thread Derek
Pretty much *all* the apps you use in your Django project will be installed 
via pip ...

On Saturday, 2 March 2019 06:00:47 UTC+2, lujate wrote:
>
> Interesting. I never thought about doing a pip install of an application. 
> I'm going to have to digest that one. 
>
> 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 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/0b06fa94-c423-4610-ab22-f7e914ecd8c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: My developers have run amok

2019-03-03 Thread Derek
Just because something can be done, does not mean it should be done.

I have always avoided putting large binary files into the DB - why?  
Primarily because the information in them is "dead" - very hard to search 
or filter, which rather defeats the point of using a DB.  Rather leave them 
on disc and add a pointer to each of them.  For one app, I did convert all 
the data in their files (typically Excel or PDF) into "raw text" and stored 
that text in the DB so it was, at least, searchable (but obviously not 
really viewable in that state).

Also, a call like:

ModelWithFileContents.objects.all()

Can be quite overwhelming unless you know what you are doing; rather look 
to extract specific fields that you know you want to display/access.  I 
would imagine that the only time you are going to want to retrieve that 
BLOB (assuming you stick to your current design) is per individual record 
"on request".


On Wednesday, 27 February 2019 03:18:00 UTC+2, Dan Davis wrote:
>
> For the group, the eventual culprit was not complicated.  It is a model 
> with a BinaryField that holds a file's contents. The Django documentation 
> advises against this, but why?   Well, on-premise with big-iron database 
> like Oracle, storing the file in the database is attractive.  So, what's 
> the problem?
>
>   ModelWithFileContents.objects.all()
>
> There you go, even if you are not using the file, its contents will be 
> fetched into memory.
> The solution if it must be at the Django level is to use defer() properly, 
> and add it to the ModelManager.
>
> What I did is to make sure the developer *always* used a database view 
> that doesn't have the binary field for most operations.
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/b4e09fb6-b426-455d-aa3c-7191da404fc1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is there any inline editing the data and delete data in table in Django?

2019-03-03 Thread Derek
Grid / tabular editing outside of the admin is tricky; I have not been able 
to manage it and have not found a good app for it.

Here are some suggested reading:

* https://www.ibm.com/developerworks/library/wa-django/index.html
* https://bossanova.uk/jexcel 
* 
https://medium.com/ag-grid/building-a-crud-application-with-ag-grid-part-4-3189034df922

You'd also need an app like Django REST Framework to handle GET/POST of 
JSON data to populate your grid.

On Wednesday, 27 February 2019 20:39:04 UTC+2, veera nagaraja sankar Inti 
wrote:
>
> need help friends ?..
>
> thq..
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/3862-8662-4392-bd5b-00d07b4de8b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Slide show

2019-03-03 Thread Akshay Gupta
After upload the slides, How to add slides show without download the slides.

-- 
You received this message because you are subscribed to the Google Groups 
"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/5de91292-fc06-47b3-8c45-00b84b73aed0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django connectivity with MySQL service in docker container

2019-03-03 Thread Derek
The good news is that someone already wrote a series of blog posts for you:

* 
http://www.nisanthsojan.com/django-mysql-with-docker%e2%80%8a-a-step-by-step-guide-for-local-development-part-1/
* 
http://www.nisanthsojan.com/django-mysql-with-docker%E2%80%8A-a-step-by-step-guide-for-local-development-part-2/
* 
http://www.nisanthsojan.com/django-mysql-gunicorn-nginx-with-docker%e2%80%8a-a-step-by-step-guide/

On Saturday, 23 February 2019 16:28:21 UTC+2, Devender Kumar wrote:
>
> I am not able to connect my web service with MySQL db service running in 
> docker container both of the services are in docker container. Can any one 
> share config or some notes on this topic I am using gunicron server nginx 
> for reverse proxy MySQL for database.
> And also changes to be made django settings.
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/3b009ed0-330b-4ef8-88a5-be402f2c8977%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Providing help on a website (basic CMS for on-site site documentation)

2019-03-03 Thread Derek
"Surely it's a ubiquitous need"

No, I think not. In the dim and distant past I used to write copious help 
files for various Windows apps ... but on the web?  No one really reads 
manuals or help files any more - your app needs to be simple and obvious to 
use.  

If you are that noble as to still want to write a manual, I'd suggest using 
any number of really good off-line tools and make the manual downloadable 
as a PDF - most of those tools will also generate a series of static 
webpages which you can host quite easily.   Suggestion: ReadTheDocs uses 
Sphinx to generate docs for Python libraries; but there is no reason you 
could not also use that to write end-user documentation.

HTH.

On Friday, 22 February 2019 12:02:27 UTC+2, ukeplayer01 wrote:
>
> Sorry to go off topic but I can recommend HuGo for simple markdown web 
> pages.
> Cheers
> Roger
> On 22/2/19 5:24 pm, Bernd Wechner wrote:
>
> Hmmm, no-one has any thoughts here ... and I'm on ma' own reinventing the 
> wheel? Surely tehre's a canonical way to provide help on Django website . 
> I'm leaning toward simple flatpages app with a tinymce editor for them for 
> the admin.
>
> On Tuesday, 19 February 2019 16:26:57 UTC+11, Bernd Wechner wrote: 
>>
>> I'm at the point of wanting to write some help for a website, the 
>> standard helpfile sort of scenario ;-). If that means little to you, just a 
>> hierarchy of pages that document things and can be linked. 
>>
>> I wrote page one with the Django flatpages app:
>>
>> https://docs.djangoproject.com/en/2.1/ref/contrib/flatpages/
>>
>> But it's not real comfy in terms of editing and maintaining. So I looked 
>> on-line for solutions and of course nothing with "help" in the search terms 
>> is going anywhere fast (finds me a lot of help about Django ;-). so better 
>> keywordss needed but I have found a pile of maybe options and am suddenly 
>> bamboozled by what is vogue, current, maintained, has a lasting future etc.
>>
>> https://github.com/klen/django_markdown
>>
>> Untouched in 4 years with 22 open issues Hmm.
>>
>> And this looks nice:
>>
>> https://github.com/mjr27/django-flatpages-tinymce
>>
>> but untouched in 7 years and 4 open issues. 
>>
>> Now untouched doesn't mean bad, could just be mature, stable and works 
>> perfectly, already fro 7 years. These are the things it's hard to gauge. 
>> But if I'm looking at TinyMCE how about:
>>
>> https://github.com/aljosa/django-tinymce
>>
>> on which it depends. NO bad, updated a month ago to make it work with 
>> Django 2.1 so seems alive! But my site is math heavy so I want equation 
>> ease so how about:
>>
>> And this looks good:
>>
>> https://www.codecogs.com/latex/integration/tinymce_v3/install.php
>>
>> This looks maybe:
>>
>> https://github.com/iCAPLyon1/tinymce-formula
>>
>> This looks unconvincing:
>>
>> https://github.com/foraker/tinymce_equation_editor
>>
>> and do we want this:
>>
>> https://github.com/Tivix/django-flatpages-nav
>>
>> or this as well:
>>
>> Or hang on why do this piecemeal why not use Wagtail from the word go:
>>
>> http://docs.wagtail.io/en/v2.4/index.html
>>
>> Or would wagtail introduce too much coordination trouble between its 
>> templates and my sites ... etc. etc. I'm full of questions and really just 
>> wondering, is there a canonical solution to a site documentation page 
>> hierarchy and managing it nicely?
>>
>> Regards,
>>
>> Bernd.
>>
>>
>> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users...@googlegroups.com .
> To 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/750a97d8-87f9-42f4-997e-5810e1a5c48a%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/25c0c7bc-2fbe-4fa5-833e-e94b188cd826%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Models in admin view

2019-03-03 Thread 'Amitesh Sahay' via Django users
Hello Raghav, 
Once you register something in admin.py, you should see  that update in the 
admin page. Login there and click on "candidates" , now you can add the 
candidates multiple times.


Regards,
Amitesh Sahay91-750 797 8619 

On Friday, 1 March, 2019, 6:34:56 pm IST, raghav b 
 wrote:  
 
 I have created two apps with the name candidate and another training. In the 
Django admin I want to create trainings and add candidates to that. I have 
created candidate and training and registered in the admin view. But for the 
last part I want to add multiple candidates into a training from admin view. 
How can I do this? Please help.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To 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/e11b3b78-be4a-4ac7-a1bd-b452540c7e76%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/2035082347.6155710.1551675184150%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.


SocialAuth through Odnoklassniki: does not register new user

2019-03-03 Thread Roman Izutov
Hi mates,
   I read through the man , created an 
odnoklassniki app, received these things to email:
 Application ID NNN 
 Публичный ключ приложения 
 Секретный ключ приложения 
 Ссылка на приложение https://ok.ru/game/ 
NNN


   And as per instruction from the link  
created a ref on login.html:

> "https://connect.ok.ru/oauth/authorize?client_id=NNN&scope=VALUABLE_ACCESS&response_type=code&redirect_uri=192.168.1.8:1&layout=w";
>> >OK
>>
>
Then on clicking the link on login(in my local app ) it redirects me to the 
odnoklassniki site and asks to use the odnoklassniki account with prompt to 
enter credentials. 
It checks credentianls and forwards me to the link 192.168.1.8:1

But the registration magic has not been done as expected. The site still offers 
to enter credentials. 
With VK the only thing I added is this link
VK
and it works fine. (it's working out of the box of social auth, the same 
success with Google+)

Could someone please forward me to the detailed howto man for odnoklassniki 
authorization(example is prefered)?

Thanx 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 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/c7c6835b-c37f-4def-861e-781ff258230c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to upload pdf files in django

2019-03-03 Thread Luis Zárate
Files come on request.FILES and remember form need to be multipart .



El domingo, 3 de marzo de 2019, Hrishikesh K.B 
escribió:
>
>
> On Saturday, 2 March 2019 20:42:01 UTC+5:30, Akshay Gupta wrote:
>>
>> and to get back data from form  request.POST['file_name'] ??
>
> See https://docs.djangoproject.com/en/2.1/topics/http/file-uploads/
>
>
> --
> You received this message because you are subscribed to the Google Groups
"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/6077d93d-96bc-4790-98fe-0b1788f3c23e%40googlegroups.com
.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
"La utopía sirve para caminar" Fernando Birri

-- 
You received this message because you are subscribed to the Google Groups 
"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/CAG%2B5VyMK_gFGQyyz0vXa3KdGUbT8VyyWTYT1vD9VU6C3kTXvog%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to upload pdf files in django

2019-03-03 Thread Hrishikesh K.B


On Saturday, 2 March 2019 20:42:01 UTC+5:30, Akshay Gupta wrote:
>
> and to get back data from form  request.POST['file_name'] ??
>

See https://docs.djangoproject.com/en/2.1/topics/http/file-uploads/ 


-- 
You received this message because you are subscribed to the Google Groups 
"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/6077d93d-96bc-4790-98fe-0b1788f3c23e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


While Trying to Upload Multiple Files Using Single Form Field with Django Model Form Why i am getting Error no 13.Permission Denied …?

2019-03-03 Thread Sachin Cse
*I found some diififculty to write details here so i given link of my 
question here https://stackoverflow.com/q/54967840/11143159 
*

-- 
You received this message because you are subscribed to the Google Groups 
"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/b065d7f2-d3d0-4221-87dd-3b078f9a28d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


GSOC -2019

2019-03-03 Thread ambesh chand shahi
Guys i want to choose as my organization in GSOC-2019.Can anybody help me
that how can i start contributing for increasing my chances of selection

-- 
You received this message because you are subscribed to the Google Groups 
"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/CA%2BM-f1cgKG2D7pLcE76eekup3m36NUrPVrSvaGVa9yo1RzGVOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.