Re: Adding Microsoft Word Editor to Django

2023-02-01 Thread Thiago Luiz Parolin
There are some alternatives that I can think of.

Libreoffice online: https://www.libreoffice.org/download/libreoffice-online/

Etherpad is a web editor that has a plugin for import docx documents
https://etherpad.org/
https://www.npmjs.com/package/ep_mammoth   - (plugin)

If you can use php:
https://github.com/PHPOffice

If you can use odf instead of doc:
https://webodf.org/

This is just my 2 cents, and I have never used these before.
I hope this helps.



*Thiago*


Em qua., 1 de fev. de 2023 às 08:51, o1bigtenor 
escreveu:

> On Wed, Feb 1, 2023 at 2:16 AM Shittu Abdulrasheed
>  wrote:
> >
> > Good day my co django-developers
> >
> > I have a project going on for my client and he want a features where
> users will be able to upload a word documents file and he/she will be able
> to edit the documents in our app just like editing in msword and save it
> back to our database.
> > How can i acheive that?
> > I have try Many WYSIWYG but it is just only displaying the html format
> without the sytles included eg. Ckeditor,Tinymce.
> >
> >
> Methinks that you get to write a WYSIWYG text editor for that client.
> Might be easier for the doc owner to do their editing on their own
> software and then uploading the final doc.
> If that needs editing - - - well then someone downloads the doc shifts
> it back to a word processor file from pdf
> does the editing changes back to a pdf and then uploads the now edited
> file. That process is fraught with
> possible gotchas - - - I can see why you might want such an
> application - - - don't know of one though.
>
> Maybe someone else has a better idea?
>
> HTH
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPpdf592ad7Yx_8CMcaRLBBW258%3DUmyjsG5U3D6Z8htreBn3ig%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/CANbmKyuLycDv%2BgL5YaypnT3cvDWRdCZxi_ihP-zax7WdMC0y1A%40mail.gmail.com.


Django Admin external script before save/delete

2022-05-10 Thread Thiago Luiz Parolin
Hello everyone,
I'm trying to run a script before saving and deleting objects in db
using django admin.
If the script fails, the action (save or delete) needs to be aborted
and we need to inform the user with a message.

In the django docs:

"...When overriding ModelAdmin.save_model()
andModelAdmin.delete_model(), your code should save/delete the object.
They are not for veto purposes, but allow you to perform extra operations..."

So using modelform I can make this work for save, but how can I make
it for delete (or delete_queryset) too?

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/CANbmKyu9HOckLtb%3DRX%3DfWJM6K3ccmYn%2BUsSjynv5zFATisQsww%40mail.gmail.com.


'ascii' codec can't encode character

2022-04-28 Thread Thiago Luiz Parolin
Hi,
i have a model with 2 charfields for givenname, surname:

   nome = models.CharField(
max_length=150,
verbose_name=_("Nome"),
default=''
)
sobrenome = models.CharField(
max_length=150,
verbose_name=_("Sobrenome"),
default=''
)

My modelForm does nothing, just defines a model at Meta with all fields.
My CreateView is just defined with all default values, not overriding
anything.
When submitting the form, the server returns 500 if 'nome' or 'sobrenome'
fields have accent letters like Á, é, í, ç. etc.

The error:
'ascii' codec can't encode character '\xe9' in position 4: ordinal not in
range(128)
with character depending on user input.

I am using sqlite for db and the pragma encoding returns utf8.

I don't know how to deal with it.
Any help would be 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/CANbmKyvUWshdM3ENz9LjbG66rLkt4vruM6cC9M-%3DKmL7rcCR%2Bg%40mail.gmail.com.


Re: Using Admin to manage users that is not in django

2022-03-21 Thread Thiago Luiz Parolin
Thank you!!
I will follow your instructions. I think this will be enough for my app.

Em seg., 21 de mar. de 2022 às 00:26, Aldian Fazrihady 
escreveu:

> Django admin is so coupled to Django models.
> Django admin is customizable.
>
> If you want some "integration" with your existing Django admin that is
> already linked to your existing models,
> you can edit the Django admin index page template and put the link to your
> Samba AD DC management page.
> Your Samba AD DC management page will be an ordinary Django app.
>
> On Mon, Mar 21, 2022 at 9:52 AM Thiago Luiz Parolin 
> wrote:
>
>> Hi.
>> I am trying to make a web app to manage samba AD DC.
>> Using python bindings from samba, i can access users/groups/features of
>> our directory.
>> What i want is:
>>  - How can i use the django admin to manage AD? Because all the user base
>> is inside samba, not in django.
>>  - Or i need to build my own 'admin'?
>>
>> Thanks for any advice.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CANbmKytFbGCezptTES%2BqEBebpsVQg0wYrnM129W7jRyR50xSxA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CANbmKytFbGCezptTES%2BqEBebpsVQg0wYrnM129W7jRyR50xSxA%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
>
>
> --
> Regards,
>
> Aldian Fazrihady
> http://aldianfazrihady.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/CAN7EoAaYh2H6A_31ehLktAzN7-W%3DTA_0vzqNiWT34nBovMb5Pg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAN7EoAaYh2H6A_31ehLktAzN7-W%3DTA_0vzqNiWT34nBovMb5Pg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>


-- 
Thiago Luiz Parolin

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


Using Admin to manage users that is not in django

2022-03-20 Thread Thiago Luiz Parolin
Hi.
I am trying to make a web app to manage samba AD DC.
Using python bindings from samba, i can access users/groups/features of our
directory.
What i want is:
 - How can i use the django admin to manage AD? Because all the user base
is inside samba, not in django.
 - Or i need to build my own 'admin'?

Thanks for any advice.

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


Re: Playing Video with Django and html tag

2021-04-21 Thread Thiago Luiz Parolin
try using {% static.. to server your file.

‪Em qua., 21 de abr. de 2021 às 19:44, ‫תמר בביוף‬‎ 
escreveu:‬

> Hello everyone
>  :I try to enable a video tag in HTML like this
> 
> 
> 
> :My problem is that the video does not run on Django, and looks like a
> black
>  Running on html alone it works,
> Does anyone know what the problem is? Is not a video tag enough when 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/db9c1818-3312-45b4-a652-6a2dbc5bb688n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/db9c1818-3312-45b4-a652-6a2dbc5bb688n%40googlegroups.com?utm_medium=email_source=footer>
> .
>


-- 
Thiago Luiz Parolin

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


Re: Django Search Between 2 Dates

2021-02-03 Thread Thiago Luiz Parolin
If you want clien-side, then you need to make some script-fu using jquery
or anything like that.

Em qua., 3 de fev. de 2021 às 10:40, Steven Mapes 
escreveu:

> Are you looking at client-side filtering within datatables or server side
> filtering? Thiago's suggestion related to using filters when you fetch the
> queryset (
> https://docs.djangoproject.com/en/3.1/topics/db/queries/#retrieving-specific-objects-with-filters
> )
>
> On Wednesday, 3 February 2021 at 13:24:40 UTC eugenet...@gmail.com wrote:
>
>> Dear Thiago,
>>
>> Can I have some documentations or sample codes please?
>>
>> On Wed, 3 Feb 2021 at 15:16, Thiago Luiz Parolin 
>> wrote:
>>
>>> Hi...
>>> Normally i use field__lte and field__gte
>>>
>>> Em qua, 3 de fev de 2021 08:11, Eugene TUYIZERE 
>>> escreveu:
>>>
>>>> Dear Team,
>>>>
>>>> I need help. I have a list of Items in a table. And I want to filter
>>>> some data between dates (start and end date). Please help me to do a search
>>>> between the two date. I am using Data table but I can use the other way if
>>>> possible for this purpose.
>>>>
>>>> Regards,
>>>>
>>>> --
>>>> *TUYIZERE Eugene*
>>>>
>>>>
>>>>
>>>> *Msc Degree in Mathematical Science*
>>>>
>>>> *African Institute for Mathematical Sciences (AIMS Cameroon)Crystal
>>>> Garden-Lime, Cameroon*
>>>>
>>>> Bsc in Computer Science
>>>>
>>>> *UR-Nyagatare Campus*
>>>>
>>>> Email: eugene@aims-cameroon.org
>>>>eugenet...@gmail.com
>>>>
>>>> Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Django users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to django-users...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-users/CABxpZHuPozCVEUFjWFYxipwTyGrY9Syyw-Et%2B_NAqXn6GevNow%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CABxpZHuPozCVEUFjWFYxipwTyGrY9Syyw-Et%2B_NAqXn6GevNow%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...@googlegroups.com.
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CANbmKytQ%3D1hiSQyj5%2Bkj-Dvy2Tk%2B0YUukORMui0cP7BPwXNZdg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CANbmKytQ%3D1hiSQyj5%2Bkj-Dvy2Tk%2B0YUukORMui0cP7BPwXNZdg%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>>
>>
>> --
>> *TUYIZERE Eugene*
>>
>>
>>
>> *Msc Degree in Mathematical Science*
>>
>> *African Institute for Mathematical Sciences (AIMS Cameroon)Crystal
>> Garden-Lime, Cameroon*
>>
>> Bsc in Computer Science
>>
>> *UR-Nyagatare Campus*
>>
>> Email: eugene@aims-cameroon.org
>>eugenet...@gmail.com
>>
>> Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/98702a6a-6341-4495-b879-977e7447c6f8n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/98702a6a-6341-4495-b879-977e7447c6f8n%40googlegroups.com?utm_medium=email_source=footer>
> .
>


-- 
Thiago Luiz Parolin

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


Re: Django Search Between 2 Dates

2021-02-03 Thread Thiago Luiz Parolin
I will try to explain, although I am not a good teacher.

Suppose you have an 'Example' model that has a 'data' field with
'auto_now_add = True'
And a function 'yesterday()' that returns yesterday, and 'past()' that
returns 'yesterday() minus some days'.

if you want to filter items between yesterday() and past(), you could
use something like:
Example.objects.filter(data__gte=past(),data__lte=yesterday())

 or using .exclude too

If you need more info, you can get better in django docs:
https://docs.djangoproject.com/en/3.1/ref/models/querysets/

I hope I helped a little despite my bad English.






Em qua., 3 de fev. de 2021 às 10:24, Eugene TUYIZERE <
eugenetuyiz...@gmail.com> escreveu:

> Dear Thiago,
>
> Can I have some documentations or sample codes please?
>
> On Wed, 3 Feb 2021 at 15:16, Thiago Luiz Parolin 
> wrote:
>
>> Hi...
>> Normally i use field__lte and field__gte
>>
>> Em qua, 3 de fev de 2021 08:11, Eugene TUYIZERE 
>> escreveu:
>>
>>> Dear Team,
>>>
>>> I need help. I have a list of Items in a table. And I want to filter
>>> some data between dates (start and end date). Please help me to do a search
>>> between the two date. I am using Data table but I can use the other way if
>>> possible for this purpose.
>>>
>>> Regards,
>>>
>>> --
>>> *TUYIZERE Eugene*
>>>
>>>
>>>
>>> *Msc Degree in Mathematical Science*
>>>
>>> *African Institute for Mathematical Sciences (AIMS Cameroon)Crystal
>>> Garden-Lime, Cameroon*
>>>
>>> Bsc in Computer Science
>>>
>>> *UR-Nyagatare Campus*
>>>
>>> Email: eugene.tuyiz...@aims-cameroon.org
>>>eugenetuyiz...@gmail.com
>>>
>>> Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CABxpZHuPozCVEUFjWFYxipwTyGrY9Syyw-Et%2B_NAqXn6GevNow%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CABxpZHuPozCVEUFjWFYxipwTyGrY9Syyw-Et%2B_NAqXn6GevNow%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/CANbmKytQ%3D1hiSQyj5%2Bkj-Dvy2Tk%2B0YUukORMui0cP7BPwXNZdg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CANbmKytQ%3D1hiSQyj5%2Bkj-Dvy2Tk%2B0YUukORMui0cP7BPwXNZdg%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
>
>
> --
> *TUYIZERE Eugene*
>
>
>
> *Msc Degree in Mathematical Science*
>
> *African Institute for Mathematical Sciences (AIMS Cameroon)Crystal
> Garden-Lime, Cameroon*
>
> Bsc in Computer Science
>
> *UR-Nyagatare Campus*
>
> Email: eugene.tuyiz...@aims-cameroon.org
>eugenetuyiz...@gmail.com
>
> Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CABxpZHsJ9%3DE-cQX4iNQxc8ztP2Hcd%3DC4stZfA3KhMwXrTekxjQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CABxpZHsJ9%3DE-cQX4iNQxc8ztP2Hcd%3DC4stZfA3KhMwXrTekxjQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
>


-- 
Thiago Luiz Parolin

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


Re: Django Search Between 2 Dates

2021-02-03 Thread Thiago Luiz Parolin
Hi...
Normally i use field__lte and field__gte

Em qua, 3 de fev de 2021 08:11, Eugene TUYIZERE 
escreveu:

> Dear Team,
>
> I need help. I have a list of Items in a table. And I want to filter some
> data between dates (start and end date). Please help me to do a search
> between the two date. I am using Data table but I can use the other way if
> possible for this purpose.
>
> Regards,
>
> --
> *TUYIZERE Eugene*
>
>
>
> *Msc Degree in Mathematical Science*
>
> *African Institute for Mathematical Sciences (AIMS Cameroon)Crystal
> Garden-Lime, Cameroon*
>
> Bsc in Computer Science
>
> *UR-Nyagatare Campus*
>
> Email: eugene.tuyiz...@aims-cameroon.org
>eugenetuyiz...@gmail.com
>
> Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CABxpZHuPozCVEUFjWFYxipwTyGrY9Syyw-Et%2B_NAqXn6GevNow%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/CANbmKytQ%3D1hiSQyj5%2Bkj-Dvy2Tk%2B0YUukORMui0cP7BPwXNZdg%40mail.gmail.com.


Re: Pasting versus uploading

2020-10-08 Thread Thiago Luiz Parolin
i am using uppy to allow user make this task more comfortable
calling the view (that process upload) by ajax
https://uppy.io

Em qua., 7 de out. de 2020 às 21:11, Mike Dewhirst 
escreveu:

> Users need to include an image of a molecular structure in a model so it
> can be shown on a report the system produces. They are small enough so I
> can restrict the size without bothering them.
>
> I have implemented a TinyMCE-lite HTMLField for pasting an image and
> that works. I have also used Django ImageField (and FileField) in other
> projects.
>
> What is the best approach?
>
> ImageField is easier on the database (PostgreSQL) but pasting is easier
> on the users.
>
> Is there a third way?
>
> Thanks for any advice
>
> Cheers
>
> Mike
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/b7464b8e-0ad4-c8a6-6bfc-2312ff234021%40dewhirst.com.au
> .
>


-- 
Thiago Luiz Parolin

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


Re: django and webcams

2020-08-13 Thread Thiago Luiz Parolin
when i need that some user take a picture using his/her webcam, i use uppy
uploader.
https://uppy.io

Em qua., 12 de ago. de 2020 às 18:05, Samara Muñoz 
escreveu:

>
>
> On Sunday, January 24, 2010 at 11:46:27 AM UTC-6, H.İbrahim Yılmaz wrote:
>>
>> Thanks Atamert,
>> This is! :)
>> http://docs.pyamf.org/dev/tutorials/actionscript/bytearray.html
>> I visited your home page and read your articles. You're bokmarked! ;)
>> Thanks!
>>
>> 2010/1/24 Atamert Ölçgen :
>> > Hi İbrahim,
>> >
>> > On Saturday 23 January 2010 23:59:23 H.İbrahim Yılmaz wrote:
>> >> Hi,
>> >> I'm looking for a method to use my webcam for take a photo in my
>> >> project. What is the best solution for that?
>> >> Thanks
>> >
>> > This is not Django related. You probably need to do that via Flash.
>> This might
>> > help;
>> >
>> >
>> http://stackoverflow.com/questions/1350594/use-flash-capture-webcam-image
>> >
>> >
>> > --
>> > Saygılarımla,
>> > Atamert Ölçgen
>> >
>> >  -+-
>> >  --+
>> >  +++
>> >
>> > www.muhuk.com
>> > mu...@jabber.org
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups "Django users" group.
>> > To post to this group, send email to django-users@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> > For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>> >
>> >
>>
>> --
>> http://www.arkeoloji.web.tr
>>
>
> Hi, I am doing the same right now. I am using OpenCV to open my laptop
> camera. I am able to stream but I am missing the next part: how to click
> and save video frames(images). I wanted to access your link but it seems
> broken.  Do you think you could share that information? 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/ea2b2a5b-ee8f-4232-a196-48d167977e39o%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/ea2b2a5b-ee8f-4232-a196-48d167977e39o%40googlegroups.com?utm_medium=email_source=footer>
> .
>


-- 
Thiago Luiz Parolin

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


Restricting url access in DetailView

2019-12-05 Thread Thiago Luiz Parolin
I have a form that when submitted (using POST) results in a ListView page.
Clicking on the record displayed by ListView opens a detail page
(DetailView).
The initial form has a captcha that is validated to access the ListView
page, but by using the DetailView url I can access the records without
acessing the form.
How can I restrict access to record details so they can only be accessed
after accessing the form and ListView?
I think that this can be done using UserPassesTestMixin or similar, but i
really don't know how to do this.
Any tip will be helpful.

Thanks and sorry about my bad english.
-- 
Thiago Luiz Parolin

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


Re: Styling in Django

2019-12-03 Thread Thiago Luiz Parolin
My last project materializecss uses materialize with great success and to
stylizing forms i am using django-materializecss-form

Em ter., 3 de dez. de 2019 às 10:52, Alan Gómez 
escreveu:

> You can work with materializecss In django. You must configure the static
> path and put the materializecss files in these path.
>
> At night, I can send you an example.
>
> Regards.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/74571e79-91d6-4fb8-b03f-1195893bfc91%40googlegroups.com
> .
>


-- 
Thiago Luiz Parolin

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


Re: Admin form in intermediate page

2019-11-21 Thread Thiago Luiz Parolin
Thank you!!!
It helped me a lot!! :)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8D14347D-B6BC-4D0A-8A15-9765B644C34D%40unesp.br.


Admin form in intermediate page

2019-11-19 Thread Thiago Luiz Parolin
I have a form in admin that when selecting a particular action,
presents an intermediate page with numeric fields to be filled and
saved in the selected records.
How can I save each record of my queryset with its respective field on
this intermediate page?
I have almost everything working, just assigning each field of the
intermediate page to its record that I don't know how to do
Does anyone have any ideas?

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


Re: 3D Object Interaction

2019-08-23 Thread Thiago Luiz Parolin
there is a free and a paid version.
look at https://www.blend4web.com/en/downloads/
in this page you will get all you need to know about this.

Em sex, 23 de ago de 2019 às 08:38, Tin Le  escreveu:

> Is it free?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/DM6PR18MB293722DBE28E0149B221266DE1A40%40DM6PR18MB2937.namprd18.prod.outlook.com
> <https://groups.google.com/d/msgid/django-users/DM6PR18MB293722DBE28E0149B221266DE1A40%40DM6PR18MB2937.namprd18.prod.outlook.com?utm_medium=email_source=footer>
> .
>


-- 
Thiago Luiz Parolin

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


Re: 3D Object Interaction

2019-08-23 Thread Thiago Luiz Parolin
Hi,
Did you tried Blend 4 web?
https://www.blend4web.com/en/


Em sex, 23 de ago de 2019 às 07:53, Lim Kai Wey 
escreveu:

> Greetings,
>
> I would like to ask if anyone has a suggested way for creating a 3D object
> which can be interacted with on Django.
> Any suggestions are welcomed.
>
> Thanks in advance.
>
> Regards,
> Kai Wey
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/0122874a-5d05-4872-9d40-396431cd9b34%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/0122874a-5d05-4872-9d40-396431cd9b34%40googlegroups.com?utm_medium=email_source=footer>
> .
>


-- 
Thiago Luiz Parolin

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


Re: How to get queryset from get method

2018-12-05 Thread Thiago Luiz Parolin
Thanks!!
This site is awesome and will help me a lot 



> Em 4 de dez de 2018, às 16:05, Gerson David Vizquel Alemán 
>  escreveu:
> 
> Hello Thiago, review this link: http://ccbv.co.uk/
> 
> El martes, 4 de diciembre de 2018, 8:38:24 (UTC-4), thiago.parolin escribió:
>> 
>> I have a class (Updateview) to handle file upload for a particular model. In 
>> this class, I do some validation on the get method that uses a queryset. In 
>> get_object and get_context_data I need to do the same query used in the get 
>> method, how can I reuse the get method's queryset in another method of the 
>> same class?
>> I do not know if I could explain it correctly, but thanks if anyone can help 
>> me.
>> 
>> -- 
>> Thiago Luiz Parolin
>> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "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/d8b0fe72-63ed-4713-ad12-f807402eed1d%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/CEBFE353-0C0C-464F-BB9B-A25CC47DEC93%40unesp.br.
For more options, visit https://groups.google.com/d/optout.


How to get queryset from get method

2018-12-04 Thread Thiago Luiz Parolin
I have a class (Updateview) to handle file upload for a particular model.
In this class, I do some validation on the get method that uses a queryset.
In get_object and get_context_data I need to do the same query used in the
get method, how can I reuse the get method's queryset in another method of
the same class?
I do not know if I could explain it correctly, but thanks if anyone can
help me.

-- 
Thiago Luiz Parolin

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


How to get datetime from server

2018-09-06 Thread Thiago Luiz Parolin
Hi,
I am building a django system that prevent user from upload a file after a
date.
This date is setting using:
today = datetime.date.today()

but if the user alters his computer date, he can upload file normally after
the end date.
how can i assing to 'today', the date from server and not client computer?

Thanks
-- 
Thiago

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


Re: How to get datetime from server

2018-09-06 Thread Thiago Luiz Parolin
Sorry, my mistake!
In manage.py runserver, the server is my computer and the time displayed is
my computer time.
Putting the code in production server all work as expected!


Em qui, 6 de set de 2018 às 10:29, Thiago Luiz Parolin <
thiago.paro...@unesp.br> escreveu:

> Hi,
> I am building a django system that prevent user from upload a file after a
> date.
> This date is setting using:
> today = datetime.date.today()
>
> but if the user alters his computer date, he can upload file normally
> after the end date.
> how can i assing to 'today', the date from server and not client computer?
>
> Thanks
> --
> Thiago
>
>

-- 
Thiago Luiz Parolin

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


Re: Enable https for a production django application

2017-12-04 Thread Thiago Luiz Parolin
You can use
Let's Encrypt - Free SSL/TLS Certificates  (
https://letsencrypt.org)



2017-12-04 8:07 GMT-02:00 SHAILESH NEGI :

> Hey Bijal,
>
> You need to purchase the SSL.
> Follow the link.
> https://www.digitalocean.com/community/tutorials/how-to-
> install-an-ssl-certificate-from-a-commercial-certificate-authority
>
> On Mon, Dec 4, 2017 at 2:45 PM, BIJAL MANIAR  wrote:
>
>>
>> Hey Jani,
>> Do we need to purchase SSL certificate? Any links on that would be
>> helpful.
>>
>> Thanks,
>> Bijal
>>
>> On Monday, December 4, 2017 at 1:36:35 PM UTC+5:30, Jani Tiainen wrote:
>>>
>>> Hi,
>>>
>>> You just need to redirect (permanently) all traffic to port 80 to 443 in
>>> your Apache config.
>>>
>>> On 4.12.2017 10.03, BIJAL MANIAR wrote:
>>>
>>>
>>> Hello,
>>> We need to enforce an https connection for production django application
>>> running with apache and mod-wsgi. Can anyone please help me with what it
>>> will take to implement this.
>>>
>>> Thanks,
>>> Bijal
>>> --
>>> You received this message because you are subscribed 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/ms
>>> gid/django-users/16075809-a4f6-4174-b9a3-a545ade434ef%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>> --
>>> Jani Tiainen
>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "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/ms
>> gid/django-users/f94fdd56-5a8c-4aa9-9f41-de3909b34a12%40googlegroups.com
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Thanks & Regards,
> SHAILESH NEGI
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/CAEFKsYPq2BGpg38LXC4kbXUTqfy6w
> S%2Btgusoce%2ByZxh56QLteQ%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/CACTnJ00ctJmf529AsfstxiSV0GkNq4yuDXYDjrc2-8zSRbdHBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django samples

2017-10-25 Thread Thiago Luiz Parolin
https://docs.djangoproject.com/en/1.11/intro/tutorial01/

This link will help you. Enjoy!

2017-10-25 13:43 GMT-02:00 Ruifeng Hu :

>
> Hello everyone,
>
>  Is there anyone who can share with me a small example, I just start
> learning  Django.
>
>  Than you.
>
> Ruifeng Hu
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/1d3d8a78-3c4b-4e82-a116-64ca9a870440%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/CACTnJ02aRmvc_NN8t_fWBmdmiNVOpPRAWf4Df33e%2Banc3PHVyw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Wrapping basic static HTML page in sites base template. How to?

2017-10-16 Thread Thiago Luiz Parolin
Hi,
Look at the flatpages docs.

https://docs.djangoproject.com/en/2.0/ref/contrib/flatpages/



2017-10-16 9:06 GMT-02:00 Bernd Wechner :

> Curious and I admit lazy question as I don't even know where to look or
> how for such a general idea. But there it is, I'd like to be able to write
> a static HTML file (like say about.html) and render that inside of the
> sites style and basic template.
>
> So I have base.html for example, which contains say:
>
> {% block content %}{% endblock %}
>
> and various views that start with:
>
> {% extends "myapp/base.html" %}
>
> and define content blocks.
>
> I'd like a simple filter perhaps (or tag) which loads a nominated static
> html file but has some rudimentary smarts in its rendering. For example
> using the h1 text as a page title, and inserting a table of contents of ann
> the h2 and other headers with links to the respective sections. The static
> HTML file then need only declare the headers and texts and the template
> filter/tag would weave it together in such a manner.
>
> Is that a common sort of need, that;s been solved, and done? Just curious
> really. Seems a common need at my end ;-). Hence a classic application of
> the DRY principle, and generalizing the routine elements of Table of
> Contents building and linking.
>
> 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+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/22b3f568-d045-6d56-a31b-944e7cc7ac79%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/CACTnJ03mngt8yutF6kpgdBGMuT_s6XnyoVy8696ktSaf8WfGgA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


How to prevent the use of hidden fields in a form

2017-08-17 Thread Thiago Luiz Parolin
I have a system that does:
1 - The user registers a project with name, title and responsible teacher
2 - The teacher responsible for this project must authorize it or not
So I have a page that displays to the teacher, all the projects that are
waiting for authorization and in each project there is a small form with
radio (yes / no) and a save button.
The form in django has no field that identifies a project or something, I
save directly to the project template that has an authorization field (true
or false).
How can I assign the choice of the teacher (yes or no) to the project?
Ie how to identify that this form below the project on the listing page is
from project x and not from project z?
Today this is done with a hidden field in the form that is configured in
the template with the id of the user who registered the project, but using
options to inspect elements in browsers, an attacker can change the id and
authorize other projects.
How can I prevent this?

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/CACTnJ03kodSevdmwZRVsozucmqZQ5aJ4oLCTuhgecqjipXuxVw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Deploying django with Apache2 and mod-wsgi in ubuntu14.04

2017-08-03 Thread Thiago Luiz Parolin
I am using django and apache in a debian 8 and 9 server and everything is
working fine.

Firstly, don't use /var/www/html for python files.

In my server, we have a ordinary user that host python files in his home
dir.

I will try enumerate some steps used in one of my projects:
 - with your ordinary user, create your virtualenv
 - put your project in a folder  (sub folder in home of that user)
 - install and secure mysql
 - configure your settings (db settings, settings.py, create database if
needed)
 - test your db connection and make migrations, load fixtures and others.
 - install apache2 (in debian libapache2-mod-wsgi-py3 was required)
 - configure apache (for me just a single file
/etc/apache2/sites-available/your-site-name.conf was sufficient)
 - adjust directory permissions if needed (/var/www or others)
 - restart apache and all is working..

You can read this link to see more info:
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/modwsgi/
Hope it helps you.


2017-08-03 2:29 GMT-03:00 surajit mishra :

> I have developed a project (named pubnet) in django and is trying deploy
> it on production server(currently my ubuntu 14.04 machine for user
> testing). The project did work on built-in django server during development
> but on deploying, it fails to work. All it displays is the apache
> index.html page on localhost and not the django welcome page.
>
> Here are the steps that I have performed:
> *INSTALLATIONS:*
>
>- installed apache2
>- installed
>​lib​
>apache2-mod-wsgi
>- installed mysql-server
>- created a database named pubnet
>- created a django project named pubnet inside /var/www/html/
>
>
> *FILES CREATED/ALTERED:*
>
>- *vi /etc/apache2/sites-available/pubnet.conf*
>
>  
>
> ServerName pubnet
> ServerAlias pubnet.com
> ServerAdmin root
>
> DocumentRoot /var/www/html/pubnet
>
> Alias /media/ /var/www/html/pubnet/media/
> Alias /static/ /var/www/html/pubnet/static/
>
> 
> require all granted
> 
>
> WSGIDaemonProcess pubnet.com processes=2 threads=15 display-name=%{GROUP}
> WSGIProcessGroup pubnet.com
>
> WSGIScriptAlias / /var/www/html/pubnet/pubnet/pubnet.wsgi
>
> 
>require all granted
> 
>
> ErrorLog /var/www/logs/error.log
> CustomLog /var/www/logs/custom.log combined
>
> 
>
>- *vi /var/www/html/pubnet/pubnet/pubnet.wsgi*
>
> import os
> import sys
> sys.path = ['/var/www/html/pubnet'] + sys.path
> os.environ['DJANGO_SETTINGS_MODULE'] = 'pubnet.settings'
>
> from django.core.wsgi import get_wsgi_application
> application = get_wsgi_application()
>
>- *vi /var/www/html/pubnet/pubnet/wsgi.py:*
>
> import os
> import sys
> import django.core.handlers.wsgi
>
> # Calculate the path based on the location of the WSGI script.
> apache_configuration= os.path.dirname(__file__)
> project = os.path.dirname(apache_configuration)
> workspace = os.path.dirname(project)
> sys.path.append(workspace)
> sys.path.append(project)
>
> # Add the path to 3rd party django application and to django itself.
> sys.path.append('/var/www/html/pubnet')
> os.environ['DJANGO_SETTINGS_MODULE'] = 'pubnet.apache.override'
>
> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pubnet.settings")
> from django.core.wsgi import get_wsgi_application
> application = get_wsgi_application()
>
>- *vi /etc/hosts:*
>
> *127.0.0.1   localhost*
> *192.168.13.80   pubnet.com *
>
>- *sudo a2ensite pubnet*
>- *sudo service apache2 reload*
>- *sudo service apache2 restart*
>
>
>- *settings.py:*
>
> ALLOWED_HOSTS = ['localhost', '127.0.0.1', '127.0.1.1', '192.168.13.80', '
> pubnet.com']
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.mysql',
> 'NAME': 'pubnet',
> 'USER': 'root',
> 'PASSWORD': 'PASSWORD',
> 'HOST': '127.0.0.1',   # Or an IP Address that your DB is hosted on
> 'PORT': '3306',
> }
> }
>
> *​NOTE: *While working on it last Saturday, it started working and I was
> also able to display the django admin page on the browser. However, very
> strangely on Monday it failed to work. Since then I have tried almost all
> links and the suggestions in google, installed, uninstalled everything but
> failed to make it work.
>
> Any help would be highly appreciated.
>
> 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/5d36aaf5-01de-402e-9a1a-02fd6c61bdbf%40googlegroups.com
> 
> .
> For more 

Re: Create ModelForms to create ModelForms

2017-08-02 Thread Thiago Luiz Parolin
Hi,
Try using this app:
Django-fobi https://github.com/barseghyanartur/django-fobi

I've never used it, but it looks very promising.

2017-08-01 21:15 GMT-03:00 Shazia Nusrat :

> I need to create a frontend app where I can use forms to create forms such
> as Google Surveys or Survey Monkey kind of application. Can someone point
> me to any reusable app or something similar or someone can guide me that
> would be a great help.
>
> Regards,
>
> Shazia
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/CAD83tOzVsD004ZO%3Ddu%3DGZnpPnAScKxqm9mdks%
> 2BjLCmhV4x1BKQ%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/CACTnJ00ucrRvpcqUtK0gHGZghr%2BssiTpsK%3Ddb7ZZDVckGzHDGw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Adding code when pressing one of admin's save buttons

2017-07-25 Thread Thiago Luiz Parolin
Try using 'def save(self):' on your models.
When you save a new record, this will be executed, so if you hit any
button, you are saving in anyway and the code will be executed.

Just my cents about your question.


2017-07-25 8:29 GMT-03:00 ron_w_add via Django users <
django-users@googlegroups.com>:

> I am using Django’s admin interface to create new records. A record
> includes (amongst other fields) the date and time that a photo was taken.
> These fields will be filled into the database when either the ‘Save and add
> another’, ‘Save and continue editing’ or the ‘Save’ buttons are pressed
> (i.e. these details will be read from the image file and entered into the
> database rather than the administrator doing this manually).
>
>
>
> How can I added the extra code required to add the date and time when I
> press one of these buttons? Some example code would be appreciated.
>
>
>
> 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/63559d9c-15c6-4ce1-b477-8e24b030ce0c%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/CACTnJ001etLw57wChAeEKJWVKqTVuQtcjgJoSDGAedjoEzXouQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to include template

2017-05-03 Thread Thiago Luiz Parolin
Thank you...
All is working now
i was seeing in the wrong page of documentation..


2017-05-03 12:01 GMT-03:00 Dartos <dartosdoesdja...@gmail.com>:

> Hi,
>
> You need to set the template directories option in your project's settings
> file.
>
> See here:
> https://docs.djangoproject.com/en/1.11/topics/templates/#configuration
>
> There's an example in the above link:
>
> TEMPLATES = [
> {
> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
> 'DIRS': [
> '/home/html/example.com',
> '/home/html/default',
> ],
> },
> {
> 'BACKEND': 'django.template.backends.jinja2.Jinja2',
> 'DIRS': [
> '/home/html/jinja2',
> ],
> },
> ]
>
>
> Once Django is aware of where to search for templates, you can include
> templates from your project's templates directory as follows:
> {% include "Error.html" %}
>
> And you can include app templates as follows:
> {% include "App1/App1.html" %}
>
>
>
> Also, pay attention to capitalization of filenames, as "Error.html" and
> "error.html" are different files on many systems. I use all-lowercase to
> avoid issues.
>
> Dartos
>
>
> On Wednesday, May 3, 2017 at 10:00:37 AM UTC-4, Thiago Luiz Parolin wrote:
>>
>> I have a project that has a folder structure like this:
>>
>> Project1 /
>> --Templates /
>> Base.html
>> Error.html
>> --App1
>> Templates /
>> --App1 /
>> App1.html
>>
>> How can i include error.html in app1.html?
>>
>> I am trying using {% include "../../../templates/error.html"%} but get
>> error on page rendering:
>>
>> The relative path '"../../../templates/error.html"' points outside the
>> file hierarchy that template 'app1 / app1.html' is in.
>>
>>
>> I am totally new to django, python and programming.
>> Any help will be appreciated.
>>
>
> On Wednesday, May 3, 2017 at 10:00:37 AM UTC-4, Thiago Luiz Parolin wrote:
>>
>> I have a project that has a folder structure like this:
>>
>> Project1 /
>> --Templates /
>> Base.html
>> Error.html
>> --App1
>> Templates /
>> --App1 /
>> App1.html
>>
>> How can i include error.html in app1.html?
>>
>> I am trying using {% include "../../../templates/error.html"%} but get
>> error on page rendering:
>>
>> The relative path '"../../../templates/error.html"' points outside the
>> file hierarchy that template 'app1 / app1.html' is in.
>>
>>
>> I am totally new to django, python and programming.
>> Any help will be appreciated.
>>
>
> On Wednesday, May 3, 2017 at 10:00:37 AM UTC-4, Thiago Luiz Parolin wrote:
>>
>> I have a project that has a folder structure like this:
>>
>> Project1 /
>> --Templates /
>> Base.html
>> ----Error.html
>> --App1
>> Templates /
>> --App1 /
>> App1.html
>>
>> How can i include error.html in app1.html?
>>
>> I am trying using {% include "../../../templates/error.html"%} but get
>> error on page rendering:
>>
>> The relative path '"../../../templates/error.html"' points outside the
>> file hierarchy that template 'app1 / app1.html' is in.
>>
>>
>> I am totally new to django, python and programming.
>> Any help will be appreciated.
>>
>
> On Wednesday, May 3, 2017 at 10:00:37 AM UTC-4, Thiago Luiz Parolin wrote:
>>
>> I have a project that has a folder structure like this:
>>
>> Project1 /
>> --Templates /
>> Base.html
>> Error.html
>> --App1
>> Templates /
>> --App1 /
>> App1.html
>>
>> How can i include error.html in app1.html?
>>
>> I am trying using {% include "../../../templates/error.html"%} but get
>> error on page rendering:
>>
>> The relative path '"../../../templates/error.html"' points outside the
>> file hierarchy that template 'app1 / app1.html' is in.
>>
>>
>> I am totally new to django, python and programming.
>> Any help will be appreciated.
>>
>
> On Wednesday, May 3, 2017 at 10:00:37 AM UTC-4, Thiago Luiz Paro

how to include template

2017-05-03 Thread Thiago Luiz Parolin
I have a project that has a folder structure like this:

Project1 /
--Templates /
Base.html
Error.html
--App1
Templates /
--App1 /
App1.html

How can i include error.html in app1.html?

I am trying using {% include "../../../templates/error.html"%} but get
error on page rendering:

The relative path '"../../../templates/error.html"' points outside the file
hierarchy that template 'app1 / app1.html' is in.


I am totally new to django, python and programming.
Any help will be 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 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/CACTnJ003Gp27c0g82dzXnLkGcusGgnKVKwijtXZV7EvL3doVAA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: send email with django

2017-04-19 Thread Thiago Luiz Parolin
i am using sendgrid for send emails...the free service works very well for
me...there is a paid version too..
sendgrid can be integrated into django

https://sendgrid.com/docs/Integrate/Frameworks/django.html




2017-04-19 8:46 GMT-03:00 Carl :

> As a counter-perspective, we have this working with a paid G Suite
> (formerly Google Apps) account. *Important* We had to register the IP
> address of our server with G Suite. This Google support document outlines
> the process:
>   SMTP relay: Route outgoing non-Gmail messages through Google
>   https://support.google.com/a/answer/2956491?hl=en
>
> In terms of Django, our settings.py file has the following relevant
> settings:
>
> # To have error messages auto-sent via email:
> SERVER_EMAIL = 'myn...@mypaid-gmail.com'
> ADMINS = [('MyWebServer', 'myn...@mypaid-gmail.com'),]
>
> EMAIL_USE_TLS = True
> EMAIL_HOST = 'smtp-relay.gmail.com'
> EMAIL_PORT = 587
> EMAIL_HOST_USER = ''
> EMAIL_HOST_PASSWORD = ''
> DEFAULT_FROM_EMAIL = 'myn...@mypaid-gmail.com'
> DEFAULT_TO_EMAIL = 'myn...@mypaid-gmail.com'
>
> Hope this helps!
>
>  Original Message 
> Subject: Re: send email with django
> Local Time: April 19, 2017 7:00 AM
> UTC Time: April 19, 2017 11:00 AM
> From: rede...@gmail.com
> To: django-users@googlegroups.com
>
>
> Also, don't fail silently it would be helpful to see actual error that
> happens...
>
> On 19.04.2017 00:25, shahab emami wrote:
>
> hello
>
> i want to send email using django. i used to send email with pour python
> before but now i can't do that in django.
>
> i have search about this and i have seen some tutorials on youtube  in
> last two days but i cant do this .
>
> this is in my settings.py :
>
> EMAIL_USE_TLS = True
> EMAIL_HOST = 'smtp.gmail.com'
> EMAIL_HOST_USER = 'my_gm...@gmail.com'
> EMAIL_HOST_PASSWORD= 'my_password'
> EMAIL_PORT = 587
>
> and this is my send email:
>
> from django.core.mail import send_mail
> def click(request):
> send_mail(
> 'shahab',
> 'Here is the message.',
> 'my_gm...@gmail.com',
> ['shahabem...@yahoo.com'],
> fail_silently=True
> )
> return HttpResponseRedirect('index')
>
> but it doesn't work.
>
> I am running this code on localhost. but i doesn't work on heroku too.
> i changed allow less secure app to on in my gmail account and
> i went to this page too and  i clicked on continue :
> https://accounts.google.com/DisplayUnlockCaptcha
>
> can anybody tell me:
> what am i missing ?
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/65e0ab09-ff5a-4ed5-89d6-e5e0991b9ea0%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Jani Tiainen
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/6a7f0307-4144-b649-cdc8-8e679e89ceca%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/1ZSWqeCcOU2qCnLKSrDLkDiH9XND1s
> varKZef71AehQS2PjMMiImZZBHjPt6AADghhHiSI5ezGkKzMk-
> zf3NqObwRccrXTFd5t-L-4SyXlk%3D%40nexuspro.ca
> 
> .
>
> 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