Stream

Join this community to post or comment

Shivendra Singh

Discuss & Suggestions  - 
3
Darrick Allen's profile photoThomas Krüger's profile photo
4 comments
 
I don't get warm with the article. While reading it I did not really find out where the "war" is and some parts are comparing apples with pears. A good example would be the two architecture graphs, they show very different views on both frameworks.
Add a comment...

Ava Smith

Newbies  - 
 
Django Application inside a Docker Container
#django   #docker  
I have a Django application that I want to dockerize it for local development. I am also new to Docker, might not be suitable for your production environment
13
3
Emmanuel Akinpelu's profile photo
 
It'd have been nice if the writer had posted a link of where to read and know about docker for people (like me) who don't know what's it is and why it's used.
Add a comment...
 
Several websites nowadays include logging in with Facebook, Twitter, Google+ e.t.c instead of filling the register form and there are some libraries that can help one integrate those kind of authorizations on a web app.

How did those websites make that possible? i.e allowing other websites to be able to get some user's info directly from them when creating account instead of having to fill it again, how do they handle the security too? I'd like to know how everything works cause I'm trying to work on a project and I'd like people to be able to register/log in to other websites by just clicking a login with "my website name" link.


Thanks.
1
1
Emmanuel Akinpelu's profile photoChristian Ledermann's profile photo
5 comments
Add a comment...
 
Hey everyone! Maybe this is the wrong community for my question, but anyway. I have a Django website and I want to separate the media files in their own server. I've read that nginx is perfect for such cases, but if there's something better, please tell me. Do you have any idea how to do this? Tutorials on the nginx website seem to assume you know a bit about the system and I'm a bit confused...
1
Roland Müller's profile photoΑντώνης Καρβελάς's profile photo
8 comments
 
That's what I ended up doing actually: save on the django server, ftp it to the media server, delete from the django server. But thanks!
Add a comment...

John Dean

Questions  - 
 
Anther question:

I have a bunch of models in different apps

class Store(models.Model):
store = models.PositiveInteger(primary_key=True)

Another app

class PhoneLines(models.Model):
store = models.ForeignKey(Store)
line = models.Integer()

class CircuitInfo(models.Model):
store = models.ForeignKey(Store)
circuit_id = models.TextField()

Then I have a view where I want to get all that info.. now in SQL I would accomplish that by doing a join, but I don't think I understand how django works in this instance.

def store_search(request):
store_number = request.POST.get("store")
store_data = Store.objects.get(store=store_number).select_related()

This doesn't seem to pull all that data.. am I doing this backwards?
1
Eman Nollase's profile photo
4 comments
 
or simply store_data = Store.objects.get(store=store_number)
Add a comment...
 
Learning Laravel and came across something like this in the models:

protected $hidden = [
'password', 'remember_token',
];

What that essentially does it, any query that comes through the model, the returned values should exclude the 'password' and 'remember_token'

In Django, I know I am able to exclude fields when creating Model Forms or using the Forms, or exclude fields in queries.

However, is there a way one can specify that at the model level?
4
Dan Jones's profile photoNkansah Rexford's profile photo
2 comments
 
+Dan Jones Great idea, and thanks for sharing. Makes sense. Just as you mentioned, might be a bit of a performance issue.

Thanks.
Add a comment...

John Dean

Questions  - 
 
Can someone tell me how to output the database schema that django would output using django 1.9?
5
John Dean's profile photoIlian Iliev's profile photo
6 comments
 
Check "manage.py sqlmigrate" it will show you the SQL statementsfor the migrations. Not exactly what you need but close. The other option is to use mysqldump to output the schema of the database after applying all migrations.
Add a comment...

Naren Yellavula

Discuss & Suggestions  - 
Namaste Everyone. I recently wrote an excel dump service as part of my work and wants to share that experience with you. Initially, I irritated a lot because creating excel in Python is fairly easy…
3
Add a comment...

Sofia Kelly

Links & Videos  - 
 
The Python Mega Course: Build 10 Python Applications
#python  
The only Python course covering web, databases, web scraping, data science, web visualizations, image processing & more.
10
4
Add a comment...

Nina Diana

Questions  - 
 
Coding for Entrepreneurs: Learn Python, Django, and More.
A Programming Class for Non-Technical Founder(s). Learn Django- the #1 Python Frameworks, APIs, HTML, CSS, + Payments.
A Programming Class for Non-Technical Founder(s). Learn Django- the #1 Python Frameworks, APIs, HTML, CSS, + Payments.
6
3
Add a comment...

About this community

The Web framework for perfectionists with deadlines. www.djangoproject.com
 
Hello Everybody,
I'm having a trouble for make multiple views
I have my structure that I'll implement:

localhost:8000/control/month
localhost:8000/control/month/create
localhost:8000/control/month/edit
localhost:8000/control/month/delete
And other views...

localhost:8000/control/week
localhost:8000/control/week/create
localhost:8000/control/week/edit
localhost:8000/control/week/delete

And so on for day and other patterns


urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^control/user', include("digitalizacao.urls")),
url(r'^control/mes', include("digitalizacao.urls")),
url(r'^control/semana', include("digitalizacao.urls")),
url(r'^control/dia', include("digitalizacao.urls")),


my patterns on urls.py main


urlpatterns = [
url(r'^$', "digitalizacao.views.usuarioList"),
url(r'^detail/$', "digitalizacao.views.usuarioDetail"),
url(r'^create/$', "digitalizacao.views.usuarioCreate"),
url(r'^edit/$', "digitalizacao.views.usuarioEdit"),
url(r'^delete/$', "digitalizacao.views.usuarioDelete"),

url(r'^$', "digitalizacao.views.mesList"),
url(r'^detail/$', "digitalizacao.views.mesDetail"),
url(r'^create/$', "digitalizacao.views.mesCreate"),
url(r'^edit/$', "digitalizacao.views.mesEdit"),
url(r'^delete/$', "digitalizacao.views.mesDelete"),


]
my patterns on app/urls.py

And my I don't know how can I do a urlpatterns with many views. I saw many articles, stackoverflow and others, but nothing has been useful

Thanks

1
Douglas Mendes's profile photoyakoub abaya's profile photo
5 comments
 
+Douglas Mendes
i have better idea, i told you : use regular expressions in the url patterns !!!
Add a comment...
 
Hello guys, I started an Open-Source project for easily learning Machine Learning online. And I need someone who can help me developing a Python based webpage. We have got a Slack channel, here's my email:
jancen.widmer@gmail.com
3
Add a comment...

Adam Johnson

Discuss & Suggestions  - 
 
Django For Beginners free 100%
Django is a fantastic web framework built with the Python programming language. With Django you can create websites and web apps very quickly and efficiently.

Django was created by very experienced developers who have built into it several tools for ....
Django is an extremely in-demand skill that pays quite well. Django is used by a lot of startups to build great applications.
6
Add a comment...
 
Hi I need help with a login form, I want to have an app that will load the login modal if the user is not login and a dashboard if the user is authenticated.
What would I need to do such, as far as I have read, I will just need to have 1 app for my dashboard, a template and a conditional calling the user if its authenticated. However I am still not sure if i would need something else to call the user/autnetication module either on a view or somewhere else.
Regards.
2
Mike Stoddart's profile photoAlexandro Colorado's profile photo
6 comments
 
Do you have an app that does that?
Add a comment...
 
I have a web site that is used by several clients. Each client has their own payment processing accounts. Is there a shopping cart like app or framework that can handle that? PayPal must be included, and I think a plugin architecture would be a must unless it's built in support is quite extensive.
2
Cherny D. C. Berbesí I. (chachan)'s profile photoEncolpe Degoute's profile photo
2 comments
 
Viewflow
Add a comment...

James Ellis

Discuss & Suggestions  - 
 
Django Tutorial for Beginners - 33 - Upload Files
Learn Web, Mobile Development and Design with Node.js, Angular.js, React.js, Python, MongoDB, HTML5, CSS3, JavaScript, PHP, mobile app development, Responsive Web Design
3
Add a comment...

Hana Anderson

Discuss & Suggestions  - 
 
Build Your First Python and Django Application
https://codequs.com/p/Hk42gUeK
Build Your First Python and Django Application
5
Add a comment...
 
We release django-hijack 2.1.2 today. https://github.com/arteria/django-hijack/releases/tag/v2.1.2
This version comes with Django 1.10 support, new and improved template tags.
The Django admin site integration app, django-hijack-admin, was updated as well.
5
Add a comment...

John Dean

Questions  - 
 
Yet again another stupid question.

I have some legacy databases that have like 20 tables. I only need 2 tables, is there away to only pull information from those tables...

I was trying to do a

python manage.py inspectdb > models.py

please note this is with django 1.9 and a postgresql
2
John Dean's profile photoJochen Schnelle's profile photo
5 comments
 
+John Dean​ actually I don't know if Django's ORM can autoreflect tables. Never saw something like this in the Django docs... but I never explicitly looked for it. But probably there is a Django extension which can do the job?
Add a comment...

Christian Ledermann

Links & Videos  - 
 
The Django Signals is a strategy to allow decoupled applications to get notified when certain events occur. Let’s sayyou want to invalidate a cached page eve...
7
Code Revolution's profile photo
 
Nice site in general, bookmarked it for future studying...
Add a comment...