Re: new to Django

2017-03-06 Thread chris rose
+1 ludovic

-- 
You received this message because you are subscribed to the Google Groups 
"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/47841fde-c966-41fd-9223-698e4c8220ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: new to Django

2017-03-06 Thread chris rose
+1 ludovic

-- 
You received this message because you are subscribed to the Google Groups 
"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/99d48d6e-1896-4493-94e5-fd18a2561550%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: new to Django

2017-03-06 Thread chris rose
+1 ludovic

-- 
You received this message because you are subscribed to the Google Groups 
"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/44e18a1e-1aa0-4c8e-a85e-02d370d5536f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Postgres (sqlmigrate) FK to M2M without RunPython

2017-03-06 Thread Maksym Mospanenko
Hello! I want to migrate data with schema migrations but I can't run any 
python code on database server - only raw sql (postgres).
How can I move fk column data to m2m table's fk column?

-- 
You received this message because you are subscribed to the Google Groups 
"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/c6c83ed5-946e-4fa3-9c1a-270f8ff5b978%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django Channels - Delay server for Group messages

2017-03-06 Thread Adrián Cuesta
Hi

Is there any way to send delayed messages to Group instead of a Channel?

The delay server example here 
 
gives this example:

from channels import Channel

delayed_message = {
'channel': 'example_channel',
'content': {'x': 1},
'delay': 10 * 1000
}
# The message will be delayed 10 seconds by the server and then sent
Channel('asgi.delay').send(delayed_message, immediately=True)


I would like to use the same but with Group, this way:


from channels import Group

delayed_message = {
'channel': 'example_channel',
'content': {'x': 1},
'delay': 10 * 1000
}
# The message will be delayed 10 seconds by the server and then sent
Group('asgi.delay').send(delayed_message, immediately=True)


Can someone give some feedback about this?

Thanks,

Adrián

-- 
You received this message because you are subscribed to the Google Groups 
"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/ce74c6c7-18b4-4b7e-83fe-e2cc4f6bbd1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: stop backgroundworker

2017-03-06 Thread Melvyn Sopacua
On Monday 06 March 2017 12:11:04 Shawn Milochik wrote:
> You'll have to send something from the browser (submit a form, AXAX,
> or websockets) to a Django view and update something somewhere -- 
in
> Redis or your database, probably. Then have your infinite loop check
> that location for an updated value. I recommend Redis for this
> purpose.

+1. In fact, I would not use Django to set the "stop looping" flag, since 
there is no advantage to that, unless the stops need to be tied to content 
in the database. But to just alter a value in redis, I'd use Nginx Redis2 
module[1].
-- 
Melvyn Sopacua


[1] https://github.com/openresty/redis2-nginx-module

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


Re: Chart library for django

2017-03-06 Thread Fabio C. Barrionuevo da Luz
another option:

https://github.com/agiliq/django-graphos

https://github.com/agiliq/django-graphos#charting-api-supported


live sample: http://agiliq.com/demo/graphos/





On Mon, Mar 6, 2017 at 2:15 PM, acheraime .  wrote:

> In one of my project I've used django-nvd3 (https://github.com/areski/
> django-nvd3). It's a python/django abstraction layer to d3.js.
>
> On Mon, Mar 6, 2017 at 12:03 PM, Melvyn Sopacua 
> wrote:
>
>> On Monday 06 March 2017 12:04:16 Vijay Khemlani wrote:
>>
>> > Rendering server-side charts is usually a mess, and the result
>>
>> > (usually a static image) is not as good as using a JS library.
>>
>>
>>
>> Well first - I count 10 of that grid without looking at details that use
>> JS to render. So that's the majority. Secondly, even if we were rendering
>> graphs at the server - that is a matter of choice each with its own pro's
>> and cons.
>>
>> Yes, JS graphs, especially those that are canvas based have come a long
>> way in rendering capabilities. But the quality for the end user is
>> unpredictable as is the performance, whereas the server has predictable and
>> manageable resources - what is more important is defined by the project
>> requirements.
>>
>>
>>
>> Display quality of server side generated images may exceed JS rendered,
>> depending on how far you're willing to take the rendering. The cost of
>> sending a graph is that has not altered its data can be minimized with
>> server side caching techniques such as nginx's proxy_store directive.
>>
>>
>>
>> > It also encourages separation of concerns between the frontend and
>>
>> > backend
>>
>>
>>
>> But there are concerns that are tied together:
>>
>> - the data, duh
>>
>> - graph type often depending on data
>>
>> - title, legend, labels
>>
>>
>>
>> All this is dictated by the content at the server and has to be injected
>> into js via template rendering. The packages in that grid aim to do just
>> that (and I cound 3 that use highcharts).
>>
>> --
>>
>> Melvyn Sopacua
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "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/4339883.fqjLW2Zd6i%40devstation
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
>
>
> *Adolphe CHER-AIME*
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/CA%2BfkitLEDOrsajbaqThJH1RvL3QB5K
> id12Onj4-LFMqZLMEO8A%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Fábio C. Barrionuevo da Luz
Palmas - Tocantins - Brasil - América do Sul

http://pythonclub.com.br/

Blog colaborativo sobre Python e tecnologias Relacionadas, mantido
totalmente no https://github.com/pythonclub/pythonclub.github.io .

Todos são livres para publicar. É só fazer fork, escrever sua postagem e
mandar o pull-request. Leia mais sobre como publicar em README.md e
contributing.md.
Regra básica de postagem:
"Você" acha interessante? É útil para "você"? Pode ser utilizado com Python
ou é útil para quem usa Python? Está esperando o que? Publica logo, que
estou louco para ler...

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


Re: Chart library for django

2017-03-06 Thread acheraime .
In one of my project I've used django-nvd3 (
https://github.com/areski/django-nvd3). It's a python/django abstraction
layer to d3.js.

On Mon, Mar 6, 2017 at 12:03 PM, Melvyn Sopacua 
wrote:

> On Monday 06 March 2017 12:04:16 Vijay Khemlani wrote:
>
> > Rendering server-side charts is usually a mess, and the result
>
> > (usually a static image) is not as good as using a JS library.
>
>
>
> Well first - I count 10 of that grid without looking at details that use
> JS to render. So that's the majority. Secondly, even if we were rendering
> graphs at the server - that is a matter of choice each with its own pro's
> and cons.
>
> Yes, JS graphs, especially those that are canvas based have come a long
> way in rendering capabilities. But the quality for the end user is
> unpredictable as is the performance, whereas the server has predictable and
> manageable resources - what is more important is defined by the project
> requirements.
>
>
>
> Display quality of server side generated images may exceed JS rendered,
> depending on how far you're willing to take the rendering. The cost of
> sending a graph is that has not altered its data can be minimized with
> server side caching techniques such as nginx's proxy_store directive.
>
>
>
> > It also encourages separation of concerns between the frontend and
>
> > backend
>
>
>
> But there are concerns that are tied together:
>
> - the data, duh
>
> - graph type often depending on data
>
> - title, legend, labels
>
>
>
> All this is dictated by the content at the server and has to be injected
> into js via template rendering. The packages in that grid aim to do just
> that (and I cound 3 that use highcharts).
>
> --
>
> Melvyn Sopacua
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/4339883.fqjLW2Zd6i%40devstation
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 


*Adolphe CHER-AIME*

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


Re: new to Django

2017-03-06 Thread Shawn Milochik
Go here:

https://code.djangoproject.com/

You'll find instructions on how to contribute, and also the bug tracker,
where you can search for easy bugs to fix.

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


Re: stop backgroundworker

2017-03-06 Thread Shawn Milochik
You'll have to send something from the browser (submit a form, AXAX, or
websockets) to a Django view and update something somewhere -- in Redis or
your database, probably. Then have your infinite loop check that location
for an updated value. I recommend Redis for this purpose.

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


Re: Chart library for django

2017-03-06 Thread Melvyn Sopacua
On Monday 06 March 2017 12:04:16 Vijay Khemlani wrote:
> Rendering server-side charts is usually a mess, and the result
> (usually a static image) is not as good as using a JS library.

Well first - I count 10 of that grid without looking at details that use JS to 
render. So 
that's the majority. Secondly, even if we were rendering graphs at the server - 
that is a 
matter of choice each with its own pro's and cons.
Yes, JS graphs, especially those that are canvas based have come a long way in 
rendering capabilities. But the quality for the end user is unpredictable as is 
the 
performance, whereas the server has predictable and manageable resources - what 
is more important is defined by the project requirements.

Display quality of server side generated images may exceed JS rendered, 
depending 
on how far you're willing to take the rendering. The cost of sending a graph is 
that has 
not altered its data can be minimized with server side caching techniques such 
as 
nginx's proxy_store directive.

> It also encourages separation of concerns between the frontend and
> backend

But there /are/ concerns that are tied together:
- the data, duh
- graph type often depending on data
- title, legend, labels

All this is dictated by the content at the server and has to be injected into 
js via 
template rendering. The packages in that grid aim to do just that (and I cound 
3 that 
use highcharts).
-- 
Melvyn Sopacua

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


Django Permissions

2017-03-06 Thread Jim Lamb
I am trying to give add to the django permissions  when you add a Type to a 
Source with the following models.py  I would like it to be 

from __future__ import unicode_literals

from django.db import models

"""Class for Data Sources"""
class Source(models.Model):
display_name = models.CharField(max_length=20)
code_name = models.CharField(max_length=20)

def __unicode__(self):
return self.display_name

list_display = ['display_name', 'code_name', ]
search_fields = ['display_name', 'code_name', ]

""" Class for Data Types"""
class Type(models.Model):
display_name = models.CharField(max_length=20)
code_name = models.CharField(max_length=20)
data_sources = models.ManyToManyField(DataSource)

for data_source in data_sources:

def __unicode__(self):
return self.display_name

list_display = ['display_name', 'code_name', ]
search_fields = ['display_name', 'code_name', ]


Do I need to have a views.py?  I would like it to be

auth|permsission|type


Thanks in advance

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


Django Permissions

2017-03-06 Thread Jim Lamb
I am trying to add django permissions when a type add a source iusing the 
following model

from __future__ import unicode_literals

from django.db import models

"""Class for Data Sources"""
class DataSource(models.Model):
display_name = models.CharField(max_length=20)
code_name = models.CharField(max_length=20)

def __unicode__(self):
return self.display_name

list_display = ['display_name', 'code_name', ]
search_fields = ['display_name', 'code_name', ]

""" Class for Data Types"""
class DataType(models.Model):
display_name = models.CharField(max_length=20)
code_name = models.CharField(max_length=20)
data_sources = models.ManyToManyField(DataSource)

for data_source in data_sources:

def __unicode__(self):
return self.display_name

list_display = ['display_name', 'code_name', ]
search_fields = ['display_name', 'code_name', ]


I want it to add auth|permission|type  Type equals what ever the type is



-- 
You received this message because you are subscribed to the Google Groups 
"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/18a9c567-0a76-4068-a787-c7553eac8fd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


stop backgroundworker

2017-03-06 Thread Tommy
Hi,

I'm new to Django and would need some advice. 

I've got a process launched with a command: python manage.py myprocess. 
I've got an infinite loop there where i use Group("mygroup").send({'text': 
state_text}). Everything is well displayed on my html page.

However i'd like to use buttons on my html page to stop this loop. Is there 
a way for my backgroundworker to get the value of which button was press on 
the html page?

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 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/90f79cda-f6db-4ef9-8021-6520774401d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: new to Django

2017-03-06 Thread 'Anoosha Masood Keen' via Django users
Hi I am new to Django and I don't know where to start or what to do for 
contribution?

On Sunday, March 5, 2017 at 10:58:09 PM UTC+5, jayant jain wrote:
>
> Hi all users,
> I am a new user of* Django*
> with a basic knowledge of * Python* language .Please recommend *me what 
> more to learn* to start contributing to Django and how to 
> *start contributing.Example if *i do need to know about networking, GUI 
> ,etc.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/fec204cf-496d-4c9d-bd7d-3a20d49ad580%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Request for advice on refactoring a big Django project

2017-03-06 Thread Mark Phillips
I echo Vijay's comment. Lists like this are really great for very specific
questions and short code segments or error message that a more experienced
person can answer off the top of their head. Your question is very broad
and requires a large time commitment from the reader to respond. With that
said, there is nothing wrong with posting your question as you may get
someone who has some free time to dive in and try to help. Or someone who
has done a lot of refactoring and can give you some pointers. But don't be
dismayed if no one responds.

You could also rephrase your question to be more like "I am in the process
of refactoring a large project. What recommendations would you make as far
as how to tackle this project? We built the project using Django x.x.x, so
where would you recommend we start with this project." More along the lines
of best practices for refactoring django projects, or what has the reader
learned after refactoring django projects. This question does not require
the reader to dive into your code, but to relate what they know about the
topic. Easier and much less time consuming for the reader.

You could also offer to pay someone to help kick start your project, and
then if someone responds, take the discussion offline.

As you refactor the project and run into issues, be sure to post those very
specific questions and short code segments/error message to the list. The
folks here are very friendly, extremely knowledgeable, and very willing to
help as long as you make it super easy for them to help you figure out the
answer to a specific question.

God luck!

Mark.

On Mon, Mar 6, 2017 at 5:13 AM, Vijay Khemlani  wrote:

> Also, this type mailing lists are usually for specific questions about
> the framework
>
> "How do I make this particular query with the ORM"
> "Why isn't this variable getting rendered in the template"
>
> etc
>
> Your question is kinda broad
>
> On 3/6/17, Bob Haugen  wrote:
> > Antonis, thank you very much for the feedback! You are absolutely
> > correct! I apologize to you and the list, and will strive to follow
> > your suggestions in the future.
> >
> > I suspect, however, that the very long explanation that would have
> > been required to avoid the links would have been offputting, too. This
> > might be a request that was just inappropriate for this list.
> >
> > As for now, we're charging happily ahead.
> >
> > On Mon, Mar 6, 2017 at 5:45 AM, Antonis Christofides
> >  wrote:
> >> Hi,
> >>
> >> I, like many people, am busy. I will generally not spend too much time
> on
> >> the messages of this list. I delete most of them after only reading the
> >> subject line. If I do choose to read the body, I expect to understand
> >> what
> >> it is about after a few seconds of reading. But all I can see in your
> >> original message is that you have a big Django project that needs
> >> refactoring, and several links with the code and your discussions about
> >> them. Essentially the message I'm getting is "I can't tell you what I
> >> want
> >> in this email message, but if you click on these links and study them
> for
> >> about half an hour, you'll get it".
> >>
> >> Likewise, it would have been way better to include your original message
> >> in
> >> the reply. In order to find your original message I had to dig in my
> >> Trash
> >> folder. I would normally not do that, and I would have ignored your
> reply
> >> as
> >> well. It just happens that I'm travelling and I'm quite relaxed.
> >>
> >> Bottom line: you need to make it very easy for me to help you, and I
> >> believe
> >> the same goes for other people as well.
> >>
> >> Regards,
> >>
> >> Antonis
> >>
> >> Antonis Christofides
> >> http://djangodeployment.com
> >>
> >> On 03/06/2017 12:36 PM, bobhaugen wrote:
> >>
> >> I was disappointed to get no response on this topic, and would be
> >> grateful
> >> for any feedback on why that might have been.
> >>
> >> Too big? Big ball of mud? Stupid project? ? (I have very little
> >> touchiness...)
> >>
> >> I hope people did not think we wanted to get them to do all or even very
> >> much work for us. We are charging ahead here:
> >> https://github.com/django-rea
> >>
> >> We did find, and are using, some delicious advice from Marty Alchin:
> >> http://martyalchin.com/2008/jan/10/simple-plugin-framework/
> >> And upgrading to the latest version of django, changing to class-based
> >> views, and breaking up both models and views into several files.
> >>
> >> Next: a bunch of abstract base classes.
> >>
> >> After that: more API work and a mobile app to use it.
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "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 

Re: Chart library for django

2017-03-06 Thread Vijay Khemlani
Rendering server-side charts is usually a mess, and the result
(usually a static image) is not as good as using a JS library.

I use Highcharts, just had to make a little layer on top of it to make
it compatible with the JSON django was generating.

It also encourages separation of concerns between the frontend and backend

On 3/6/17, Melvyn Sopacua  wrote:
> On Sunday 05 March 2017 22:10:07 Luvpreet Singh wrote:
>
>> I am looking for some solution to display django database
> queryset to
>> django admin over graphs.
>
> https://djangopackages.org/grids/g/charts/
>
> Problem is, the majority is abandonware.
> --
> Melvyn Sopacua
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/1685391.OzplGY75kk%40devstation.
> 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/CALn3ei3Kk4_QoM60d5%2BoAVLRzrFCKmQmkgDcMq--Qc92Ym3-_w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multiple Users

2017-03-06 Thread Lekan Wahab
##This is one approach.
You can have a single user profile and a number of other users tied to
the user profile via ForeignKey.


class UserProfile(models.Model):
user = models.ForeignKey(User)
#define general fields
class Freelancer(models.Model):
profile = models.ForeignKey(UserProfile)
#freelancer specific  fields

class Meta:
db_table = 'freelancer'
class Customers(models.Model):
profile = models.ForeignKey(UserProfile)
#customer specific fields

   class Meta:
db_table = 'customer'


Another approach(which i don't think is the best) would be to have a single
UserProfile but with a table that identifies the type of user you have.
Something like this:

class UserProfile(models.Model):
user = models.OneToOneField(User)
description = models.CharField(max_length=100, default='')
country = models.CharField(max_length=100, default='')
website = models.URLField(default='')
phone = models.IntegerField(default=0)

##The user type would be boolean and 0 by default. 0 could be a
freelancer and 1 a Customer or the other way round.
##So, based on the type of user you're creating, you could just
set a new value for user_type.
user_type = models.BooleanField(default=0)

###This method would come in handy if both users have exactly the same features.
###But I'd rather go with the first method.







On Mon, Mar 6, 2017 at 2:37 PM, Focus Ifeanyi  wrote:

> I am new to Django and trying to create an App with two User Types
> (Freelancers and Customers). I understand how to create a User profile
> Class and it works well for me:
>
> class UserProfile(models.Model):
> user = models.OneToOneField(User)
> description = models.CharField(max_length=100, default='')
> country = models.CharField(max_length=100, default='')
> website = models.URLField(default='')
> phone = models.IntegerField(default=0)
> def create_profile(sender, **kwargs):
> if kwargs['created']:
> user_profile = UserProfile.objects.create(user=kwargs['instance'])
>
>
> post_save.connect(create_profile, sender=User)
>
> This works well for me on a one user type user. But now I am building an
> app with 2 types of users (freelancers and customers), what is the best
> approach to get this done. Both users will have different view and info.
> Should I:
>
>- Create 2 different apps, and repeat the normal registeration and
>login for each.
>- If I do the above, hope the freelancers when logged in won't access
>customers view.
>- How do I add user type to the user profile if I decide to use one
>app and model for it.  Please I need a step by step beginner approach, or a
>link to relevant source. 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/7c9f19a0-0e25-4529-9353-6e69b1d9e695%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/CAE6v7ocxKgRkfh9Ez7UaRSGOByKph2vM5GWPCo8DEbq%3DwZ6u3g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Multiple Users

2017-03-06 Thread Focus Ifeanyi


I am new to Django and trying to create an App with two User Types 
(Freelancers and Customers). I understand how to create a User profile 
Class and it works well for me:

class UserProfile(models.Model):
user = models.OneToOneField(User)
description = models.CharField(max_length=100, default='')
country = models.CharField(max_length=100, default='')
website = models.URLField(default='')
phone = models.IntegerField(default=0)
def create_profile(sender, **kwargs):
if kwargs['created']:
user_profile = UserProfile.objects.create(user=kwargs['instance'])


post_save.connect(create_profile, sender=User)

This works well for me on a one user type user. But now I am building an 
app with 2 types of users (freelancers and customers), what is the best 
approach to get this done. Both users will have different view and info. 
Should I:

   - Create 2 different apps, and repeat the normal registeration and login 
   for each.
   - If I do the above, hope the freelancers when logged in won't access 
   customers view.
   - How do I add user type to the user profile if I decide to use one app 
   and model for it.  Please I need a step by step beginner approach, or a 
   link to relevant source. 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/7c9f19a0-0e25-4529-9353-6e69b1d9e695%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Issue with Django-axes

2017-03-06 Thread Melvyn Sopacua
On Monday 06 March 2017 01:51:13 Arun S wrote:

> i am using django-axes package and want to lock out a user based on
> userid.

If you want to deactivate the account, then do so.
"The login_required decorator does NOT check the is_active flag on a user, but 
the default AUTHENTICATION_BACKENDS[1] reject inactive users."

>From the docs[2].
-- 
Melvyn Sopacua


[1] 
https://docs.djangoproject.com/en/1.10/ref/settings/#std:setting-AUTHENTICATION_BACKENDS
[2] https://docs.djangoproject.com/en/1.10/topics/auth/default/

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


Re: Chart library for django

2017-03-06 Thread Melvyn Sopacua
On Sunday 05 March 2017 22:10:07 Luvpreet Singh wrote:

> I am looking for some solution to display django database 
queryset to
> django admin over graphs.

https://djangopackages.org/grids/g/charts/

Problem is, the majority is abandonware.
-- 
Melvyn Sopacua

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


Re: How do you populate an update form in a Bootstrap Modal?

2017-03-06 Thread Michael Chenetz
Melvyn,

Thanks... I will take a look through your code and see if i can figure it 
out.

Mike

On Sunday, March 5, 2017 at 5:59:51 PM UTC-5, Melvyn Sopacua wrote:
>
> On Sunday 05 March 2017 13:40:44 Michael Chenetz wrote:
>
> > Thanks Melvyn... I am not having issues with a generic update form.
>
>  
>
> The important stuff is in the last line. I was explaining how you can do 
> it and where to look for inspiration.
>
>  
>
> > The problem is when using it in a Bootstrap Modal. I think it is a
>
> > javascript/ajax issue. That is the piece I need to figure out.
>
>  
>
> That depends on your workflow. You can fill the form using an Ajax call, 
> yes. But - you don't have to. 
> 
>
>  
>
> The above is part of code I'm working on. I am actually working on 
> handling duplicated form media in the AdditionalFormsManager, so it 
> certainly isn't production quality yet - but it will work just fine for 
> illustration purposes or base for your own code.
>
>  
>
> -- 
>
> Melvyn Sopacua
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/1153b7bd-2cff-42ea-a05f-208ea513e3ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Writing your first Django app, part 4

2017-03-06 Thread friscosoftware
Duh,  thanks, I must have missed that step in the tutorial.  Works great 
now.

On Sunday, March 5, 2017 at 8:02:44 AM UTC-7, ludovic coues wrote:
>
> You didn't share your code, so all we can do is guess. 
> My guess is that your poll don't have any answer so there is nothing to 
> render. 
>
> Try using this form: 
>
> {{ question.question_text }} 
>
> {% if error_message %}{{ error_message }}{% endif 
> %} 
>
>  
> {% csrf_token %} 
> {% for choice in question.choice_set.all %} 
>  value="{{ choice.id }}" /> 
> {{ choice.choice_text 
> }} 
> {% else %} 
> There is no choice for this question! Add one in the admin. 
> {% endfor %} 
>  
>  
>
> 2017-03-05 15:10 GMT+01:00  : 
> > I'm in the process of learning Django and working throught the tutorial, 
> > Writing your first Django app. I'm getting stuck on part 4.  The form n 
> > detail.html doesn't display radio buttons.  Thus there is nothing to 
> select 
> > and when I submit the form, I get the message, "You didn't select a 
> choice." 
> > 
> > Thoughts? 
> > 
> > Thanks, 
> > Phil 
> > 
> > -- 
> > You received this message because you are subscribed 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/1ccefa6a-4a5a-46bd-8b21-139349da8782%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>
> -- 
>
> Cordialement, Coues Ludovic 
> +336 148 743 42 
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/efd4086a-bb62-4afe-ac1a-7dd6aa11b954%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Request for advice on refactoring a big Django project

2017-03-06 Thread Vijay Khemlani
Also, this type mailing lists are usually for specific questions about
the framework

"How do I make this particular query with the ORM"
"Why isn't this variable getting rendered in the template"

etc

Your question is kinda broad

On 3/6/17, Bob Haugen  wrote:
> Antonis, thank you very much for the feedback! You are absolutely
> correct! I apologize to you and the list, and will strive to follow
> your suggestions in the future.
>
> I suspect, however, that the very long explanation that would have
> been required to avoid the links would have been offputting, too. This
> might be a request that was just inappropriate for this list.
>
> As for now, we're charging happily ahead.
>
> On Mon, Mar 6, 2017 at 5:45 AM, Antonis Christofides
>  wrote:
>> Hi,
>>
>> I, like many people, am busy. I will generally not spend too much time on
>> the messages of this list. I delete most of them after only reading the
>> subject line. If I do choose to read the body, I expect to understand
>> what
>> it is about after a few seconds of reading. But all I can see in your
>> original message is that you have a big Django project that needs
>> refactoring, and several links with the code and your discussions about
>> them. Essentially the message I'm getting is "I can't tell you what I
>> want
>> in this email message, but if you click on these links and study them for
>> about half an hour, you'll get it".
>>
>> Likewise, it would have been way better to include your original message
>> in
>> the reply. In order to find your original message I had to dig in my
>> Trash
>> folder. I would normally not do that, and I would have ignored your reply
>> as
>> well. It just happens that I'm travelling and I'm quite relaxed.
>>
>> Bottom line: you need to make it very easy for me to help you, and I
>> believe
>> the same goes for other people as well.
>>
>> Regards,
>>
>> Antonis
>>
>> Antonis Christofides
>> http://djangodeployment.com
>>
>> On 03/06/2017 12:36 PM, bobhaugen wrote:
>>
>> I was disappointed to get no response on this topic, and would be
>> grateful
>> for any feedback on why that might have been.
>>
>> Too big? Big ball of mud? Stupid project? ? (I have very little
>> touchiness...)
>>
>> I hope people did not think we wanted to get them to do all or even very
>> much work for us. We are charging ahead here:
>> https://github.com/django-rea
>>
>> We did find, and are using, some delicious advice from Marty Alchin:
>> http://martyalchin.com/2008/jan/10/simple-plugin-framework/
>> And upgrading to the latest version of django, changing to class-based
>> views, and breaking up both models and views into several files.
>>
>> Next: a bunch of abstract base classes.
>>
>> After that: more API work and a mobile app to use it.
>> --
>> You received this message because you are subscribed to the Google Groups
>> "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/a3e12fd2-fc27-447a-a5f5-e394c3d67cff%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/9OU0TfwcmTQ/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/4d7559f1-e3a2-64f0-d6b3-60c902e17921%40djangodeployment.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/CA%2BSvw0WRHpTUUV1RceS8MWuRjGQ3JyJqZ%3DCKdKGSLYV8%2BQma2g%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 

Re: Chart library for django

2017-03-06 Thread Larry Martell
On Mon, Mar 6, 2017 at 1:10 AM, Luvpreet Singh  wrote:
>
> Hi everyone,
>
> I am looking for some solution to display django database queryset to django 
> admin over graphs.
> I had used highcharts to do that earlier, but to use highcharts, I have to 
> write too much scripts and functions.
>
> Is there any kind of inbuilt library that comes with django similar to 
> highcharts by which I can display django database queryset in my django admin 
> template ?

The 2 charting packages I use in my django apps are jqplot and plotly.
But they are both client side, and have nothing to do with django.

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


Re: Request for advice on refactoring a big Django project

2017-03-06 Thread Bob Haugen
Antonis, thank you very much for the feedback! You are absolutely
correct! I apologize to you and the list, and will strive to follow
your suggestions in the future.

I suspect, however, that the very long explanation that would have
been required to avoid the links would have been offputting, too. This
might be a request that was just inappropriate for this list.

As for now, we're charging happily ahead.

On Mon, Mar 6, 2017 at 5:45 AM, Antonis Christofides
 wrote:
> Hi,
>
> I, like many people, am busy. I will generally not spend too much time on
> the messages of this list. I delete most of them after only reading the
> subject line. If I do choose to read the body, I expect to understand what
> it is about after a few seconds of reading. But all I can see in your
> original message is that you have a big Django project that needs
> refactoring, and several links with the code and your discussions about
> them. Essentially the message I'm getting is "I can't tell you what I want
> in this email message, but if you click on these links and study them for
> about half an hour, you'll get it".
>
> Likewise, it would have been way better to include your original message in
> the reply. In order to find your original message I had to dig in my Trash
> folder. I would normally not do that, and I would have ignored your reply as
> well. It just happens that I'm travelling and I'm quite relaxed.
>
> Bottom line: you need to make it very easy for me to help you, and I believe
> the same goes for other people as well.
>
> Regards,
>
> Antonis
>
> Antonis Christofides
> http://djangodeployment.com
>
> On 03/06/2017 12:36 PM, bobhaugen wrote:
>
> I was disappointed to get no response on this topic, and would be grateful
> for any feedback on why that might have been.
>
> Too big? Big ball of mud? Stupid project? ? (I have very little
> touchiness...)
>
> I hope people did not think we wanted to get them to do all or even very
> much work for us. We are charging ahead here:
> https://github.com/django-rea
>
> We did find, and are using, some delicious advice from Marty Alchin:
> http://martyalchin.com/2008/jan/10/simple-plugin-framework/
> And upgrading to the latest version of django, changing to class-based
> views, and breaking up both models and views into several files.
>
> Next: a bunch of abstract base classes.
>
> After that: more API work and a mobile app to use it.
> --
> You received this message because you are subscribed to the Google Groups
> "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/a3e12fd2-fc27-447a-a5f5-e394c3d67cff%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/9OU0TfwcmTQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4d7559f1-e3a2-64f0-d6b3-60c902e17921%40djangodeployment.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/CA%2BSvw0WRHpTUUV1RceS8MWuRjGQ3JyJqZ%3DCKdKGSLYV8%2BQma2g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Request for advice on refactoring a big Django project

2017-03-06 Thread Vinicius Assef
+1

On 6 March 2017 at 08:45, Antonis Christofides
 wrote:
> Hi,
>
> I, like many people, am busy. I will generally not spend too much time on
> the messages of this list. I delete most of them after only reading the
> subject line. If I do choose to read the body, I expect to understand what
> it is about after a few seconds of reading. But all I can see in your
> original message is that you have a big Django project that needs
> refactoring, and several links with the code and your discussions about
> them. Essentially the message I'm getting is "I can't tell you what I want
> in this email message, but if you click on these links and study them for
> about half an hour, you'll get it".
>
> Likewise, it would have been way better to include your original message in
> the reply. In order to find your original message I had to dig in my Trash
> folder. I would normally not do that, and I would have ignored your reply as
> well. It just happens that I'm travelling and I'm quite relaxed.
>
> Bottom line: you need to make it very easy for me to help you, and I believe
> the same goes for other people as well.
>
> Regards,
>
> Antonis
>
> Antonis Christofides
> http://djangodeployment.com
>
> On 03/06/2017 12:36 PM, bobhaugen wrote:
>
> I was disappointed to get no response on this topic, and would be grateful
> for any feedback on why that might have been.
>
> Too big? Big ball of mud? Stupid project? ? (I have very little
> touchiness...)
>
> I hope people did not think we wanted to get them to do all or even very
> much work for us. We are charging ahead here:
> https://github.com/django-rea
>
> We did find, and are using, some delicious advice from Marty Alchin:
> http://martyalchin.com/2008/jan/10/simple-plugin-framework/
> And upgrading to the latest version of django, changing to class-based
> views, and breaking up both models and views into several files.
>
> Next: a bunch of abstract base classes.
>
> After that: more API work and a mobile app to use it.
> --
> You received this message because you are subscribed to the Google Groups
> "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/a3e12fd2-fc27-447a-a5f5-e394c3d67cff%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/4d7559f1-e3a2-64f0-d6b3-60c902e17921%40djangodeployment.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/CAFmXjSAN_7xWbZJ7MHkxCv7OeNSfyFCKf%2BiS%2BA0rbgsBf3Lz%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Request for advice on refactoring a big Django project

2017-03-06 Thread Antonis Christofides
Hi,

I, like many people, am busy. I will generally not spend too much time on the
messages of this list. I delete most of them after only reading the subject
line. If I do choose to read the body, I expect to understand what it is about
after a few seconds of reading. But all I can see in your original message is
that you have a big Django project that needs refactoring, and several links
with the code and your discussions about them. Essentially the message I'm
getting is "I can't tell you what I want in this email message, but if you click
on these links and study them for about half an hour, you'll get it".

Likewise, it would have been way better to include your original message in the
reply. In order to find your original message I had to dig in my Trash folder. I
would normally not do that, and I would have ignored your reply as well. It just
happens that I'm travelling and I'm quite relaxed.

Bottom line: you need to make it very easy for me to help you, and I believe the
same goes for other people as well.

Regards,

Antonis

Antonis Christofides
http://djangodeployment.com

On 03/06/2017 12:36 PM, bobhaugen wrote:
> I was disappointed to get no response on this topic, and would be grateful for
> any feedback on why that might have been.
>
> Too big? Big ball of mud? Stupid project? ? (I have very little 
> touchiness...)
>
> I hope people did not think we wanted to get them to do all or even very much
> work for us. We are charging ahead here:
> https://github.com/django-rea
>
> We did find, and are using, some delicious advice from Marty Alchin:
> http://martyalchin.com/2008/jan/10/simple-plugin-framework/
> And upgrading to the latest version of django, changing to class-based views,
> and breaking up both models and views into several files.
>
> Next: a bunch of abstract base classes.
>
> After that: more API work and a mobile app to use it.
> -- 
> You received this message because you are subscribed to the Google Groups
> "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/a3e12fd2-fc27-447a-a5f5-e394c3d67cff%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/4d7559f1-e3a2-64f0-d6b3-60c902e17921%40djangodeployment.com.
For more options, visit https://groups.google.com/d/optout.


Re: Issue with Django-axes

2017-03-06 Thread Babatunde Akinyanmi
I think the only way you will be able to uniquely identify a computer is by
using a "permanent"  cookie. I find such practice very very intrusive and
it's something I will personally not do.

Meanwhile, IP addresses, cookies and the likes are good to identify
computers not users. If you really want to identify a user, you will have
to make them log in.

On 6 Mar 2017 10:51, "Arun S"  wrote:

> Hi,
>
> i am using django-axes package and want to lock out a user based on userid.
>
> Now there is an issue that the user gets locked out from one IP, but the
> same user can still login from a different IP successfully.
> Which negates the whole use of a security requirement of locking a
> particular user for a period of time.
>
> I read at mulitple places that there is an issue with the axes package
> itself.
>
> Is there  any middleware that can be used with Django which can handle
> this situation.
>
>
> Cheers
> Arun.
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/0913a3c8-7dd4-42cf-8524-c638ac26af38%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/CA%2BWjgXPU2S_PqrH7NZixps45TLNY0FxcqzpTe3StjJTXu%2BqdeA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Request for advice on refactoring a big Django project

2017-03-06 Thread bobhaugen
I was disappointed to get no response on this topic, and would be grateful 
for any feedback on why that might have been.

Too big? Big ball of mud? Stupid project? ? (I have very little 
touchiness...)

I hope people did not think we wanted to get them to do all or even very 
much work for us. We are charging ahead here:
https://github.com/django-rea

We did find, and are using, some delicious advice from Marty Alchin:
http://martyalchin.com/2008/jan/10/simple-plugin-framework/
And upgrading to the latest version of django, changing to class-based 
views, and breaking up both models and views into several files.

Next: a bunch of abstract base classes.

After that: more API work and a mobile app to use it.

-- 
You received this message because you are subscribed to the Google Groups 
"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/a3e12fd2-fc27-447a-a5f5-e394c3d67cff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: USING graphs in django admin

2017-03-06 Thread chris rose
i have used d3.js in a template and past it data when answering a http 
request with a view

i found d3.js a little interesting to wrap my head around but it is a good 
tool

not used it with the admin though

-- 
You received this message because you are subscribed to the Google Groups 
"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/a7b4bec2-1a77-4be3-bcdf-e3f3a00c3b79%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Issue with Django-axes

2017-03-06 Thread Arun S
Hi,

i am using django-axes package and want to lock out a user based on userid.

Now there is an issue that the user gets locked out from one IP, but the 
same user can still login from a different IP successfully.
Which negates the whole use of a security requirement of locking a 
particular user for a period of time.

I read at mulitple places that there is an issue with the axes package 
itself.

Is there  any middleware that can be used with Django which can handle this 
situation.


Cheers
Arun.

-- 
You received this message because you are subscribed to the Google Groups 
"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/0913a3c8-7dd4-42cf-8524-c638ac26af38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Channels vs serverless: how much they are alike

2017-03-06 Thread Andrew Godwin
Channels' message queue is designed for a much lower latency than most
"serverless" solutions, which are more often for non-interactive
processing. There's a whole host of other differences too, around design,
deployment, etc. that are all tradeoffs; at some point, a lot of
distributed systems come down to message passing and separate tasks (e.g.
SOA infrastructures) that it's hard to talk about these things without a
clearer definition of what "serverless" actually means.

Andrew

On Sun, Mar 5, 2017 at 3:00 PM, Виталик Абеткин  wrote:

> From what I know serverless architectures use message queues and
> distribute tasks that handle various events to workers
> pretty much in the same way django channels do. How much they are really
> alike? For instance, let's take openwhisk.org implementation
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/b9250070-386f-46e0-92d5-42809f6e6a3c%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/CAFwN1urCByvbNMa8vOjoGQ%3DXQZ0mNo4hRToT3XkV_RZFF%2B21bQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.