Re: Updates in production not showing up

2019-10-23 Thread Tommy Delage
Thank you for the quick response

it was easy to restart the ngnix server, but uwsgi is showing me a list 
like this ¸

The program 'uwsgi' can be found in the following packages:
 * uwsgi-core
 * uwsgi-plugin-alarm-curl
 * uwsgi-plugin-alarm-xmpp
 * uwsgi-plugin-curl-cron
 * uwsgi-plugin-emperor-pg
 * uwsgi-plugin-erlang
 * uwsgi-plugin-geoip
 * uwsgi-plugin-graylog2
 * uwsgi-plugin-jvm-openjdk-6
 * uwsgi-plugin-jvm-openjdk-7
 * uwsgi-plugin-ldap
 * uwsgi-plugin-lua5.1
 * uwsgi-plugin-lua5.2
 * uwsgi-plugin-php
 * uwsgi-plugin-psgi
 * uwsgi-plugin-python
 * uwsgi-plugin-python3
 * uwsgi-plugin-rack-ruby1.9.1
 * uwsgi-plugin-router-access
 * uwsgi-plugin-sqlite3
 * uwsgi-plugin-v8
 * uwsgi-plugin-xslt
Ask your administrator to install one of them

When I look that up, it's all about installing and not restarting.

Also, the changes I made are in lib/site-packages/

What should I do next?


Le mardi 22 octobre 2019 11:32:54 UTC-4, Tommy Delage a écrit :
>
> I'm using django suit on digitalocean
>
> Anything I do in the files *.py doesn't show up in the production 
> environement,
>
> DigitalOcean doesn't want to go and take a look because those are files in 
> the application,
>
> I'm stuck big time, could you help me and go in my application and make a 
> minor change and tell me step by step how you did?
>
> I wish we could discuss this in private for the logins and stuff,
>
> Also I never used this Google Group thing so I don't know how or when I'm 
> gonna receive an answer
>
> Greatly appreciated
>

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


Updates in production not showing up

2019-10-22 Thread Tommy Delage
I'm using django suit on digitalocean

Anything I do in the files *.py doesn't show up in the production 
environement,

DigitalOcean doesn't want to go and take a look because those are files in 
the application,

I'm stuck big time, could you help me and go in my application and make a 
minor change and tell me step by step how you did?

I wish we could discuss this in private for the logins and stuff,

Also I never used this Google Group thing so I don't know how or when I'm 
gonna receive an answer

Greatly appreciated

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


WebSocket CONNECT WebSocket DISCONNECT WebSocket CONNECT WebSocket DISCONNECT

2017-03-21 Thread Tommy
Hi,

I'm setting up a web site using Django group. Websocket are working 
correctly in local host, i'm got three variable working and displayed in 
real time on the web page.
When i'm trying to connect from a remote host, everything is working except 
the websocket. It 's constantly connecting and disconnecting.

Any help or indication to the direction to find the solution would be 
welcomed!

I've been looking through many forums but can't find a solution to a 
similar problem

Here is what is displayed from a remote host on the putty console

[2017/03/21 13:20:35] WebSocket CONNECT /MyGroup/ [192.100.1.101:60245]
Someone connected.
Adding new user to MyGroup group
Received!!Connected!
[2017/03/21 13:20:35] WebSocket DISCONNECT /MyGroup/ [192.100.1.101:60245]
Someone left us...
[2017/03/21 13:20:37] WebSocket CONNECT /MyGroup/ [192.100.1.101:60248]
Someone connected.
Adding new user to MyGroup group
Received!!Connected!
[2017/03/21 13:20:37] WebSocket DISCONNECT /MyGroup/ [192.100.1.101:60248]
Someone left us...
[2017/03/21 13:20:39] WebSocket CONNECT /MyGroup/ [192.100.1.101:60250]
Someone connected.
Adding new user to MyGroup group
Received!!Connected!
[2017/03/21 13:20:39] WebSocket DISCONNECT /MyGroup/ [192.100.1.101:60250]
Someone left us...
Someone connected.
[2017/03/21 13:20:41] WebSocket CONNECT /MyGroup/ [192.100.1.101:60252]
Adding new user to MyGroup group
Received!!Connected!
[2017/03/21 13:20:41] WebSocket DISCONNECT /MyGroup/ [192.100.1.101:60252]
Someone left us...
Someone connected.
Adding new user to MyGroup group

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/c2ddd7ad-ee9c-432b-8ba7-957f907f5c39%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.


Permissions to view staff details per manager and per office

2015-05-10 Thread Tommy
Hi,

I am having difficulty getting my thoughts around my problem.

Given users (managerial, different levels) and depots/regional offices.

line_mangers should only see list of staff assigned to line_mangers group.

middle_managers should only see list of staff assigned from '1 to n' 
line_managers.

senior_manages should only see  list of staff assigned from '1 to 
n'  middle_managers in senior_manages depot/regional office.

executive_managers should see an overview of staff assigned 
to depots/regional offices.

I am looking at django-authority but it is unclear to me if this will work.

Q1. is what I seek row_object permissions, I am unsure of the terminology, 
I cannot get a understanding that I could explain to my grandmother. 

Q2. is it possible to have in my views.py a def that says something like
  if logged_in_user == manager_level and  is_assigned_office == 
office_n then view_only_staff_details == work_group and  region_office


models.py

class Employee(models.Model):
first_name = models.CharField(max_length=75)
surname = models.CharField(max_length=75)
mname   = models.CharField(max_length=75, blank=True, null=True)

def fullname(self):
return '%s %s' % (self.first_name, self.surname)
fullname = property(fullname)

def get_current_region(self):
eds = self.employeedynamic_set.filter(is_current=True)
if len(eds) > 1:
return "Error more than one current depot for %s." % (self)
else:
return eds[0].depot.region.name

class EmployeeDynamic(models.Model):
employee = models.ForeignKey(Employee)
address = models.ForeignKey(Address)
region = models.ForeignKey(Region)
depot = models.ForeignKey(Depot)
is_current = models.BooleanField()

I have sorted authenticated login by using django-userena 

Tommy.

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d867e076-bcc7-44da-aa70-34cdf1d4013a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: sql union all to def()

2013-04-11 Thread Tommy
Hi Rafael,

Thank you for the reply.  Not too sure if I undersatnd all of it, though.  
My learning curve is more down than up.  

You mentioned a possibly better process "using the store procedure".  Do 
you know of any examples of what you have in mind, perhaps?

I have not found a function in Django nor Python that comes close to what I 
am trying to do. I asked here hoping that someone might have some pointers.

You are correct I am attempting to collect an overall count of similiar 
values from across all the fields in the model.  Took a while to find the 
SQL on-line.

Tommy.

On Wednesday, 10 April 2013 23:03:20 UTC+1, vicherot wrote:
>
> I think that you can get all your table data on a Django View and then 
> make an algorithm to have your data, maybe using a recursive function.
>
> Like i understand you are putting together every single field in one... so 
> your first result its one field (val) then you are counting all similar 
> value, so
> 1- create an array and get all number_1
> 2- append to previus object all number_2
> 3- repeat for every field
> 4- order ascending or descending the array
> 5- take first element and compare with others and count equal values and 
> then delete that counted value (this reduce the extention of your array)
> 6- move one position and repeat and proced, like point 5, from them.
> 7- do that to the last element in the array
> This is a quick aproach... but you have an idea now. You can do it better 
> than me.
>
> I dont say that is the best choice... maybe for this particulary example 
> using the store procedure its better ( for the health of the server cpu :P )
>
> I dont know if python or django have a function to resolve your 
> requirements.
>
> See ya
>
>
> 2013/4/10 Tommy >
>
>> Hi.
>>
>> I have the SQL query below that works in PostgreSQL.
>>
>> I am attempting to learn to draw graphs/trend lines to a web page in the 
>> Django Framework
>>
>> Rather than use raw SQL queries I would like to learn how to get the same 
>> results in a Django purists fashion.  I have searched but I cannot find a 
>> solution or a solution may exist but I do not understand enough to 
>> recognize.
>>
>> Is this possible?  If so, how?  
>>
>> select val, count(*) as valcount
>>  from (
>>  select number_1 as val from xscale
>>  union all
>>  select number_2 as val from xscale
>> union all
>>  select number_3 as val from xscale
>> union all
>>  select number_4 as val from xscale
>> union all
>>  select number_5 as val from xscale
>> union all
>>  select number_6 as val from xscale
>>   ) as baseview
>>  group by val order by valcount desc, val asc;
>>
>> models.py
>>
>> from django.db import models
>>
>> class XScale(models.Model):
>> gate = models.TextField(null=False)
>> number_1 = models.IntegerField(null=False)
>> number_2 = models.IntegerField(null=False)
>> number_3 = models.IntegerField(null=False)
>> number_4 = models.IntegerField(null=False)
>> number_5 = models.IntegerField(null=False)
>> number_6 = models.IntegerField(null=False)
>>
>> class Meta:
>> db_table = u'xscale'
>>
>> def __unicode__(self):
>> return unicode (self.gate)
>>
>> Thanks for your help,
>> Tommy.
>>
>>  -- 
>> 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 http://groups.google.com/group/django-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>
>
> -- 
> Rafael E. Ferrero
> Claro: (03562) 15514856 
>

-- 
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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




sql union all to def()

2013-04-10 Thread Tommy
Hi.

I have the SQL query below that works in PostgreSQL.

I am attempting to learn to draw graphs/trend lines to a web page in the 
Django Framework

Rather than use raw SQL queries I would like to learn how to get the same 
results in a Django purists fashion.  I have searched but I cannot find a 
solution or a solution may exist but I do not understand enough to 
recognize.

Is this possible?  If so, how?  

select val, count(*) as valcount
 from (
 select number_1 as val from xscale
 union all
 select number_2 as val from xscale
union all
 select number_3 as val from xscale
union all
 select number_4 as val from xscale
union all
 select number_5 as val from xscale
union all
 select number_6 as val from xscale
  ) as baseview
 group by val order by valcount desc, val asc;

models.py

from django.db import models

class XScale(models.Model):
gate = models.TextField(null=False)
number_1 = models.IntegerField(null=False)
number_2 = models.IntegerField(null=False)
number_3 = models.IntegerField(null=False)
number_4 = models.IntegerField(null=False)
number_5 = models.IntegerField(null=False)
number_6 = models.IntegerField(null=False)

class Meta:
db_table = u'xscale'

def __unicode__(self):
return unicode (self.gate)

Thanks for your help,
Tommy.

-- 
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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Django Tutorial Equivalent to Ruby on Rails Tutorial by Michael Hartl

2012-10-22 Thread Tommy DANGerous
Thanks everyone for the help. I've gone through several tutorials, such as 
the one on the Django website and at http://lightbird.net/dbe/. Just trying 
to get more familiar with Django before I start trying to write it on my 
own. I'll take a look at the Django Book and the youtube videos you all 
posted. Thank you for all the help!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/Q8yrG7g-ny0J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Django Tutorial Equivalent to Ruby on Rails Tutorial by Michael Hartl

2012-09-26 Thread Tommy DANGerous
Hello,

I've been through several tutorials and looked around quite a bit and 
haven't really found a solid tutorial that goes through creating a web app 
in detail that is on par with the Ruby on Rails Tutorial by Michael Hartl. 

Will you please help a noobie like me and describe some tutorials for 
Django. Thank you very much in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/DN0-dhjpKGoJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.