Re: Python Training in Chennai

2018-06-12 Thread C. Kirby
Please stop spamming long dead threads just to put  link to your training 
course

On Tuesday, June 12, 2018 at 12:14:42 AM UTC-4, ijazz jazz wrote:
>
> we are focused on imparting a One-to-One Python Training in Chennai, our 
> trainees get to acquire a lot from the course. Our Fast-Track Python 
> Training in Chennai also ensures that they learn the most within the least 
> possible time. Here are the major topics we cover under this Python course 
> Syllabus Introduction, Memory management and Garbage collections, 
> Statements and Syntax, File Operations, Functions, Modules and Packages, 
> Classes, Exception Handling, Advanced Concepts and Django. 
>
> Python Training in Chennai 
> 
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/8713fd44-a8d3-41df-8818-d9625321132b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Python Training in Chennai

2018-06-12 Thread subhani shaik
ok..

how to create multiple routes in single form.

On Tue, Jun 12, 2018 at 12:55 PM, C. Kirby  wrote:

> Please stop spamming long dead threads just to put  link to your training
> course
>
> On Tuesday, June 12, 2018 at 12:14:42 AM UTC-4, ijazz jazz wrote:
>>
>> we are focused on imparting a One-to-One Python Training in Chennai, our
>> trainees get to acquire a lot from the course. Our Fast-Track Python
>> Training in Chennai also ensures that they learn the most within the least
>> possible time. Here are the major topics we cover under this Python course
>> Syllabus Introduction, Memory management and Garbage collections,
>> Statements and Syntax, File Operations, Functions, Modules and Packages,
>> Classes, Exception Handling, Advanced Concepts and Django.
>>
>> Python Training in Chennai
>> 
>>
> --
> You received this message because you are subscribed to the Google Groups
> "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/8713fd44-a8d3-41df-8818-d9625321132b%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Thanks&Regards,

Subhani Shaik
8897630945

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


Get the Parameter Value From URL

2018-06-12 Thread Pravin Yadav
Hello,

I want to get the parameter value from url in djago template. i'm using the
django 2.0.6 and python 3.6.1.

*base.html:-  *

{{ request.GET.get('videorandom_id') }}

*My url: http://127.0.0.1:8000/watch/videos/4626634807531689
*


*Error Message:*

TemplateSyntaxError at /watch/videos/4626634807531689

Could not parse the remainder: '('videorandom_id')' from
'request.GET.get('videorandom_id')'

Request Method: GET
Request URL: http://127.0.0.1:8000/watch/videos/4626634807531689
Django Version: 2.0.6
Exception Type: TemplateSyntaxError
Exception Value:

Could not parse the remainder: '('videorandom_id')' from
'request.GET.get('videorandom_id')'

Exception Location:
/usr/local/lib/python3.6/site-packages/django/template/base.py
in __init__, line 668
Python Executable: /usr/local/bin/python3
Python Version: 3.6.1
Python Path:

['/var/www/html/videowithfriends',
 '/usr/local/lib/python36.zip',
 '/usr/local/lib/python3.6',
 '/usr/local/lib/python3.6/lib-dynload',
 '/usr/local/lib/python3.6/site-packages']

Server time: Tue, 12 Jun 2018 12:46:13 +

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


Re: Generating server-side off-line HTML of Django pages ...

2018-06-12 Thread Bernd Wechner


On Monday, 4 June 2018 16:00:09 UTC+10, Bernd Wechner wrote:
>
> Say I have a page on my Django website (because I do) that I would like to 
> take a snapshot of on an automated basis on the server itself with a 
> crontab say. I imagine writing a small python script that I could run, that 
> loads Django, a settings file, knows a URL and has a way of saying "give me 
> the rendered page for that URL please" and save it in a file. 
>
> On way of course is open port 80 or 443, send an HTTP request and get the 
> HTTP response. But there is probably a better way that leaves the web and 
> UWSGI servers right out of the equation and just runs Django template 
> rendering code or a view itself and nabs the result.
>
> As usual, I'm both confident this is possible and that I'll nut out a way 
> to do it, but am throwing it out there in case:
>
> a) there's a canonical way to do this already that can be recommended
> b) I can save myself some time reading and experimenting if anyone whose 
> done this already shares their experience
>
> I will raise the bar one on the original question while I'm here, and 
> raise the spectre of autorun on page load javascript that the page may 
> have. Makes it hairier by a step. But it's not unusual for javascript to do 
> some rendering on page load - I have a page or two like that ;-), In that 
> case neither of these strategies are likely to work and either one might if 
> coupled with what would basically need to be, a rendering engine like 
> mozilla's. Does Python offer that I wonder, a way to pump a response (with 
> embedded Javascript) into a rendering engine and then save (or request) the 
> rendered page?
>
> Kind 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/81c34e1c-71af-4a43-9e3b-088b3b1383fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Reusable Code like Helper OR Component.

2018-06-12 Thread Pravin Yadav
Hello,

I have created the websites in Python 3.6 and Django 2.0.6. I have created
separate the header.html, footer.html, index.html & base.html.  I want to
create the reusable code like Helper OR Component. I have no idea about
this how to create the helper or component. if any one know abut this
kindly let me know.


Thanks,

Pravin Yadav


On Mon, Jun 11, 2018 at 7:53 PM, Pravin Yadav  wrote:

> Hello,
>
> I have created the websites in Python 3.6 and Django 2.0.6. I have created
> separate the header.html, footer.html, index.html & base.html.  I want to
> create the reusable code like Helper OR Component. I have no idea about
> this how to create the helper or component. if any one know abut this
> kindly let me know.
>
>
> Thanks,
>
> Pravin Yadav
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To 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/a920009c-ca15-4fe4-a146-26cfddef809b%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/CAEr6%3DdwK7o7uz7fduw5caOm%2B9YLFmmGtoZH5t7sqhe6M%2Bv-p-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Login with pre-set credentials.

2018-06-12 Thread kimeualexis
Hello, guys!
Am working on a student's portal with users: Admin, Staff & Student. I want 
the admin to be able to register Students & Staff with a password. After 
being registered, the students will be able to login with the pre-set 
password and can later change it. How do I achieve this 
functionalitywhere the Admin registers a student and the student is 
able to login with the pre-set password? Kindly assist.

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 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/539e79df-ff06-40b0-93fc-2979a346eb47%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Python Training in Chennai

2018-06-12 Thread Ben Indangasy
Cost?

On Tue, 12 Jun 2018, 07:15 ijazz jazz,  wrote:

> we are focused on imparting a One-to-One Python Training in Chennai, our
> trainees get to acquire a lot from the course. Our Fast-Track Python
> Training in Chennai also ensures that they learn the most within the least
> possible time. Here are the major topics we cover under this Python course
> Syllabus Introduction, Memory management and Garbage collections,
> Statements and Syntax, File Operations, Functions, Modules and Packages,
> Classes, Exception Handling, Advanced Concepts and Django.
>
> Python Training in Chennai
> 
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/3b938430-147e-478a-ad35-589c1b1a4227%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/CAKHEhD%2BQrxgbaXFhTUfERGHwPZia751ezVaK%3DcMMxhdJcc5oGg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


saving django session data for anonymous user

2018-06-12 Thread Siddharth Srivastava
Hi ,

i was writing small ecommerce application in django framework. so i was 
trying to implement add to cart functionality like that if user is 
anonymous user then selected products should be mapped to it's session id 
which is act. cart id in models. so the scenario is that whenever anonymous 
user check out and mapped data against that session id is purged. Is there 
any mechanism to save anonymous user session data even after user logs in. 
kindly provide easy possible solution as i am bit new to django:)

Thanks,

Siddharth

-- 
You received this message because you are subscribed to the Google Groups 
"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/d17bbc16-4c0b-4d06-bfa5-af814a20cbc6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Produces Python?

2018-06-12 Thread Mario R. Osorio
I've tried multiple managed hosting and they all have limitations that will 
eventually go against your expansion needs. The best example I can think of 
is the fact that in most of these services you cannot compile, and some of 
python's libraries do require compiling.

I favor Virtual Private Servers and personally prefer DigitalOcean.com. 
They have a very nice price structure that starts at $5/month and even 
offer one-click applications, Django 1.8.7 among them. Not only that, their 
documentation is very complete and they have a tutorial for virtually 
everything, from configuring your server to securing and hardening its 
security. I would say DO is also a 'battery included' service when it comes 
to non managed server (and no, I'm not getting paid by DO!, I'm just a big 
fan...)

HTH!


On Sunday, March 26, 2017 at 11:24:13 AM UTC-4, Ed Sutherland wrote:
>
> I now understand the purpose and worth of Django. What, then, are the 
> questions I need to ask potential hosts? I'm leaning toward Linode, but 
> would also like affordable managed hosting.
>
>
>
>
>
>  On Sun, 26 Mar 2017 04:16:52 -0400 Lachlan Musicman > wrote 
>
> If you take James' answer and expand it a little, take a look at a Python 
> micro-framework like Pylons http://pylonsproject.org/
>
> It's smaller than Django and is a useful tool for a different type of 
> website.
>
> For instance take Authentication and Authorization - logins. Not every 
> site needs one. Django has it by default. If you don't need it, maybe 
> Pylons is a better fit. 
>
> But be aware - when you have to actually write some code that makes user 
> accounts and logins happen in Pylons, that's when you will discover that 
> Django's "batteries included" philosophy really works for some style of 
> projects.
>
> cheers
> L.
>
> --
> The most dangerous phrase in the language is, "We've always done it this 
> way."
>
> - Grace Hopper
>
> On 26 March 2017 at 15:52, James Bennett 
> > wrote:
>
> Python is a programming language. You can use it to write many types of 
> programs. For example, you can use it to write web applications (which run 
> on a web server, respond to HTTP requests, store their data in a database, 
> render HTML templates for output, etc.). But doing this from scratch would 
> require you to write many modules of Python code yourself, in order to 
> handle all the common and necessary parts of a typical web application.
>
> Django provides those things for you, already written, so that you do not 
> need to write them yourself. Instead, you can write only the things which 
> are truly unique to your specific application, and let already-written 
> modules from Django handle the rest.
>
> -- 
> You received this message because you are subscribed 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/CAL13Cg9n4Mk6W2QEG51yoY5cXn1tQ_N9ORhvv3k7GGCdW2Ob3A%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...@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/CAGBeqiO9QJ9N9%3DCj%2BsEnCsEn%2B02nwindxbzoYaxTY%2BV16vp%2BPQ%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/f66c4f9f-1344-4a2d-97b1-986359477b73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Reusable Code like Helper OR Component.

2018-06-12 Thread 'Anthony Flury' via Django users
Reusable components are exactly what separate apps are for; Give your 
resuable code a nice API - whether it adds new field types,

new models, new templates etc, and then put that all in an app.

Writing an entirely reusable app takes a lot of skill and thought in my 
experience; extra fields, model mixins, new tags and even new 
middle-ware components are relatively straightforward; providing 
reusable templates that another project can extend easily can be 
challenging.


The key in my experience is to document it all - make sure you write 
down exactly how you re-use your components.


On 11/06/18 15:23, Pravin Yadav wrote:


Hello,

I have created the websites in Python 3.6 and Django 2.0.6. I have 
created separate the header.html, footer.html, index.html & 
base.html.  I want to create the reusable code like Helper OR 
Component. I have no idea about this how to create the helper or 
component. if any one know abut this kindly let me know.



Thanks,

Pravin Yadav

--
You received this message because you are subscribed to the Google 
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to django-users+unsubscr...@googlegroups.com 
.
To 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/a920009c-ca15-4fe4-a146-26cfddef809b%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.



--
--
Anthony Flury
email : *anthony.fl...@btinternet.com*
Twitter : *@TonyFlury *

--
You received this message because you are subscribed to the Google Groups "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/0fd2e8e9-d2d2-6326-dc2f-25297e614f85%40btinternet.com.
For more options, visit https://groups.google.com/d/optout.


Re: saving django session data for anonymous user

2018-06-12 Thread 'Anthony Flury' via Django users
The only way I can think of is when your user goes to log in - check if 
their session id is already recorded.


When they login - I assume that they get an new Session Id - and remap 
the data from their old session id to their new session Id.


Would that work ?

On 12/06/18 11:01, Siddharth Srivastava wrote:

Hi ,

i was writing small ecommerce application in django framework. so i 
was trying to implement add to cart functionality like that if user is 
anonymous user then selected products should be mapped to it's session 
id which is act. cart id in models. so the scenario is that whenever 
anonymous user check out and mapped data against that session id is 
purged. Is there any mechanism to save anonymous user session data 
even after user logs in. kindly provide easy possible solution as i am 
bit new to django:)


Thanks,

Siddharth


--
You received this message because you are subscribed to the Google 
Groups "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/d17bbc16-4c0b-4d06-bfa5-af814a20cbc6%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.



--
--
Anthony Flury
email : *anthony.fl...@btinternet.com*
Twitter : *@TonyFlury *

--
You received this message because you are subscribed to the Google Groups "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/afd880e5-38ee-e2db-6491-b53e9c69d40f%40btinternet.com.
For more options, visit https://groups.google.com/d/optout.


Re: saving django session data for anonymous user

2018-06-12 Thread Melvyn Sopacua
On dinsdag 12 juni 2018 12:01:32 CEST Siddharth Srivastava wrote:

>  so the scenario is that whenever anonymous
> user check out and mapped data against that session id is purged. Is there
> any mechanism to save anonymous user session data even after user logs in.
> kindly provide easy possible solution as i am bit new to django:)


Well, the easy solution is to follow the documentation[1]:

Note that any data set during the anonymous session is retained in the
session after a user logs in.

-- 
Melvyn Sopacua


[1] 
https://docs.djangoproject.com/en/2.0/topics/auth/default/#how-to-log-a-user-in

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


Re: Interfaz administrativa, login con SSH

2018-06-12 Thread Vijay Khemlani
La máxima seguridad (razonable) sería conectarse a una VPN y que el admin
de Django solo acepte logins desde dentro de la VPN, pero para el 99% de
los casos suena innecesario.

Para abrir un navegador dentro del servidor mismo tendrías que tener
instalado todo ambiente de escritorio en el servidor (XFCE, GNome, KDE,
algo, asumiendo un Linux), conectarte por SSH con soporte para X Server y
mandar todos los comandos via red a ese navegador, lo que es extremadamente
engorroso.

La autenticación por dos pasos es lo que usa Google, Steam, y muchos otros
servicios de alta seguridad.



On Mon, Jun 11, 2018 at 7:06 PM Frank Mascarell <
frank_mascar...@gandiweb.com> wrote:

> Gracias por vuestras recomendaciones de seguridad, muy interesantes.
> Después de recapacitar con todo esto, me planteo lo siguiente; si estamos
> desarrollando una tienda online,
> donde la base de datos se encuentra en un host remoto, y los
> administradores de la tienda deben
> entrar en ella diariamente, con todos los permisos (CRUD), ¿ la máxima
> seguridad que se puede
> implementar para la interfaz administrativa es mediante la autenticación
> de dos pasos ?
> ¿ No hay otra forma de hacerlo ? Por ejemplo, podría crear un programa en
> Python, utilizando
> la librería Paramiko para conectarme via SSH, y después ejecutar el
> comando que puede llamar
> al mismo tiempo a otro programa personalizado en el servidor, que abriría
> una ventana de navegador
> con la interfaz administrativa, si la autenticación es correcta.
> ¿alguna idea mejor?
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/ad384adf-4b44-4e3b-9beb-daff67458ca6%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/CALn3ei187SBNfz06ZGYUuhgMcpzNtJ%3DHWABibVN%3DBxdxODSyfA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Newbie : Best data archive strategy

2018-06-12 Thread mickael . barbo
Hi,

I'd like to archive some data.

I came with this idea :


class DataModel(models.Model):
xxx

class DataModelArchive(DataModel):
pass


The DataModelArchive database created has only "a pointer" to DataModel.

I saw a post indicating that I'll have to first create an AbstractDataModel 
and inherit for it for both DataModelArchive and DataModel.

Well, what is the "best way" to archive data using Django ?

Thx for your attention

Micka

-- 
You received this message because you are subscribed to the Google Groups 
"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/ef59e00a-3354-44f5-9c99-5ca85885026e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Newbie : Best data archive strategy

2018-06-12 Thread Matthew Pava
I think what you’re really looking for is an audit log.  There are some Django 
packages available that do that automatically.

You might find this one quite helpful, called Django Reversion:
https://github.com/etianen/django-reversion


From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of mickael.ba...@gmail.com
Sent: Tuesday, June 12, 2018 12:22 PM
To: Django users
Subject: Newbie : Best data archive strategy

Hi,

I'd like to archive some data.

I came with this idea :


class DataModel(models.Model):
xxx

class DataModelArchive(DataModel):
pass


The DataModelArchive database created has only "a pointer" to DataModel.

I saw a post indicating that I'll have to first create an AbstractDataModel and 
inherit for it for both DataModelArchive and DataModel.

Well, what is the "best way" to archive data using Django ?

Thx for your attention

Micka
--
You received this message because you are subscribed to the Google Groups 
"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/ef59e00a-3354-44f5-9c99-5ca85885026e%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/7f06b4e05b3443ebbe20084a6c786a20%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.


Re: Newbie : Best data archive strategy

2018-06-12 Thread mickael . barbo
Thanks Matthew for your response.

I looked at Reversion. If I understand correctly what it did, it duplicate 
each transaction on internal database ?

Le mardi 12 juin 2018 20:01:02 UTC+2, Matthew Pava a écrit :
>
> I think what you’re really looking for is an audit log.  There are some 
> Django packages available that do that automatically.
>
>  
>
> You might find this one quite helpful, called Django Reversion:
>
> https://github.com/etianen/django-reversion
>
>  
>
>  
>
> *From:* django...@googlegroups.com  [mailto:
> django...@googlegroups.com ] *On Behalf Of *
> mickae...@gmail.com 
> *Sent:* Tuesday, June 12, 2018 12:22 PM
> *To:* Django users
> *Subject:* Newbie : Best data archive strategy
>
>  
>
> Hi,
>
> I'd like to archive some data.
>
> I came with this idea :
>
>
> class DataModel(models.Model):
>
> xxx
>
>
> class DataModelArchive(DataModel):
>
> pass
>
>  
>
>
> The DataModelArchive database created has only "a pointer" to DataModel.
>
> I saw a post indicating that I'll have to first create an 
> AbstractDataModel and inherit for it for both DataModelArchive and 
> DataModel.
>
> Well, what is the "best way" to archive data using Django ?
>
> Thx for your attention
>
> Micka
>
> -- 
> You received this message because you are subscribed 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 djang...@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/ef59e00a-3354-44f5-9c99-5ca85885026e%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/86e18583-0376-43f2-8419-b557459b5ca7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Newbie : Best data archive strategy

2018-06-12 Thread Matthew Pava
Hi Mickael,
It saves a copy of each record every time a record is changed.  But it is saved 
in a separate table, so it doesn’t change your model’s table.

From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of mickael.ba...@gmail.com
Sent: Tuesday, June 12, 2018 1:17 PM
To: Django users
Subject: Re: Newbie : Best data archive strategy

Thanks Matthew for your response.

I looked at Reversion. If I understand correctly what it did, it duplicate each 
transaction on internal database ?

Le mardi 12 juin 2018 20:01:02 UTC+2, Matthew Pava a écrit :
I think what you’re really looking for is an audit log.  There are some Django 
packages available that do that automatically.

You might find this one quite helpful, called Django Reversion:
https://github.com/etianen/django-reversion


From: django...@googlegroups.com 
[mailto:django...@googlegroups.com] On Behalf Of 
mickae...@gmail.com
Sent: Tuesday, June 12, 2018 12:22 PM
To: Django users
Subject: Newbie : Best data archive strategy

Hi,

I'd like to archive some data.

I came with this idea :


class DataModel(models.Model):
xxx

class DataModelArchive(DataModel):
pass


The DataModelArchive database created has only "a pointer" to DataModel.

I saw a post indicating that I'll have to first create an AbstractDataModel and 
inherit for it for both DataModelArchive and DataModel.

Well, what is the "best way" to archive data using Django ?

Thx for your attention

Micka
--
You received this message because you are subscribed 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 djang...@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/ef59e00a-3354-44f5-9c99-5ca85885026e%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/86e18583-0376-43f2-8419-b557459b5ca7%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/148f20f481e5409a833ea043f771cbda%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.


Re: Newbie : Best data archive strategy

2018-06-12 Thread Gerardo Palazuelos Guerrero
Hi Mickael,
When I read Archive, in my mind is a different thing, not the same as
audit. So, for one moment, think about situation/scenario you are working
on.

Archive is to manage data purge from my transactional tables; this means I
want to "delete" data (that has not more value) or I want to "move" data to
an archive system (data is still relevant and useful).

Audit is to create a perfect tracking of transitions on value overtime.
This is required due to special regulations you have.

So, it might be useful if you clarify what is the scenario you are trying
to solve.

Regards,
Gerardo.



--
Gerardo Palazuelos Guerrero


On Tue, Jun 12, 2018 at 12:14 PM, Matthew Pava  wrote:

> Hi Mickael,
>
> It saves a copy of each record every time a record is changed.  But it is
> saved in a separate table, so it doesn’t change your model’s table.
>
>
>
> *From:* django-users@googlegroups.com [mailto:django-users@
> googlegroups.com] *On Behalf Of *mickael.ba...@gmail.com
> *Sent:* Tuesday, June 12, 2018 1:17 PM
> *To:* Django users
> *Subject:* Re: Newbie : Best data archive strategy
>
>
>
> Thanks Matthew for your response.
>
> I looked at Reversion. If I understand correctly what it did, it duplicate
> each transaction on internal database ?
>
> Le mardi 12 juin 2018 20:01:02 UTC+2, Matthew Pava a écrit :
>
> I think what you’re really looking for is an audit log.  There are some
> Django packages available that do that automatically.
>
>
>
> You might find this one quite helpful, called Django Reversion:
>
> https://github.com/etianen/django-reversion
>
>
>
>
>
> *From:* django...@googlegroups.com [mailto:django...@googlegroups.com] *On
> Behalf Of *mickae...@gmail.com
> *Sent:* Tuesday, June 12, 2018 12:22 PM
> *To:* Django users
> *Subject:* Newbie : Best data archive strategy
>
>
>
> Hi,
>
> I'd like to archive some data.
>
> I came with this idea :
>
>
> class DataModel(models.Model):
>
> xxx
>
>
> class DataModelArchive(DataModel):
>
> pass
>
>
>
>
> The DataModelArchive database created has only "a pointer" to DataModel.
>
> I saw a post indicating that I'll have to first create an
> AbstractDataModel and inherit for it for both DataModelArchive and
> DataModel.
>
> Well, what is the "best way" to archive data using Django ?
>
> Thx for your attention
>
> Micka
>
> --
> You received this message because you are subscribed 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 djang...@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/ef59e00a-3354-44f5-9c99-5ca85885026e%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/86e18583-0376-43f2-8419-b557459b5ca7%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/148f20f481e5409a833ea043f771cbda%40ISS1.ISS.LOCAL
> 
> .
>
> 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/CAJ8iCyNj%2B9Q8%2BNJaE5hP9CFgFJhyjFgh-SMZZ1RPm9tYO%2BaczA%40mail.gma

Re: Newbie : Best data archive strategy

2018-06-12 Thread Mickael Barbo
Ok, so "audit log" is like a "snapshot". I think it's too much for what I
need.

To clarify my needs, I have a data that once "used/read", it's no more
needed.
I just want to keep it "archived", in an other place to get access to it if
I want to add some function (statistics, etc...).

So, Gerardo, it seems to be like " I want to "move" data to an archive
system (data is still relevant and useful)."

Hope this clarify my needs...

Thx Matthew and Gerardo for your help.


2018-06-12 20:38 GMT+02:00 Gerardo Palazuelos Guerrero <
gerardo.palazue...@gmail.com>:

> Hi Mickael,
> When I read Archive, in my mind is a different thing, not the same as
> audit. So, for one moment, think about situation/scenario you are working
> on.
>
> Archive is to manage data purge from my transactional tables; this means I
> want to "delete" data (that has not more value) or I want to "move" data to
> an archive system (data is still relevant and useful).
>
> Audit is to create a perfect tracking of transitions on value overtime.
> This is required due to special regulations you have.
>
> So, it might be useful if you clarify what is the scenario you are trying
> to solve.
>
> Regards,
> Gerardo.
>
>
>
> --
> Gerardo Palazuelos Guerrero
>
>
> On Tue, Jun 12, 2018 at 12:14 PM, Matthew Pava 
> wrote:
>
>> Hi Mickael,
>>
>> It saves a copy of each record every time a record is changed.  But it is
>> saved in a separate table, so it doesn’t change your model’s table.
>>
>>
>>
>> *From:* django-users@googlegroups.com [mailto:django-users@googlegro
>> ups.com] *On Behalf Of *mickael.ba...@gmail.com
>> *Sent:* Tuesday, June 12, 2018 1:17 PM
>> *To:* Django users
>> *Subject:* Re: Newbie : Best data archive strategy
>>
>>
>>
>> Thanks Matthew for your response.
>>
>> I looked at Reversion. If I understand correctly what it did, it
>> duplicate each transaction on internal database ?
>>
>> Le mardi 12 juin 2018 20:01:02 UTC+2, Matthew Pava a écrit :
>>
>> I think what you’re really looking for is an audit log.  There are some
>> Django packages available that do that automatically.
>>
>>
>>
>> You might find this one quite helpful, called Django Reversion:
>>
>> https://github.com/etianen/django-reversion
>>
>>
>>
>>
>>
>> *From:* django...@googlegroups.com [mailto:django...@googlegroups.com] *On
>> Behalf Of *mickae...@gmail.com
>> *Sent:* Tuesday, June 12, 2018 12:22 PM
>> *To:* Django users
>> *Subject:* Newbie : Best data archive strategy
>>
>>
>>
>> Hi,
>>
>> I'd like to archive some data.
>>
>> I came with this idea :
>>
>>
>> class DataModel(models.Model):
>>
>> xxx
>>
>>
>> class DataModelArchive(DataModel):
>>
>> pass
>>
>>
>>
>>
>> The DataModelArchive database created has only "a pointer" to DataModel.
>>
>> I saw a post indicating that I'll have to first create an
>> AbstractDataModel and inherit for it for both DataModelArchive and
>> DataModel.
>>
>> Well, what is the "best way" to archive data using Django ?
>>
>> Thx for your attention
>>
>> Micka
>>
>> --
>> You received this message because you are subscribed 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 djang...@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/ef59e00a-3354-44f5-9c99-5ca85885026e%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/ms
>> gid/django-users/86e18583-0376-43f2-8419-b557459b5ca7%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/ms
>> gid/django-users/148f20f481e5409a833ea043f771cbda%40ISS1.ISS.LOCAL
>> 

I wrote a very basic Django app - Looking for a mentor

2018-06-12 Thread Carlo Ascani
Hi all,

I wrote a simple Django 2.0 app I would like to distribute.

I am a frontend developer, so my Python code could be a bit meh, that is 
why I am looking for someone you would like to mentor me and helo releasing 
a good quality codebase.

The app does one simple thing:
it crawls the sass files of your project looking for special comments, and 
generates a "living styleguide" for your website.

If anyone is interested in helping me (mostly mentoring, I am a novice at 
Python), please write me in private or on IRC Freenode (carloratm)


I have not released the code publicly only because I want to wait until the 
app reaches a minimum code quality standard.

So, if you are interested in the topic, just let me know!



To be clear: that is not a job position! :)

Best,
Carlo

-- 
You received this message because you are subscribed to the Google Groups 
"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/67c45b2e-e459-4186-8d87-c742cb08b931%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Login with pre-set credentials.

2018-06-12 Thread Mike Dewhirst

On 12/06/2018 5:56 PM, kimeualexis wrote:

Hello, guys!
Am working on a student's portal with users: Admin, Staff & Student. I 
want the admin to be able to register Students & Staff with a 
password. After being registered, the students will be able to login 
with the pre-set password and can later change it. How do I achieve 
this functionalitywhere the Admin registers a student and the 
student is able to login with the pre-set password? Kindly assist.


Is there a reason you want the Admin to do all the work instead of 
individual users? Is there a reason you want the password changed later? 
If lazy or security-unconscious Staff/Students didn't change the 
password, would you expire it? If not, what are the consequences?


Maybe a better approach could be Staff and Student self-registration 
with password rules enforcing strong passwords*. To control access, 
perhaps roles might be assigned after bona fides are established with 
the Admin. That might distribute the workload more equitably. You might 
need a CAPTCHA but they are not too difficult to implement.


If that sort of approach suits your requirements there are tutorials to 
show the way. One which I know takes that approach is here ...


https://simpleisbetterthancomplex.com/series/beginners-guide/1.11/

... and others may be found here ...

https://hackr.io/tutorials/learn-django

Cheers

Mike

* I have recently installed 
https://github.com/ubernostrum/pwned-passwords-django in one of my 
projects. It is very easy to use and works well. For example, I tested 
it out by trying to change a password to pa55w0rd. It was immediately 
rejected as a compromised password. Lovely! James Bennett deserves 
applause for that.






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 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/539e79df-ff06-40b0-93fc-2979a346eb47%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/aa039efa-c470-a7c0-a3f0-66ec8fc369ee%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.