Error with creating mysite first django tutorial

2012-01-27 Thread samuel muiruri
I'm having a problem with the procedure stated on making you're first
project... I'm not sure how exactly it should work since python syntax
can't work with the dashes and command prompt of window wouldn't i
need to navigate to the folder where the admin file is? I'm good with
python I'm just stuck as to how this works.
I located the file in bin inside the django module and run it, I got
an error message
I presume it might be trying to connect to the internet or gett stats
on my internet connection capability in general a task that requires
an internet connection which I don't have. If this is the case then
thats why it's not working otherwise I cant say why.

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



permission denied for relation gallery_image

2017-07-19 Thread Samuel Muiruri
I made a mistake and overwrote the Django server's settings file with the
local version and I lost the database settings for postgresql I have setup
a new user and when I tried to reload the site again I get an error from
one of the models as permission denied for relation gallery_image

if I try this command from the shell

from gallery.models import Image

I get back

ProgrammingError: permission denied for relation gallery_image


-- 

Best Regards,

Samuel Muiruri.

Web Designer | +254 738 940064

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


Setting up a "update" async with channels

2017-08-28 Thread Samuel Muiruri
Hi,
I want to use django-channels to show progress report of a background
process (percentage & time remaining) this is returned as a string.

My desired process flow would be:

   1. User connects with sockets
   2. process is started
   3. continous feedback is sent back to *specific user *every "x" seconds
   4. final feedback with result sent and closes connection

I've gotten through setting up channels and the starting tutorial, if you
can give me an example on this will be appreciated.

-- 

Best Regards,

Samuel Muiruri.

Web Designer | +254 738 940064

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


Re: Setting up a "update" async with channels

2017-08-28 Thread Samuel Muiruri
I'm pushing some changes now but I will try it that way then and see how it 
responds.

On Tuesday, August 29, 2017 at 2:55:19 AM UTC+3, Andrew Godwin wrote:
>
> You also asked this as a GitHub issue with more detail (
> https://github.com/django/channels/issues/728) - I'm going to close that 
> and answer it here, since this is the right place.
>
> I don't have a good example for this, but I will outline how I would 
> roughly do it (which your code already sort of does):
>
> - Make a group per process you want to run
> - Add any socket that wishes to see the status of this process to that 
> group (your code will have to work out who an incoming socket is and assign 
> appropriately)
> - Send information to the group from whatever other Python process is 
> monitoring the background process (note: you cannot run the process from 
> inside a consumer, consumers should be nonblocking), for both updates and 
> when it exits
>
> Andrew
>
> On Mon, Aug 28, 2017 at 3:53 AM, Samuel Muiruri  > wrote:
>
>> Hi,
>> I want to use django-channels to show progress report of a background 
>> process (percentage & time remaining) this is returned as a string. 
>>
>> My desired process flow would be:
>>
>>1. User connects with sockets
>>2. process is started
>>3. continous feedback is sent back to *specific user *every "x" 
>>seconds
>>4. final feedback with result sent and closes connection
>>
>> I've gotten through setting up channels and the starting tutorial, if you 
>> can give me an example on this will be appreciated.
>>
>> -- 
>>
>> Best Regards,
>>
>> Samuel Muiruri.
>>
>> Web Designer | +254 738 940064
>>
>> -- 
>> 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/CAJZFZXptZ4HKZOjrS_K2zDp0xoPJRXuSpFdzBvC41hQdU9%3DS0g%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/django-users/CAJZFZXptZ4HKZOjrS_K2zDp0xoPJRXuSpFdzBvC41hQdU9%3DS0g%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> 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/9cdf5c8e-f5cc-491f-856f-2a8c08cb89ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


django migration error: django.db.utils.ProgrammingError: must be owner of relation account_userprofile

2017-08-28 Thread Samuel Muiruri
getting this error when I'm running migrate, to note this is likely related 
to the db connection I believe

(revampenv) sammy@samuel-pc:~/revamp$ python manage.py migrate
Operations to perform:
  Apply all migrations: account, sessions, admin, auth, thumbnail, 
contenttypes, gallery
Running migrations:
  Rendering model states... DONE
  Applying account.0003_userprofile_bio...Traceback (most recent call last):
  File "manage.py", line 10, in 
execute_from_command_line(sys.argv)
  File 
"/home/sammy/revamp/revampenv/local/lib/python2.7/site-packages/django/core/management/__init__.py",
 
line 353, in execute_from_command_line
utility.execute()
  File 
"/home/sammy/revamp/revampenv/local/lib/python2.7/site-packages/django/core/management/__init__.py",
 
line 345, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/home/sammy/revamp/revampenv/local/lib/python2.7/site-packages/django/core/management/base.py",
 
line 348, in run_from_argv
self.execute(*args, **cmd_options)
  File 
"/home/sammy/revamp/revampenv/local/lib/python2.7/site-packages/django/core/management/base.py",
 
line 399, in execute
output = self.handle(*args, **options)
  File 
"/home/sammy/revamp/revampenv/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py",
 
line 200, in handle
executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
  File 
"/home/sammy/revamp/revampenv/local/lib/python2.7/site-packages/django/db/migrations/executor.py",
 
line 92, in migrate
self._migrate_all_forwards(plan, full_plan, fake=fake, 
fake_initial=fake_initial)
  File 
"/home/sammy/revamp/revampenv/local/lib/python2.7/site-packages/django/db/migrations/executor.py",
 
line 121, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, 
fake_initial=fake_initial)
  File 
"/home/sammy/revamp/revampenv/local/lib/python2.7/site-packages/django/db/migrations/executor.py",
 
line 198, in apply_migration
state = migration.apply(state, schema_editor)
  File 
"/home/sammy/revamp/revampenv/local/lib/python2.7/site-packages/django/db/migrations/migration.py",
 
line 123, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, 
project_state)
  File 
"/home/sammy/revamp/revampenv/local/lib/python2.7/site-packages/django/db/migrations/operations/fields.py",
 
line 62, in database_forwards
field,
  File 
"/home/sammy/revamp/revampenv/local/lib/python2.7/site-packages/django/db/backends/postgresql/schema.py",
 
line 21, in add_field
super(DatabaseSchemaEditor, self).add_field(model, field)
  File 
"/home/sammy/revamp/revampenv/local/lib/python2.7/site-packages/django/db/backends/base/schema.py",
 
line 396, in add_field
self.execute(sql, params)
  File 
"/home/sammy/revamp/revampenv/local/lib/python2.7/site-packages/django/db/backends/base/schema.py",
 
line 110, in execute
cursor.execute(sql, params)
  File 
"/home/sammy/revamp/revampenv/local/lib/python2.7/site-packages/django/db/backends/utils.py",
 
line 64, in execute
return self.cursor.execute(sql, params)
  File 
"/home/sammy/revamp/revampenv/local/lib/python2.7/site-packages/django/db/utils.py",
 
line 95, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
  File 
"/home/sammy/revamp/revampenv/local/lib/python2.7/site-packages/django/db/backends/utils.py",
 
line 64, in execute
return self.cursor.execute(sql, params)

-- 
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/a7d6701d-51f6-48b5-9f9a-4a0326d0bf3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


get json sent to channels in view

2017-08-30 Thread Samuel Muiruri
I have this javascript code that send data to channels

// Note that the path doesn't matter for routing; any WebSocket
// connection gets bumped over to WebSocket consumers
socket = new WebSocket("ws://" + window.location.host + "/chat/");
socket.onmessage = function(e) {
alert(e.data);
}
socket.onopen = function() {
socket.send({"test":"data"});
}
// Call onopen directly if socket is already open
if (socket.readyState == WebSocket.OPEN) socket.onopen();

I'm curios how from message I can get the json {"test":"data"}

here's the view

# Connected to websocket.connect
@channel_session
def ws_connect(message, key):
# Accept connection
message.reply_channel.send({"accept": True})


​if i try message.content['test'] I get a key error

​key = message['test']
  File "/usr/local/lib/python2.7/dist-packages/channels/message.py", line
36, in __getitem__
return self.content[key]
KeyError: 'test'



-- 

Best Regards,

Samuel Muiruri.

Web Designer | +254 738 940064

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


django-channels get the json post on connect

2017-08-31 Thread Samuel Muiruri
I have this in routing.py for django-channels

channel_routing = [
   # Wire up websocket channels to our consumers:
   route("websocket.connect", ws_connect),
   route("websocket.receive", ws_message),
]

and the ws_connect looks like this

@channel_session
def ws_connect(message, key):
# Accept connection
message.reply_channel.send({"accept": True})

and when the page loads this socket connection is made correctly


// Note that the path doesn't matter for routing; any WebSocket
// connection gets bumped over to WebSocket consumers
socket = new WebSocket("ws://" + window.location.host + "/chat/");
socket.onmessage = function(response) {
   console.log(response.data);
}
socket.onopen = function() {
   socket.send({"test":"data"});
}
// Call onopen directly if socket is already open
if (socket.readyState == WebSocket.OPEN) socket.onopen();


I want to start testing if I can have a background process running from 
this, so I set a test json input to socket.send however I haven't found 
anything on the documentation, apologies if I missed it. How to access this 
info in ws_connect it should be in message same way there's request I 
believe.

-- 
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/375ec390-a4fb-4112-a378-3a1d1a56eb6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Processing data sent by sockets in django-channels

2017-09-04 Thread Samuel Muiruri
According to django-channels' github any "help" related issue should be
posted here, I've asked this question before here and on stack with no
response, don't feel the need to but if I don't get an adequate response I
might need to hire a dev to implement this for me.

I have this code for a socket connection

socket = new WebSocket("ws://" + window.location.host + "/chat/");
socket.onmessage = function(response) {
   console.log(response.data);
}
socket.onopen = function() {
   socket.send({"test":"data"});
}
// Call onopen directly if socket is already open
if (socket.readyState == WebSocket.OPEN) socket.onopen();

works nicely and connects to this route (even though it's supposed to look
for /chat/ but I can work on setting this later)

from gallery.consumers import ws_connect, ws_message

channel_routing = [
   # Wire up websocket channels to our consumers:
   route("websocket.connect", ws_connect),
   route("websocket.receive", ws_message),
]

and in the consumers file

import json
from channels import Group
from channels.sessions import channel_session

# Connected to websocket.connect
@channel_session
def ws_connect(message, key):
# Accept connection
message.reply_channel.send({"accept": True})

# Connected to websocket.receive
@channel_session
def ws_message(message, key):
reply = json.dumps({'status':'ok'})
message.reply_channel.send({"text": reply})

# Connected to websocket.disconnect
@channel_session
def ws_disconnect(message, key):
message.reply_channel.send({'accept': False})

first hurdle I need to get over is getting the data sent via sockets i.e.

socket.onopen = function() {
socket.send({"test":"data"});
}

then I can move to having this trigger a background process so I can send
the status and finally the final result via sockets.

-- 

Best Regards,

Samuel Muiruri.

Web Designer | +254 738 940064

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


figuring out bug with django cookies: not working on server

2017-10-02 Thread Samuel Muiruri


I have a site that relies on checking if a cookie exists for service_id and 
if it does checks if you can upload files for service... this works nicely 
offline but on pushing changes to server it created a bug where even though 
the cookie can be seen (on the dev console)

[image: enter image description here] 

and I assign the cookie to a context variable which ends up saying None even 
though I can see the cookie from the dev console.

class PictureCreateView(CreateView):
model = Picture
fields = "__all__"
template_name = 'accounts/upload-file.html'

def get_context_data(self, **kwargs):

context = super(PictureCreateView, self).get_context_data(**kwargs)
context['service_id'] = self.request.COOKIES.get('service_id', None)

return context

on the template

{% if service_id %}
#display form{% else %}
Sorry it seems you're missing some vital data needed before ...
{% endif %}

any ideas?

here's a screen record (local & live): https://youtu.be/aud59Avp1aI

-- 
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/fd1f686b-dded-4aaa-8f6b-274419afa0a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What's the simple way to implement a chat system in Django?

2017-10-02 Thread Samuel Muiruri
You'll end up needing to use sockets to get a "live chat"  and channels is 
one of the quickest way to get there.

On Monday, October 2, 2017 at 6:39:48 PM UTC+3, Kishore Srinivas wrote:
>
> I want to make a chat system in Django, but all those channel stuffs looks 
> difficult , so are there any other simpler way to implement a chat system, 
> 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/9e91ab0a-8882-4714-b72d-c04cef859e74%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: figuring out bug with django cookies: not working on server

2017-10-02 Thread Samuel Muiruri
@login_required
def edit_service(request, service_id, template_name="edit-service.html"):
context = RequestContext(request)

context['service_id'] = request.COOKIES.get('service_id', None)

...

response = render_to_response(template_name, context)
response.set_cookie('service_id', service_id)

return response

On Tue, Oct 3, 2017 at 1:05 AM, ADEWALE ADISA 
wrote:

> can you show the code where you set the cookie before retrieving it
> On Oct 2, 2017 6:35 PM, "Samuel Muiruri"  wrote:
>
>> I have a site that relies on checking if a cookie exists for service_id and
>> if it does checks if you can upload files for service... this works nicely
>> offline but on pushing changes to server it created a bug where even though
>> the cookie can be seen (on the dev console)
>>
>> [image: enter image description here]
>> <https://i.stack.imgur.com/zx6Ir.png>
>>
>> and I assign the cookie to a context variable which ends up saying None even
>> though I can see the cookie from the dev console.
>>
>> class PictureCreateView(CreateView):
>> model = Picture
>> fields = "__all__"
>> template_name = 'accounts/upload-file.html'
>>
>> def get_context_data(self, **kwargs):
>>
>> context = super(PictureCreateView, self).get_context_data(**kwargs)
>> context['service_id'] = self.request.COOKIES.get('service_id', None)
>>
>> return context
>>
>> on the template
>>
>> {% if service_id %}
>> #display form{% else %}
>> Sorry it seems you're missing some vital data needed before ...
>> {% endif %}
>>
>> any ideas?
>>
>> here's a screen record (local & live): https://youtu.be/aud59Avp1aI
>>
>> --
>> 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/fd1f686b-dded-4aaa-8f6b-274419afa0a1%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/fd1f686b-dded-4aaa-8f6b-274419afa0a1%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> 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/mSWmg0HVxz0/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/CAMGzuy-N_znhTLZqD0zc4ED78pFNAgCH3ns17eY
> R3ZR0xOrcyQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAMGzuy-N_znhTLZqD0zc4ED78pFNAgCH3ns17eYR3ZR0xOrcyQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Best Regards,

Samuel Muiruri.

Web Designer | +254 738 940064

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


Prevent field from becoming null

2015-12-10 Thread Samuel Muiruri
Hello,
I want to override the save for the show model so I check for if the value 
passed for a field is null if so ignore saving for the field

class Shows(models.Model):
some_field = models.CharField(max_length=128, default="something")

def save(self, *args, **kwargs):
super(Show, self).save()



-- 
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/48a95f77-ac39-42a3-81f7-11651e8d742c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Prevent field from becoming null

2015-12-10 Thread Samuel Muiruri
Hello,
I want to override the save for the show model so I check for if the value 
passed for a field is null if so ignore saving for the field

class Shows(models.Model):
some_field = models.CharField(max_length=128, default="something")

def save(self, *args, **kwargs):
super(Show, self).save()



-- 
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/c31be361-21f1-45c9-8257-78b56bf45c78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Abridged summary of django-users@googlegroups.com - 37 updates in 18 topics

2018-03-27 Thread Samuel Muiruri
in development, but I have a
> couple of weeks where I should be able to dedicate a ...more
> <http://groups.google.com/group/django-users/msg/1814abcc3a93b?utm_source=digest&utm_medium=email>
> Dylan Reinhold : Mar 26 10:44AM -0700
>
> One thing I noticed.
>
> In your Blog model you are saving your slug every time.
>
> If you are using the slug as your URL this means if a title is changed the
> URL will change and anyone who had the ...more
> <http://groups.google.com/group/django-users/msg/181f070cb5425?utm_source=digest&utm_medium=email>
> Simon Connah : Mar 27 01:11AM
>
> Oh, good catch. I'll fix that tomorrow.
> Thanks.
> On Monday, 26 March 2018, 18:45:24 BST, Dylan Reinhold <
> dreinh...@gmail.com> wrote:
>
> One thing I noticed.
>
> In your Blog model you are ...more
> <http://groups.google.com/group/django-users/msg/19a521c164871?utm_source=digest&utm_medium=email>
> Back to top <#m_-8114719966638835162_digest_top>
> Django and graphs
> <http://groups.google.com/group/django-users/t/da5855c0042d7f55?utm_source=digest&utm_medium=email>
> Ryan Manzer : Mar 26 02:00PM -0700
>
> Personally, I have had a good deal of success building data APIs using
> Django Rest Framework and then consuming the data with the D3.js
> javascript
> library. However, I can understand that may be a ...more
> <http://groups.google.com/group/django-users/msg/18f4a13e9750b?utm_source=digest&utm_medium=email>
> Back to top <#m_-8114719966638835162_digest_top>
> survey form
> <http://groups.google.com/group/django-users/t/529e711fde67f05d?utm_source=digest&utm_medium=email>
> sum abiut : Mar 27 08:29AM +1100
>
> i have build an app that allow the admin to add survey title, question and
> choices. I needed assistance display all the questions and answer in front
> end to allow the users to take the survey. ...more
> <http://groups.google.com/group/django-users/msg/18e2b33014e7b?utm_source=digest&utm_medium=email>
> Back to top <#m_-8114719966638835162_digest_top>
> Having ERROR running Django project !!!
> <http://groups.google.com/group/django-users/t/b7e8cf6f5885a27?utm_source=digest&utm_medium=email>
> Jamaldin Pro : Mar 26 08:17AM -0700
>
> Hello
> I was creating a Djnago project and when I finish it, it was working
> perfectly but when I start adding ("name"/"text"/"information") to models
> from admin page, It stops working I mean after ...more
> <http://groups.google.com/group/django-users/msg/18768c79d9209?utm_source=digest&utm_medium=email>
> Julio Biason : Mar 26 04:46PM -0300
>
> Hi Jamaldin,
>
> Kinda hard to help you here, because there is a lot of information lacking.
> Like, do you see any errors on your logs? Are you running in dev
> environment (like in `python manage.py ...more
> <http://groups.google.com/group/django-users/msg/1888b1299a429?utm_source=digest&utm_medium=email>
> Back to top <#m_-8114719966638835162_digest_top>
> Integrating Java(web servlets) into django as front end.
> <http://groups.google.com/group/django-users/t/904b71c0d5bdcd01?utm_source=digest&utm_medium=email>
> zubair alam : Mar 26 08:25AM -0700
>
> One solution would be as following:
>
> 1. Let Java EE application consume the Rest API provided by Django
> (using DRF library which uses Django Models, its own serializers and
> viewsets). ...more
> <http://groups.google.com/group/django-users/msg/22efb7706a4db?utm_source=digest&utm_medium=email>
> prince gosavi : Mar 26 08:31AM -0700
>
> Ok thanks for the suggestions I will try them all and see which fits my
> requirements and provide a feedback.
> Regards
>
> On Monday, March 26, 2018 at 12:03:28 AM UTC+5:30, prince gosavi wrote:
> ...more
> <http://groups.google.com/group/django-users/msg/22f48204b0af3?utm_source=digest&utm_medium=email>
> Back to top <#m_-8114719966638835162_digest_top>
> How to combine a custom date and time field in Django?
> <http://groups.google.com/group/django-users/t/1fc366b22d146af0?utm_source=digest&utm_medium=email>
> "hunter.cur...@gmail.com" : Mar 26 07:44AM -0700
>
> Using database time functions is a bit of a hassle since each database
> seems to have its own syntax for these types.
> If you are using MySQL, the function you are calling will only return a
> ...more
> <http://groups.google.com/group/django-users/msg/22cb9030ab939?utm_source=digest&utm_medium=email>
> Back to top <#m_-8114719966638835162_digest_top>
> Updating TimeField in forms/formsets returns value without microseconds
> <http://groups.google.com/group/django-users/t/b7184d21061c4025?utm_source=digest&utm_medium=email>
> Tim Graham : Mar 26 07:30AM -0700
>
> You need to set support_microseconds=True on the widget.
> https://docs.djangoproject.com/en/stable/ref/forms/
> widgets/#django.forms.Widget.supports_microseconds
>
> On Sunday, March 25, 2018 at 9:03:18 ...more
> <http://groups.google.com/group/django-users/msg/22bfbef2e7581?utm_source=digest&utm_medium=email>
> Back to top <#m_-8114719966638835162_digest_top>
> Channels 2 performance issues
> <http://groups.google.com/group/django-users/t/43e26c43841d0569?utm_source=digest&utm_medium=email>
> James Foley : Mar 26 06:41AM -0700
>
> I'm using Channels 2 to build a real time 3D model viewing app where all
> users can rotate and view a model. I'm having to send quite a bit of data
> (roughly one message every 20ms) and I've run ...more
> <http://groups.google.com/group/django-users/msg/1759636242cd5?utm_source=digest&utm_medium=email>
> Back to top <#m_-8114719966638835162_digest_top>
> You received this digest because you're subscribed to updates for this
> group. You can change your settings on the group membership page
> <https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/django-users/join>
> .
> To unsubscribe from this group and stop receiving emails from it send an
> email to django-users+unsubscr...@googlegroups.com.
>



-- 

Best Regards,

Samuel Muiruri.

Student in Machine Learning & a veteran web developer.

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


new Feature: yay or neigh?

2018-04-07 Thread Samuel Muiruri
Hey guys,
Think this would be a neat feature to add to django.

{% if request.connection %}
#if there's a connection to the internet returns True, by default tries
to connect to google
{% else %}
#could for example load local js/css files instead of from cdn
{% endif %}

primarily could be used to check if a site/link you really for service is
operational before moving forward

{% if request.connection:"http://www.somesite/service"; %}
#load js and present service
{% else %}
Sorry the service seems to be unavailable for now, please try again
later.
{% endif %}


-- 

Best Regards,

Samuel Muiruri.

Student in Machine Learning & a veteran web developer.


<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

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


Verify Emails

2018-04-07 Thread Samuel Muiruri
There's a python package for validating emails exists "validate_emails"
https://pypi.python.org/pypi/validate_email think it would be useful to
include it's features inside django so you can parse if emails exists
before sending so you only send emails to those emails that *do *exists and
also use it to get back those that don't so you can remove them from your
list like dummy emails provided to your subscription page.

-- 

Best Regards,

Samuel Muiruri.

Student in Machine Learning & a veteran web developer.


<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

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


Re: CreateView autoset field

2018-04-14 Thread Samuel Muiruri
on the models for example info = models.CharField(max_length=100, 
default='West Indiana')

-- 
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/cb412eca-448d-446a-88d1-9a0641e6bfa4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: registration with cities...

2018-04-14 Thread Samuel Muiruri
Will tell you the possible ways to tackle this.

   1. You assign the user model with a city name so when you filter results 
   for a user you also filter to match the city they're in.
   2. You use the browser locate feature to get gps info (latitude, 
   longitude) feed that to django through javascript and get results for the 
   area... before this the location will be put into a city

You should consider that the second you have to deal with users who are not 
in any city or missing info.

-- 
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/fa4a222b-ab71-41d2-834a-2f0a62adb9fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to handle a migration that last too long for being deployed?

2018-04-14 Thread Samuel Muiruri
Maybe not adequate but you could dump_data from a model and load_data and 
not have migrate load data also at the same time.

-- 
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/bcb3a484-e495-4324-af7a-5ab2d54534ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError: No module named 'main'

2018-04-14 Thread Samuel Muiruri
try this

INSTALLED_APPS = [
...
#'DjangoRestfulServer', #remove you don't import the main project
'main', #no need for substanciating an app
]

-- 
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/c48d60aa-e4af-43c8-a3ba-026376c1fb98%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: I'm trying to edit address form for Saleor ecommerce platform

2018-04-14 Thread Samuel Muiruri
"adress_form_lines" you need to follow it to where you get the data from 
then follow that to wherever the model is, maybe it's instanced somewhere 
inside the model like

class Model(models.Model):
...

def __str__(self):
   return self.company_name

anyway likely it's noted where in the code it crashed later on down the 
line of the error

-- 
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/b1d7a083-12b5-4682-804e-baf12feb17a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CreateView autoset field

2018-04-15 Thread Samuel Muiruri
did you make the migration, also note it's the default if a new item is
created with the field blank.

On Sat, Apr 14, 2018 at 9:52 PM, DYAA CHBIB  wrote:

> I did the same, but it does not displayed in the field ! Any advice?
> Thanks
>
> 2018-04-14 16:02 GMT+02:00 'Ferdinand Rohlfing' via Django users <
> django-users@googlegroups.com>:
>
>> Thanks for the answer, it's working like I want it to work...
>> Nice
>>
>>>
>>> --
>> 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/565c773c-4c09-4b98-a4e0-76bac19bab73%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/565c773c-4c09-4b98-a4e0-76bac19bab73%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> 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/0QrMLT33NB4/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/CAFVSD1q7CBvFc8wPfEMRyjad0MOmk
> N1e7Ph4GBmY_48xCrFtcA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAFVSD1q7CBvFc8wPfEMRyjad0MOmkN1e7Ph4GBmY_48xCrFtcA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Best Regards,

Samuel Muiruri.

Student in Machine Learning & a veteran web developer.

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


django use models from outside script

2019-01-05 Thread Samuel Muiruri
I have an external script that I want to have access to django's models 
primarily because it's an external implementation of sockets which is 
simple I want to see if this is possible.

This is the snippet of code I added below the settings.py file based on an 
answer on stackoverflow.

#Allow Django to be used externally
from django.conf import settings
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
},
},
#TIME_ZONE='America/Montreal',
)

and at the start of my separate script named `path.py` I did the following 
imports

import django

import pixelart.settings

os.environ.setdefault(
"DJANGO_SETTINGS_MODULE",
"pixelart.settings"
)
django.setup()

from gallery.models import ThumbnailCache, Area, Color

### Note: My django project is called pixelart with a model gallery I'm 
importing models from.

When I try to run the script I get the following error:

(pixelart) sam@sam-Lenovo-G51-35:~/code/pixelart$ python path.py
Traceback (most recent call last):
File "path.py", line 23, in 
from gallery.models import ThumbnailCache, Area, Color
File "/home/sam/code/pixelart/gallery/models.py", line 2, in 
from django.contrib.auth.models import User
File 
"/home/sam/code/envs/pixelart/lib/python3.6/site-packages/django/contrib/auth/models.py",
 
line 3, in 
from django.contrib.contenttypes.models import ContentType
File 
"/home/sam/code/envs/pixelart/lib/python3.6/site-packages/django/contrib/contenttypes/models.py",
 
line 134, in 
class ContentType(models.Model):
File 
"/home/sam/code/envs/pixelart/lib/python3.6/site-packages/django/db/models/base.py",
 
line 95, in __new__
"INSTALLED_APPS." % (module, name)
RuntimeError: Model class 
django.contrib.contenttypes.models.ContentType doesn't declare an explicit 
app_label and isn't in an application in INSTALLED_APPS.

One suggestion I've found based on [this question][1] is to add the sites 
to the installed apps and the site_id.

After trying this out and doing a migration the error remained the same.


  [1]: 
https://stackoverflow.com/questions/35388637/runtimeerror-model-class-django-contrib-sites-models-site-doesnt-declare-an-ex

To be clear  I have an actual django model with a file called path in the 
main project directory. since I'm running them separately i.e. one one 
terminal python manage.py runserver and on another python path.py the path 
creates the sockets. And since some of the data created would best be 
stored in a model I need the path file to access the model. 

-- 
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/d6c32914-e42f-48a3-bf59-c2835006e4bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


django middleware return response and prevent calling main function

2019-01-07 Thread Samuel Muiruri
I want to use a form of cache using django middleware/context-processors. I 
do know it's simpler to just add the decorator at the top of the function 
but for reasons I have to do it this way.

Using this as my example of my function

def cache_results(request):
response =  {}
if request.path == '/about':
#my json response
return {...}

return response

the idea is if it matches my requests it returns a result and also prevent 
the matching function call from the `urls.py` from being called or 
returning the result basically acting as a middleware caching system.

the views look like this

def about(request):
response = {
'title': 'This is the About Page',
'activity': 'Check out this link --',
'additional data': 'something else'
}

return HttpResponse(
json.dumps(response),
content_type="application/json"
)


Is this doable?

-- 
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/2d289f89-127c-4c36-89d8-c4ac5d71e939%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Possible hack attempt

2019-02-01 Thread Samuel Muiruri
I'm working on launching a site which currently is still linked to only an 
IP and thanks to how digitalocean recommends setting it up and how I built 
it I feel it's relatively safe provided that the security I implemented on 
ubuntu as recommended and Django's inbuilt security avoiding file browsing 
outside set path's and accessing info is maintained.

Still though getting this emails thanks to error handling shows someone is 
trying to access my sock file and I think it's only right this is pointed 
out to know if there's a known vulnerability.

Invalid HTTP_HOST header: '/home/sammy/webapp/decomagna/deco.sock:'. The 
domain name provided is not valid according to RFC 1034/1035.

Report at /
Invalid HTTP_HOST header: '/home/sammy/webapp/decomagna/deco.sock:'. The 
domain name provided is not valid according to RFC 1034/1035.

Request Method: GET
Request URL: http:///home/sammy/webapp/decomagna/deco.sock:/
Django Version: 2.0
Python Executable: /home/sammy/webapp/envs/deco/bin/python3
Python Version: 3.5.2
Python Path: ['/home/sammy/webapp/decomagna', 
'/home/sammy/webapp/envs/deco/bin', 
'/home/sammy/webapp/envs/deco/lib/python35.zip', 
'/home/sammy/webapp/envs/deco/lib/python3.5', 
'/home/sammy/webapp/envs/deco/lib/python3.5/plat-x86_64-linux-gnu', 
'/home/sammy/webapp/envs/deco/lib/python3.5/lib-dynload', 
'/usr/lib/python3.5', '/usr/lib/python3.5/plat-x86_64-linux-gnu', 
'/home/sammy/webapp/envs/deco/lib/python3.5/site-packages']
Server time: Thu, 31 Jan 2019 21:16:48 +
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'location_field.apps.DefaultConfig',
'mptt',
'ckeditor',
'ckeditor_uploader',
'inventory',
'common',
'pages']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']

Request information:
USER: [unable to retrieve the current user]

GET: No GET data

POST: No POST data

FILES: No FILES data

COOKIES: No cookie data

META:
HTTP_ACCEPT = '*/*'
HTTP_CONNECTION = 'close'
HTTP_USER_AGENT = 
'Mozilla/5.0(WindowsNT6.1;rv:31.0)Gecko/20100101Firefox/31.0'
HTTP_X_FORWARDED_FOR = '196.52.43.114'
HTTP_X_FORWARDED_PROTO = 'http'
HTTP_X_REAL_IP = '196.52.43.114'
PATH_INFO = '/'
QUERY_STRING = ''
RAW_URI = '/'
REMOTE_ADDR = ''
REQUEST_METHOD = 'GET'
SCRIPT_NAME = ''
SERVER_NAME = '/home/sammy/webapp/decomagna/deco.sock'
SERVER_PORT = ''
SERVER_PROTOCOL = 'HTTP/1.0'
SERVER_SOFTWARE = 'gunicorn/19.9.0'
gunicorn.socket = 
wsgi.errors = 
wsgi.file_wrapper = ''
wsgi.input = 
wsgi.multiprocess = True
wsgi.multithread = False
wsgi.run_once = False
wsgi.url_scheme = 'http'
wsgi.version = '(1, 0)'

Settings:
Using settings module decomagna.settings
ABSOLUTE_URL_OVERRIDES = {}
ADMINS = [('Samuel Muiruri', 'muiruri.sam...@gmail.com')]
ALLOWED_HOSTS = ['68.183.98.238']
APPEND_SLASH = True
AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend']
AUTH_PASSWORD_VALIDATORS = ''
AUTH_USER_MODEL = 'auth.User'
BASE_DIR = '/home/sammy/webapp/decomagna'
CACHES = {'default': {'BACKEND': 
'django.core.cache.backends.locmem.LocMemCache'}}
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_KEY_PREFIX = ''
CACHE_MIDDLEWARE_SECONDS = 600
CKEDITOR_BASEPATH = '/static/ckeditor/ckeditor/'
CKEDITOR_CONFIGS = {'default': {'toolbar': None, 'allowedContent': True}, 
'disableNativeSpellChecker': False, 'basic_ckeditor': {'toolbar': 'Basic'}}
CKEDITOR_UPLOAD_PATH = 'ckeditor/'
CONTACT_ADMINS = []
CSRF_COOKIE_AGE = 31449600
CSRF_COOKIE_DOMAIN = None
CSRF_COOKIE_HTTPONLY = False
CSRF_COOKIE_NAME = 'csrftoken'
CSRF_COOKIE_PATH = '/'
CSRF_COOKIE_SECURE = False
CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
CSRF_TRUSTED_ORIGINS = []
CSRF_USE_SESSIONS = False
DATABASES = ...
DATABASE_ROUTERS = []
DA

Re: Possible hack attempt

2019-02-01 Thread Samuel Muiruri
I got it handled I just wanted to point out I noticed something bizarre for
two reasons:

   1. Get devs on alert that this exists (I don't believe my system is
   compromised)
   2. Ensure the community might pick on this if said hacker plans to
   target django sites.


On Fri, Feb 1, 2019 at 3:32 PM Jason  wrote:

> this really isn't django's responsibility to handle, but more at the level
> of your apache or nginx webserver that routes to django
>
> I really hope you're running this with DEBUG=False in your settings
>
> Check https://www.fail2ban.org/wiki/index.php/Main_Page for some ip-based
> filtering you can use
>
> --
> 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/yARoNR2ErN4/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/73f90195-3858-429a-9545-4f5a41024239%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/CAJZFZXqSx9%3DqOF1Nvbj%3DDi7LJ5i%3DpnTnK7seEHehfoWBJx2rYg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Color Editor Django WebApp, see how you can Color an Image using a Webapp designed in Django.

2019-04-14 Thread Samuel Muiruri
Here's a video on how it works
https://www.youtube.com/watch?v=GsYL0ELYSTI

And the Site itself
http://pixelart.thecoderr.com/color-editor

And finally the source code (It's OpenSourced)
https://github.com/six-wars/pixelart

-- 

Checkout My Site: The Coder . I design
websites and cross-platform desktop apps.

If you need a site designed, redesigned or have a question related to
this even Data Science hit reply.

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