Looking for open source Django+DRF projects that follow best practices.
The larger the project, the better. If you know of any, please give a link.
/r/django
https://redd.it/6w0hc9
The larger the project, the better. If you know of any, please give a link.
/r/django
https://redd.it/6w0hc9
reddit
Looking for open source Django+DRF projects that follow... • r/django
The larger the project, the better. If you know of any, please give a link.
Python refuses to recognize library I am almost certain exists
(i am just copying this from the stackoverflow thread that its not letting me post)
I have no idea why this is so frustrating, but I have literally pulled out a few clumps of hair in rage because this just refuses to work and I honestly do not have the slighest clue on what to do. I am trying to use the winshell module for a quick python programming I am using. I am new to python and just started trying it today. I have tried to install the library manually, and through pip. pip claims the module is downloaded, and I can see it in the `lib` folder. No matter what I do I get this error when I try to run my code:
import winshell
ModuleNotFoundError: No module named 'winshell'
what on earth must I do to get this to work I am at my wits end here and I feel like I'm going to break something
/r/Python
https://redd.it/6w4fb6
(i am just copying this from the stackoverflow thread that its not letting me post)
I have no idea why this is so frustrating, but I have literally pulled out a few clumps of hair in rage because this just refuses to work and I honestly do not have the slighest clue on what to do. I am trying to use the winshell module for a quick python programming I am using. I am new to python and just started trying it today. I have tried to install the library manually, and through pip. pip claims the module is downloaded, and I can see it in the `lib` folder. No matter what I do I get this error when I try to run my code:
import winshell
ModuleNotFoundError: No module named 'winshell'
what on earth must I do to get this to work I am at my wits end here and I feel like I'm going to break something
/r/Python
https://redd.it/6w4fb6
reddit
Python refuses to recognize library I am almost certain... • r/Python
(i am just copying this from the stackoverflow thread that its not letting me post) I have no idea why this is so frustrating, but I have...
ImportError: No module named 'flask_login'
SOLVED:
My flask application isn't using the env but local machine packages, thanks guys!
/r/flask
https://redd.it/6w85r3
SOLVED:
My flask application isn't using the env but local machine packages, thanks guys!
/r/flask
https://redd.it/6w85r3
reddit
ImportError: No module named 'flask_login' • r/flask
SOLVED: My flask application isn't using the env but local machine packages, thanks guys!
[P] Deep Learning Neural Networks Play Path of Exile
https://youtu.be/UrrZOswJaow
/r/MachineLearning
https://redd.it/6w5zyo
https://youtu.be/UrrZOswJaow
/r/MachineLearning
https://redd.it/6w5zyo
YouTube
Deep Learning Neural Networks Play Path of Exile
Four deep learning neural networks work together simultaneously to play the game Path of Exile only using visual input from the game. Project summary video with over 4 minutes of real footage of the AI playing the game.
Blog Series:
https://nicholastsmi…
Blog Series:
https://nicholastsmi…
Auto creating URLs from user entries?
I have a website I am working on in which users can submit comments, blog entries and such. However, if a URL gets posted, it gets presented as regular text (and thus is not clickable) when the entry is posted. Is there anyway to make Django automatically make links like these clickable?
/r/djangolearning
https://redd.it/6w0p91
I have a website I am working on in which users can submit comments, blog entries and such. However, if a URL gets posted, it gets presented as regular text (and thus is not clickable) when the entry is posted. Is there anyway to make Django automatically make links like these clickable?
/r/djangolearning
https://redd.it/6w0p91
reddit
Auto creating URLs from user entries? • r/djangolearning
I have a website I am working on in which users can submit comments, blog entries and such. However, if a URL gets posted, it gets presented as...
[R] Squeeze-and-Excitation Networks Caffe Implementation (ILSVRC 2017 winner)
https://github.com/hujie-frank/SENet
/r/MachineLearning
https://redd.it/6w8xex
https://github.com/hujie-frank/SENet
/r/MachineLearning
https://redd.it/6w8xex
GitHub
GitHub - hujie-frank/SENet: Squeeze-and-Excitation Networks
Squeeze-and-Excitation Networks. Contribute to hujie-frank/SENet development by creating an account on GitHub.
Anyone running a subscription site using Django and dj-stripe?
Hello!
So I've got a pretty hefty web app which is currently free and I have a bunch of people happily beta testing it. Simultaneously I've created a dev version and have implemented Stripe on it via dj-stripe. I've got it so I have plans created in Stripe, and created a plans template and view, and attached the form button for one of the plans on the plans page to the "[custom](https://stripe.com/docs/checkout#integration-custom)" implementation of Stripe Checkout. When a user clicks the button, it gives the standard Stripe Checkout pop up and the user can fill in all their data, and on the Stripe end they are attached to a subscription plan and the card is charged (test data of course for now).
Now I'm not sure where to go from here. I assume I need to somehow associate the username in the Django users database with that Stripe plan and then adjust their access accordingly but I'm not sure where to really start with this portion. The Stripe Checkout works great, but I'm not sure how to restrict user access based on which Stripe plan they're associated with. I'm sure this is going to require me to get more involved with the Django database which I am thus far unfamiliar with but I'm ready to learn!
Does anyone have any advice or could someone point me to any info that might help me get started?
Thank you!
/r/django
https://redd.it/6w7vxn
Hello!
So I've got a pretty hefty web app which is currently free and I have a bunch of people happily beta testing it. Simultaneously I've created a dev version and have implemented Stripe on it via dj-stripe. I've got it so I have plans created in Stripe, and created a plans template and view, and attached the form button for one of the plans on the plans page to the "[custom](https://stripe.com/docs/checkout#integration-custom)" implementation of Stripe Checkout. When a user clicks the button, it gives the standard Stripe Checkout pop up and the user can fill in all their data, and on the Stripe end they are attached to a subscription plan and the card is charged (test data of course for now).
Now I'm not sure where to go from here. I assume I need to somehow associate the username in the Django users database with that Stripe plan and then adjust their access accordingly but I'm not sure where to really start with this portion. The Stripe Checkout works great, but I'm not sure how to restrict user access based on which Stripe plan they're associated with. I'm sure this is going to require me to get more involved with the Django database which I am thus far unfamiliar with but I'm ready to learn!
Does anyone have any advice or could someone point me to any info that might help me get started?
Thank you!
/r/django
https://redd.it/6w7vxn
Stripe
Stripe Checkout
Build a low-code payment form and embed it on your site or host it on Stripe.
[D] I'm interested in using machine learning to solve process optimization tasks, but I'm really not sure where to look at or where to begin
Title is pretty self-explanatory, I'd like to learn how I can use machine learning for process optimization(tuning a bunch of parameters to get the most optimal output). I'm really just a beginner who doesn't know much more than the basics and I've recently started getting into deep learning etc. but I'd like to apply this for optimization purposes.
/r/MachineLearning
https://redd.it/6wassi
Title is pretty self-explanatory, I'd like to learn how I can use machine learning for process optimization(tuning a bunch of parameters to get the most optimal output). I'm really just a beginner who doesn't know much more than the basics and I've recently started getting into deep learning etc. but I'd like to apply this for optimization purposes.
/r/MachineLearning
https://redd.it/6wassi
reddit
[D] I'm interested in using machine learning... • r/MachineLearning
Title is pretty self-explanatory, I'd like to learn how I can use machine learning for process optimization(tuning a bunch of parameters to get...
cachelper - A lightweight library of cache helpers
https://github.com/suzaku/cachelper
/r/Python
https://redd.it/6wbynt
https://github.com/suzaku/cachelper
/r/Python
https://redd.it/6wbynt
GitHub
suzaku/cachelper
Contribute to cachelper development by creating an account on GitHub.
Is templating on <script></script> an acceptable practice in the Django community?
I haven't worked enough with a Django project built by someone else so I can't tell.
There are situations where it is mandatory that javascript must handle information from the server, but in my opinion, performing an AJAX to retrieve this information is too expensive when one could simply put this information in a template.
For instance, when I needed user information to be passed to JS, I did this:
<script>
{% if request.user.is_authenticated %}
const user = {
name: "{{ request.user.first_name }} {{ request.user.last_name }}",
id: {{ request.user.id }}
};
const csrf = "{{ csrf_token }}";
{% else %}
const user = null;
{% endif %}
</script>
The solution works, and I got what I wanted, but it felt too hacky. Is this an acceptable practice or must I look for a better solution? Is this a common thing in Django projects?
/r/django
https://redd.it/6wbki2
I haven't worked enough with a Django project built by someone else so I can't tell.
There are situations where it is mandatory that javascript must handle information from the server, but in my opinion, performing an AJAX to retrieve this information is too expensive when one could simply put this information in a template.
For instance, when I needed user information to be passed to JS, I did this:
<script>
{% if request.user.is_authenticated %}
const user = {
name: "{{ request.user.first_name }} {{ request.user.last_name }}",
id: {{ request.user.id }}
};
const csrf = "{{ csrf_token }}";
{% else %}
const user = null;
{% endif %}
</script>
The solution works, and I got what I wanted, but it felt too hacky. Is this an acceptable practice or must I look for a better solution? Is this a common thing in Django projects?
/r/django
https://redd.it/6wbki2
reddit
Is templating on an acceptable... • r/django
I haven't worked enough with a Django project built by someone else so I can't tell. There are situations where it is mandatory that javascript...
Django lookup in new tab/window
Hi guys,
I've been lurking around for quite some time now. I finally decided that I make django application by myself. I am trying to create music library for saving your fav music. I have a form where you can search (its django-autocomplete-light plugin) for music than add some notes and save it. I have more than 250k songs in my database. Now I need your help with search. How could I implement something like a lookup i.e. in form you click on search button that opens new window or tab, then you search for song and when you click it you it closes that window/tab and inserts in form.
I appreciate any help.
/r/django
https://redd.it/6wbxkv
Hi guys,
I've been lurking around for quite some time now. I finally decided that I make django application by myself. I am trying to create music library for saving your fav music. I have a form where you can search (its django-autocomplete-light plugin) for music than add some notes and save it. I have more than 250k songs in my database. Now I need your help with search. How could I implement something like a lookup i.e. in form you click on search button that opens new window or tab, then you search for song and when you click it you it closes that window/tab and inserts in form.
I appreciate any help.
/r/django
https://redd.it/6wbxkv
reddit
Django lookup in new tab/window • r/django
Hi guys, I've been lurking around for quite some time now. I finally decided that I make django application by myself. I am trying to create...
Renaming Django's Auth User and App
http://evennia.blogspot.se/2017/08/renaming-djangos-auth-user-and-app.html
/r/Python
https://redd.it/6wb5ay
http://evennia.blogspot.se/2017/08/renaming-djangos-auth-user-and-app.html
/r/Python
https://redd.it/6wb5ay
evennia.blogspot.co.uk
Renaming Django's Auth User and App
N ow that Evennia's devel branch (what will become Evennia 0.7) is slowly approaching completion, I thought I'd try to document an aspect...
Proper docs and packages for mongodb on django?
i recently started messing around with django, definitely really interesting but im a big mongodb fan and cant seem to find any recent packages, the last django nonrel that i see is 1.6? hopefully im just in the wrong section but i went to the deprecated page and then traversed to the non deprecated(what i hope is non deprecated) and that uninstalled my django 1.11.4 to 1.6 or something around there(i fixed it back to current, the mongodb site is actually kind of off as well, i understand python mainly does better with relational db). sorry exited the shell forgot exact version. if you happen to know/find UP-TO-DATE packages please post a link, thanks in advance
/r/django
https://redd.it/6wf3iz
i recently started messing around with django, definitely really interesting but im a big mongodb fan and cant seem to find any recent packages, the last django nonrel that i see is 1.6? hopefully im just in the wrong section but i went to the deprecated page and then traversed to the non deprecated(what i hope is non deprecated) and that uninstalled my django 1.11.4 to 1.6 or something around there(i fixed it back to current, the mongodb site is actually kind of off as well, i understand python mainly does better with relational db). sorry exited the shell forgot exact version. if you happen to know/find UP-TO-DATE packages please post a link, thanks in advance
/r/django
https://redd.it/6wf3iz
reddit
Proper docs and packages for mongodb on django? • r/django
i recently started messing around with django, definitely really interesting but im a big mongodb fan and cant seem to find any recent packages,...
GraphQL and Django in 5 minutes
https://joaorafaelm.github.io/blog/graphql-and-django-in-5-minutes
/r/Python
https://redd.it/6wf95q
https://joaorafaelm.github.io/blog/graphql-and-django-in-5-minutes
/r/Python
https://redd.it/6wf95q
Snippets are unofficial and unmaintained.
http://flask.pocoo.org/snippets/
/r/flask
https://redd.it/6wen7j
http://flask.pocoo.org/snippets/
/r/flask
https://redd.it/6wen7j
reddit
Snippets are unofficial and unmaintained. • r/flask
4 points and 3 comments so far on reddit
How do you develop on a remote server?
Hi guys,
i develop primary desktop application, but my next project will be a website for internal use.
My normal workflow is: Write code with PyCharm Community edition on my windows pc, debug and test it locally. After this, deploy it. Because my endtarget are windows clients, this works very well.
Now my next project will be Django on a Linux server with several extensions, who are not a fan of windows. Trust me, tried it, didn't work. So, how do I do this?
Right at the moment I think about using a VM with VMware Player, but I'm afraid about the lagging while writing code all the time on a remote system.
Can anyone recommend a good practice to develop for a remote server?
/r/django
https://redd.it/6wehz1
Hi guys,
i develop primary desktop application, but my next project will be a website for internal use.
My normal workflow is: Write code with PyCharm Community edition on my windows pc, debug and test it locally. After this, deploy it. Because my endtarget are windows clients, this works very well.
Now my next project will be Django on a Linux server with several extensions, who are not a fan of windows. Trust me, tried it, didn't work. So, how do I do this?
Right at the moment I think about using a VM with VMware Player, but I'm afraid about the lagging while writing code all the time on a remote system.
Can anyone recommend a good practice to develop for a remote server?
/r/django
https://redd.it/6wehz1
reddit
How do you develop on a remote server? • r/django
Hi guys, i develop primary desktop application, but my next project will be a website for internal use. My normal workflow is: Write code with...
Quick script to delete your reddit comments
I noticed the tampermonkey script just edits your comments, not deleting them, so I wrote the following script to do both. You'll need to register the app on your account and put in client id/secret
import praw
reddit = praw.Reddit(client_id='',
client_secret='',
password='',
user_agent='deletes my comments',
username='')
redditor = reddit.redditor("")
for comment in redditor.comments.new():
comment.edit(".")
comment.delete()
It deletes your comments most recent to oldest.
Pro tip: make a shell script that includes this code just by adding a shebang followed by a path to your interpreter and run it from there. Also make an alias, helps when you need to find/run this script quickly.
/r/Python
https://redd.it/6wfqsv
I noticed the tampermonkey script just edits your comments, not deleting them, so I wrote the following script to do both. You'll need to register the app on your account and put in client id/secret
import praw
reddit = praw.Reddit(client_id='',
client_secret='',
password='',
user_agent='deletes my comments',
username='')
redditor = reddit.redditor("")
for comment in redditor.comments.new():
comment.edit(".")
comment.delete()
It deletes your comments most recent to oldest.
Pro tip: make a shell script that includes this code just by adding a shebang followed by a path to your interpreter and run it from there. Also make an alias, helps when you need to find/run this script quickly.
/r/Python
https://redd.it/6wfqsv
reddit
Quick script to delete your reddit comments • r/Python
I noticed the tampermonkey script just edits your comments, not deleting them, so I wrote the following script to do both. You'll need to register...
[D] would anyone be interested in a machine-learning focused linux distro?
I was thinking about how hard it is to set everything up (CUDA, installing different frameworks, etc) once you put together a new machine...
Would there be any interest in a linux distribution (ubuntu variant) that comes pre-installed with stuff like CUDA, tensorflow, torch, a nice IDE, etc, so you can just install the distro and get started with machine learning stuff right away? I could easily throw something like this together and put it on github or something over the coming long weekend...
Let me know if there is interest and things that I should include in it.
**Edit: made an empty git repo; I'll put stuff there this weekend when I have time to work on it... https://github.com/robbiebarrat/MachineLearningLinux**
/r/MachineLearning
https://redd.it/6wfgfz
I was thinking about how hard it is to set everything up (CUDA, installing different frameworks, etc) once you put together a new machine...
Would there be any interest in a linux distribution (ubuntu variant) that comes pre-installed with stuff like CUDA, tensorflow, torch, a nice IDE, etc, so you can just install the distro and get started with machine learning stuff right away? I could easily throw something like this together and put it on github or something over the coming long weekend...
Let me know if there is interest and things that I should include in it.
**Edit: made an empty git repo; I'll put stuff there this weekend when I have time to work on it... https://github.com/robbiebarrat/MachineLearningLinux**
/r/MachineLearning
https://redd.it/6wfgfz
Update / Save model date value directly from template?
Hello all,
I am still quite inexperienced in Django and I was wondering if it would be at all possible to update/save today's date in my database directly from the template?
I have a Django-filter filterView (listView) that shows the list of people that are in my department which I currently have in my database. And I would like to update a datetime value (when the people have last been visited) to today's date by clicking on a <a><\a> link that shows in the list. That way I don't have to setup an update view just to update when I've last visited the coworkers. Is something like this even possible?
I did try to implement a function in my models.py with the @property tag but when I refresh the webpage, or visit the page it automatically updates it without having to click on the link.
Edit: Here is the code:
# models.py
@property
def update_visit_date(self):
self.last_visit = timezone.make_aware(datetime.datetime.today())
super(Directory, self).save()
return reverse('directory_list')
# snippet from my template directory_list.html
{% for contact in items %}
<tr>
<td>{{ contact.first_name }}</td>
<td>{{ contact.last_name }}</td>
<th><a href="{{ contact.get_absolute_url }}">{{ contact.email_address }}</a></th>
<td>{{ contact.phone_number_1 }}</td>
<td>{{ contact.get_department_display }}</td>
<td>{{ contact.room_number }}</td>
{% if contact.is_past_due == 'no_visit_performed' %}
<td class="info">{{ contact.last_visit }}<a href="{{ contact.update_visit_date }}"> {% bootstrap_icon "plus-sign" %}</a></td>
{% elif contact.is_past_due == 'visit_good' %}
<td class="success">{{ contact.last_visit }}<a href="{{ contact.update_visit_date }}"> {% bootstrap_icon "plus-sign" %}</a></td>
{% elif contact.is_past_due == 'visit_old' %}
<td class="warning">{{ contact.last_visit }}<a href="{{ contact.update_visit_date }}"> {% bootstrap_icon "plus-sign" %}</a></td>
{% elif contact.is_past_due == 'need_visit' %}
<td class="danger">{{ contact.last_visit }}<a href="{{ contact.update_visit_date }}"> {% bootstrap_icon "plus-sign" %}</a></td>
{% endif %}
</tr>
{% empty %}
Is this something that is possible, the performing a CRUD from a template link? Or am I going about this the wrong way? Any help is greatly appreciated. Thank you very much!
/r/djangolearning
https://redd.it/6wd8ue
Hello all,
I am still quite inexperienced in Django and I was wondering if it would be at all possible to update/save today's date in my database directly from the template?
I have a Django-filter filterView (listView) that shows the list of people that are in my department which I currently have in my database. And I would like to update a datetime value (when the people have last been visited) to today's date by clicking on a <a><\a> link that shows in the list. That way I don't have to setup an update view just to update when I've last visited the coworkers. Is something like this even possible?
I did try to implement a function in my models.py with the @property tag but when I refresh the webpage, or visit the page it automatically updates it without having to click on the link.
Edit: Here is the code:
# models.py
@property
def update_visit_date(self):
self.last_visit = timezone.make_aware(datetime.datetime.today())
super(Directory, self).save()
return reverse('directory_list')
# snippet from my template directory_list.html
{% for contact in items %}
<tr>
<td>{{ contact.first_name }}</td>
<td>{{ contact.last_name }}</td>
<th><a href="{{ contact.get_absolute_url }}">{{ contact.email_address }}</a></th>
<td>{{ contact.phone_number_1 }}</td>
<td>{{ contact.get_department_display }}</td>
<td>{{ contact.room_number }}</td>
{% if contact.is_past_due == 'no_visit_performed' %}
<td class="info">{{ contact.last_visit }}<a href="{{ contact.update_visit_date }}"> {% bootstrap_icon "plus-sign" %}</a></td>
{% elif contact.is_past_due == 'visit_good' %}
<td class="success">{{ contact.last_visit }}<a href="{{ contact.update_visit_date }}"> {% bootstrap_icon "plus-sign" %}</a></td>
{% elif contact.is_past_due == 'visit_old' %}
<td class="warning">{{ contact.last_visit }}<a href="{{ contact.update_visit_date }}"> {% bootstrap_icon "plus-sign" %}</a></td>
{% elif contact.is_past_due == 'need_visit' %}
<td class="danger">{{ contact.last_visit }}<a href="{{ contact.update_visit_date }}"> {% bootstrap_icon "plus-sign" %}</a></td>
{% endif %}
</tr>
{% empty %}
Is this something that is possible, the performing a CRUD from a template link? Or am I going about this the wrong way? Any help is greatly appreciated. Thank you very much!
/r/djangolearning
https://redd.it/6wd8ue
reddit
Update / Save model date value directly from... • r/djangolearning
Hello all, I am still quite inexperienced in Django and I was wondering if it would be at all possible to update/save today's date in my database...