Re: Projects for Beginners

2019-01-31 Thread Tim Vogt (Tim Vogt)
https://wsvincent.com 

tim
t...@officerebels.nl 


> Op 31 jan. 2019, om 19:02 heeft Vikram Jadhav  het 
> volgende geschreven:
> 
> Hey there!!
> Hope you are doing well in Django.
> 
> I am a beginner in Django and completed couples of a tutorial in Django.
> Please suggest project ideas or resources of Django projects to learn for me 
> as beginners.
> 
> 
> -- 
> 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/aaa5b448-671f-439e-b49d-419006f40aca%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/BD9CADE9-930D-417D-B271-B9E2A268FB88%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: beginner

2019-01-31 Thread Tim Vogt (Tim Vogt)
Wat do you want to accomplish?

Tim
t...@officerebels.nl
> Op 31 jan. 2019, om 21:51 heeft Emmanuel klutse  het 
> volgende geschreven:
> 
> I'm Emmnuel klutse, and very new to programming. 
> CAN I GET SOMEONE TO MENTOR ME PLEASE.
> i'm currently taking a python course on udemy and also learning on django via 
> youtube.
> I NEED A MENTOR PLEASE
> 
> -- 
> 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/63ac66bb-ea6e-402d-aa91-2eb82abaf4d2%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/31162D20-A423-4EE3-869D-5156F4561910%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: help for django interview task

2019-01-31 Thread Tim Vogt (Tim Vogt)
draw out the program first and isolatie each problem you try to solve.

and start at the backend.
start small and increase the functions and try to grasp all.
At least in abstraction what you try to do. 

Than start writing the functions in a recipe overview. 
and after the application basics are installed( django app settings etc
write the functions in human language and/ or directly in the models forms etc.




succes!

Tim
coderebels

> Op 31 jan. 2019, om 07:44 heeft Navami K  het 
> volgende geschreven:
> 
> Can anyone help me with the project in the given image . thats my interview 
> task . i have no idea... i am starter . know only the basics
> 
> -- 
> 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/36202414-5af8-4a8a-9b28-ee30481519a2%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/1A875307-AE5B-4B52-88D6-0671E6E7DA33%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


test error

2018-10-20 Thread Tim Vogt (Tim Vogt)
I try to make a test with has an error
any suggestions?
tim


expected_author = f'{post.author}
^
SyntaxError: EOL while scanning string literal


--
Ran 1 test in 0.000s

FAILED (errors=1)
Destroying test database for alias 'default'...
MacBook-Pro-15-Officerebel:blogapi timvogt$


from django.test import TestCase
from django.contrib.auth.models import User

from .models import Post

class BlogTests(TestCase):

@classmethod 
def setUpTestData(cls):
#Create a user
testuser1 = User.objects.create_user(
username='testuser1', password='abc123')
testuser1.save()

# Create a blog post
test_post = Post.objects.create(
author=testuser1, title='Blog title', body='Body content...')
test_post.save()

def test_blog_content(self):
post = Post.objects.get(id=1)
expected_author = f'{post.author}'
expected_title = f'{post.title}'
expected_body = f'{post.body}'
self.assertEquals(expected_author, 'testuser1')
self.assertEquals(expected_title,'Blog title')
self.assertEquals(expected_body, 'Body content ...')

-- 
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/FCBEF0A0-EDB1-4842-BB4E-42249F3F48EB%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


/usr/share/nginx/html

2018-10-03 Thread Tim Vogt (Tim Vogt)
I am trying to deploy my wagtail/dajngo app to ngnix with Gunicorn.

http://devopspy.com/python/deploy-django-with-nginx-gunicorn-postgresql-virtualenv/



usr/share/nginx/html


include /etc/nginx/conf.d/*.conf;

server {
listen   80 default_server;
listen   [::]:80 default_server;
server_name  _;
root /usr/share/nginx/html;

# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;

location / {
}

error_page 404 /404.html;
location = /40x.html {
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
I can not just my ngnix settings.
But still what do I need to change?

and how to get the proxy_pass http://unix:/var/www/myproject.sock; ?
Do i need to make this?


Tim

-- 
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/BE3D8EC0-200B-4A9E-8CB8-F34C0DD1C4AD%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to create a form builder in django

2018-09-29 Thread Tim Vogt (Tim Vogt)
Do you need a Cms too?
I had used wagtail for its formnuilder and cms is keeps the django applications 
as it workes similar with the route en views.

https://blog.michaelyin.info/how-build-form-page-wagtail/

or just built the blog and the forms later 
http://docs.wagtail.io/en/v2.0/getting_started/tutorial.html


tim


> Op 29 sep. 2018, om 08:26 heeft django_learner  het 
> volgende geschreven:
> 
> I am a newbie in Django. Can anyone help me how to create a form builder in 
> Django without using django-fobi or any other packages
> 
> -- 
> 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/f239efe6-4efd-4edd-b161-074da1df40be%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/F2793137-867D-44F1-B85D-7E45881075CF%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


rest api is installed but does not run

2018-09-25 Thread Tim Vogt (Tim Vogt)
Hoi we had a django project and we have pipenv and django installed and 
django rest

when running python manage.py django keept telling the rest is not installed.

any tips?

we have django_rest in installed apps..

tim

-- 
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/E0B081FE-2876-40AA-B26B-795C8BACB6D9%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: about project

2018-09-15 Thread Tim Vogt (Tim Vogt)
These are nice projects

tim
https://wsvincent.com/django-contact-form/



> Op 15 sep. 2018, om 16:11 heeft vikamadithya reddy 
>  het volgende geschreven:
> 
> can anyone suggest me a good project for undergraduation course using django?
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to django-users@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/django-users 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/19290ef3-dc19-4878-8b4b-3a24a8a7a6af%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/80AA7039-F187-494F-AECC-22D92E0E8C0B%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


ftp deploy django

2018-09-10 Thread Tim Vogt (Tim Vogt)
Perhaps little off topic but I have two issues where i need help with.
For creating and deploying my django.


1)
somehow I cannot let my django project run anymore.. Brew install on other 
project killed some links.

timvogt$ python manage.py runserver
dyld: Library not loaded: @executable_path/../.Python
  Referenced from: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3
  Reason: image not found
Abort trap: 6





2) For new django project wich I want to setup the client gives me an ftp 
acces..
how to deploy and activate my django project with ftp acces?

Tim

-- 
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/965AF012-F41E-4C7C-BC66-F87658614D58%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


saleor error NoReverseMatch at /en/

2018-09-04 Thread Tim Vogt (Tim Vogt)
I have made saleor local

after restart I get this error

Tried to change the “ “ into ‘ ‘ bout before it worked.

Any tips how to solve this?

Tim

NoReverseMatch at /en/
Reverse for ' manifest ' not found. ' manifest ' is not a valid view function 
or pattern name.
Request Method: GET
Request URL:http://localhost:8000/en/
Django Version: 2.0.8
Exception Type: NoReverseMatch
Exception Value:
Reverse for ' manifest ' not found. ' manifest ' is not a valid view function 
or pattern name.
Exception Location: 
/Users/timvogt/virtualenvs/saleor/lib/python3.6/site-packages/django/urls/resolvers.py
 in _reverse_with_prefix, line 634
Python Executable:  /Users/timvogt/virtualenvs/saleor/bin/python3
Python Version: 3.6.5
Python Path:
['/Users/timvogt/Software_projects/saleor',
 '/Users/timvogt/virtualenvs/saleor/lib/python36.zip',
 '/Users/timvogt/virtualenvs/saleor/lib/python3.6',
 '/Users/timvogt/virtualenvs/saleor/lib/python3.6/lib-dynload',
 '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6',
 '/Users/timvogt/virtualenvs/saleor/lib/python3.6/site-packages',
 '/Users/timvogt/Software_projects/saleor']
Server time:Tue, 4 Sep 2018 04:26:23 -0500
Error during template rendering

In template /Users/timvogt/Software_projects/saleor/templates/base.html, error 
at line 24
Reverse for ' manifest ' not found. ' manifest ' is not a valid view function 
or pattern name.
14  
15  
16   {% get_available_languages 
as LANGUAGES %} {% for lang_code, language_name in LANGUAGES %}
17   {% endfor %} {% 
endblock meta %} {% include 'favicon.html' %} {% render_bundle 'storefront' 
'css' attrs='async' %} {% block stylesheet %}{% endblock stylesheet %} {% block 
meta_tags %}
18  
19  
20  
21  
22   {% endblock meta_tags %}
23  
24  
25  
26  
27  
30  
31  
32  
33  {% block header %}
34  

-- 
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/F33E62F9-637C-4EB0-A1E0-CA36735500DF%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: TypeError at /users/login/ login() got an unexpected keyword argument 'template_name'

2018-08-27 Thread Tim Vogt (Tim Vogt)
Thanks I tired bout get another error

File "/Users/timvogt/Software_projects/learning_log/users/urls.py", line 15, in 

url('login/', login, {'template_name': 'users/login.html'}, name='login'),
NameError: name 'login' is not defined



"""Defines URL patterns for users"""

from django.conf.urls import url
from . import views
# from django.contrib.auth import login
from django.contrib.auth.views import LoginView
app_name='users'


urlpatterns = [
  # Login page
url('login/', login, {'template_name': 'users/login.html'}, name='login'),
# Logout page
url('logout/', views.logout_view, name='logout'),
]

tim

> Op 27 aug. 2018, om 13:29 heeft Jason  het volgende 
> geschreven:
> 
> you're importing the wrong login.  you need to import the login view.  almost 
> there, just
> 
> from django.contrib.auth.views import LoginView
> 
> 
> 
> -- 
> 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/5b12c855-6fb8-4887-b0ba-0dde7d29fea2%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/0B170A66-C6B7-46D5-BAE8-1724486CF8A5%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django performance issue that's troubling

2018-08-24 Thread Tim Vogt (Tim Vogt)
Also found this perhaps helpfull
https://blog.labdigital.nl/working-with-huge-data-sets-in-django-169453bca049

> Op 24 aug. 2018, om 21:28 heeft Jim Illback  het 
> volgende geschreven:
> 
> Vijay, your suggestion worked. I had tried this previously but it was using a 
> FBV and it didn’t work. But with this CBV app, it works perfectly. Thanks.
> 
> Matthew, I’ll definitely keep your suggestion in mind - maybe back on my FBV 
> application if I refactor!
> 
> Thanks much to both of you!
> Jim
> 
>> On Aug 24, 2018, at 11:19 AM, Matthew Pava > > wrote:
>> 
>> It’s important that you set the widget to a HiddenInput.  It only has to 
>> render it with the current value.  If you are keeping the widget to be a 
>> Select widget and then setting a CSS class to make it hidden, the system 
>> will still have to load all 37K values.  I guess I’m missing something in 
>> your explanation.
>>  
>> From: django-users@googlegroups.com  
>> [mailto:django-users@googlegroups.com 
>> ] On Behalf Of Jim Illback
>> Sent: Friday, August 24, 2018 1:16 PM
>> To: Django users
>> Subject: Re: Django performance issue that's troubling
>>  
>> Matthew, thanks - that was my original code, but even hidden, it has to fill 
>> in all possible values - 37K - so it takes multiple seconds.
>>  
>> Vijay, I’ll try your suggestion.
>>  
>> Thanks much,
>> Jim
>> 
>> 
>> On Aug 24, 2018, at 11:01 AM, Matthew Pava > > wrote:
>>  
>> You can keep the field, but change its widget to a HiddenInput.
>> https://stackoverflow.com/questions/6862250/change-a-django-form-field-to-a-hidden-field
>>  
>> 
>>  
>>  
>>  
>> From: django-users@googlegroups.com  
>> [mailto:django-users@googlegroups.com 
>> ] On Behalf Of Vijay Khemlani
>> Sent: Friday, August 24, 2018 12:59 PM
>> To: django-users@googlegroups.com 
>> Subject: Re: Django performance issue that's troubling
>>  
>> Please reply to the user group
>>  
>> "But, in order to have the update work, it needs the ForeignKey to the 
>> parent in the form"
>>  
>> As far as I know, it doesn't need to (if the entry already exists in the 
>> database and you are just editing it), you just need to set up the fields 
>> that you want to be editable by the user
>>  
>>  
>> On Fri, Aug 24, 2018 at 2:06 PM Jim Illback > > wrote:
>> Vijay, think of this is a parent - child relationship. I have 37K parents. 
>> Now I want to update a child of one of the parents. But, in order to have 
>> the update work, it needs the ForeignKey to the parent in the form. However, 
>> to add that key, Django must then allow it to update that field and thus has 
>> to fill in all 37K entries. Is there no way to tell Django that the FK 
>> relationship can not be changed? If I leave it off of the form, the update 
>> fails because it is a required field. If I add it to the form, Django has to 
>> allow all potential update values to be shown. What’s the way out of this 
>> mess?
>>  
>> Thanks,
>> Jim
>>  
>> 
>> 
>> 
>> Begin forwarded message:
>>  
>> From: Vijay Khemlani mailto:vkhem...@gmail.com>>
>> Subject: Re: Django performance issue that's troubling
>> Date: August 24, 2018 at 5:07:07 AM PDT
>> To: django-users@googlegroups.com 
>> Reply-To: django-users@googlegroups.com 
>> 
>>  
>> To tell you the truth I couldn't understand some parts of your message, but 
>> if your AddictionForm is a ModelForm then you should be able to limit its 
>> fields to just the ones you want your users to be able to update.
>>  
>> https://docs.djangoproject.com/en/2.1/topics/forms/modelforms/ 
>> 
>>  
>> Regards!
>>  
>>  
>>  
>> On Thu, Aug 23, 2018 at 8:19 PM Jim Illback > > wrote:
>> Vijay, you are exactly correct. Thank you much! 
>>  
>> Now, knowing the problem, I still don’t have a great solution. Here’s how it 
>> is supposed to work.
>>  
>> Someone chooses a client from the list or a search. All the possible support 
>> records are shown, whether they exist or not, on a screen to hyperlink to 
>> one of them. If the record exists, the URL includes the PK and transfers to 
>> the UpdateView. This is similar for an AddView if the record does not exist. 
>> However, in the Update or Add, I don’t want the primary key changed. So, I 
>> hid the field (and thus all the records were read). However, now I can’t 
>> limit that field to only one value. If I format the entire SELECT tag with 
>> only one OPTION, Django gives an invalid expression for the ID or Name 
>> because it is based on my query set I 

Re: HEELP!! CANT LOAD THE CSS OF MY DJANGO ADMIN PAGE WHY??

2018-08-23 Thread Tim Vogt (Tim Vogt)
try $python manage.py runserver 

> Op 23 aug. 2018, om 21:31 heeft Dario Coronel  het 
> volgende geschreven:
> 
> I follow step by step the instructions of the documentatión of django 
> especificly the tutorial part two when i create my superuser its all ok The 
> problem is whe i put $python runserver he work but not find the statics files 
> and not load the styles just the view without nothing
> what i have done wrong?
> 
> 
> this is my settings.py 
> 
> """
> Django settings for mysite project.
> 
> Generated by 'django-admin startproject' using Django 2.0.8.
> 
> For more information on this file, see
> https://docs.djangoproject.com/en/2.0/topics/settings/
> 
> For the full list of settings and their values, see
> https://docs.djangoproject.com/en/2.0/ref/settings/
> """
> 
> import os
> 
> # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
> BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
> 
> 
> # Quick-start development settings - unsuitable for production
> # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
> 
> # SECURITY WARNING: keep the secret key used in production secret!
> SECRET_KEY = '2)a0=!9utl%7lrjixn0s4w(_q1so-$=__iy%@$$yi+!22rqjh)'
> 
> # SECURITY WARNING: don't run with debug turned on in production!
> DEBUG = False
> 
> ALLOWED_HOSTS = ['localhost', '127.0.0.1',]
> 
> 
> # Application definition
> 
> INSTALLED_APPS = [
> 'polls.apps.PollsConfig',
> 'django.contrib.admin',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
> ]
> 
> 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',
> ]
> 
> ROOT_URLCONF = 'mysite.urls'
> 
> TEMPLATES = [
> {
> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
> 'DIRS': [],
> 'APP_DIRS': True,
> 'OPTIONS': {
> 'context_processors': [
> 'django.template.context_processors.debug',
> 'django.template.context_processors.request',
> 'django.contrib.auth.context_processors.auth',
> 'django.contrib.messages.context_processors.messages',
> ],
> },
> },
> ]
> 
> WSGI_APPLICATION = 'mysite.wsgi.application'
> 
> 
> # Database
> # https://docs.djangoproject.com/en/2.0/ref/settings/#databases
> 
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.sqlite3',
> 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
> }
> }
> 
> 
> # Password validation
> # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
> 
> AUTH_PASSWORD_VALIDATORS = [
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
> },
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.MinimumLengthValidator',
> },
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.CommonPasswordValidator',
> },
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.NumericPasswordValidator',
> },
> ]
> 
> 
> # Internationalization
> # https://docs.djangoproject.com/en/2.0/topics/i18n/
> 
> LANGUAGE_CODE = 'en-us'
> 
> TIME_ZONE = 'Europe/Istanbul'
> 
> USE_I18N = True
> 
> USE_L10N = True
> 
> USE_TZ = True
> 
> 
> # Static files (CSS, JavaScript, Images)
> # https://docs.djangoproject.com/en/2.0/howto/static-files/
> 
> STATIC_URL = '/static/'
> STATIC_ROOT = os.path.join(BASE_DIR, "static")
> 
> 
> 
> 
> 
> what is the problem?
> 
> -- 
> 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/029a39f1-6538-44e7-ac92-4bd96f42866f%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 

Re: Django Book

2018-08-05 Thread Tim Vogt (Tim Vogt)
https://wsvincent.com/about/



> Op 5 aug. 2018, om 17:20 heeft Jun Chen  het volgende 
> geschreven:
> 
> Does anyone know a good django book for the Django 2.0?
> 
> -- 
> 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/33981edc-bf8f-4b2f-ba3e-5a7612177e1f%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/44E08945-A68D-4F8D-A2DC-BC9E1204C9E2%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to write api for sms intregartion in django I am new in django?

2018-08-01 Thread Tim Vogt (Tim Vogt)
https://www.twilio.com/blog/2014/04/building-a-simple-sms-message-application-with-twilio-and-django-2.html


> Op 1 aug. 2018, om 09:15 heeft im...@wsegames.com het volgende geschreven:
> 
> I want to write a api when form submit a sms should go to the phone, I don't 
> know how to do that can somone help me regarding this?
> 
> -- 
> 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/253c999f-2151-4b42-8bd9-f7288f57c394%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/1046E16C-657D-4D5F-AF5C-876D37FDE5AB%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: help with learning path

2018-07-05 Thread Tim Vogt (Tim Vogt)
My 2 cents are:
https://wsvincent.com  who has a nice book about django 
and api’s
Myself I was studying pluralisght (not free)
And find django for entrepeneurs has nice inspiration 
https://prettyprinted.com/p/django-database-essentials 




> Op 5 jul. 2018, om 17:16 heeft Tin Le  het volgende 
> geschreven:
> 
> Yes, I have the same question as well. If some experts know where is the 
> lead, please share with us all. Thanks
>  
> Sent from Mail  for Windows 10
>  
> From: backintow...@gmail.com 
> Sent: Thursday, July 5, 2018 10:12 AM
> To: Django users 
> Subject: help with learning path
>  
> Hi everyone,
>  
> I have been learning python and Django for the past 12 months, however, I 
> seem to be stuck with moving forward. I have completed basic tutorials, read 
> beginner and some intermediate books. The problem I'm having is finding a 
> learning resource somewhere between intermediate and professional. All the 
> resources I have found are for a beginner (which I understand) or too 
> advanced and leave me more confused. I'm self-taught and learning this by 
> myself using Google, YouTube etc. Any help would be appreciated.
> 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/8f025949-71e5-4c14-b60e-6daeb387748c%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/5b3e3635.1c69fb81.4c5ad.0334%40mx.google.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/AAE6A5BE-614D-464E-8B33-6C95EE8AC1D0%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: help

2018-07-05 Thread Tim Vogt (Tim Vogt)
No problem.
Just look inside the current folder where your command line is present.
There is no manage.py 

So to get to the folder where the manage.py is you have to know in wich folder 
it is.
And with the command line commando’s you can go there.

cd.. is one folder higher
cd project_name_folder  is one folder deeper

> Op 5 jul. 2018, om 13:49 heeft Umar Kambala  het 
> volgende geschreven:
> 
> Please am sorry am new to django, I don't really understood what u mean
> 
> On Jul 5, 2018 11:42 AM, "Tim Vogt (Tim Vogt)"  <mailto:timtv...@gmail.com>> wrote:
> do $ls and find the directory where the manage.py file is.
> cd.. to go one directory back
> 
> 
> 
>> Op 5 jul. 2018, om 13:25 heeft Umar Kambala > <mailto:umarkamb...@gmail.com>> het volgende geschreven:
>> 
>> thanks Mr Tim
>> i have python 3.6 install on my computer, i try running  python manage.py 
>> migrate and this is what i got
>> 
>> C:\Users\Admin\Desktop\Django web>python manage.py migrate
>> python: can't open file 'manage.py': [Errno 2] No such file or directory
>> 
>> On Thu, Jul 5, 2018 at 4:21 AM, Tim Vogt (Tim Vogt) > <mailto:timtv...@gmail.com>> wrote:
>> perhaps run the project with python2 or 
>> do python manage.py migrate.
>> 
>> 
>>> Op 5 jul. 2018, om 13:18 heeft Umar Kambala >> <mailto:umarkamb...@gmail.com>> het volgende geschreven:
>>> 
>>> please this what i had after running my Django-admin startproject myproject
>>> 
>>>   File 
>>> "c:\users\admin\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\__init__.py",
>>>  line 371, in execute_from_command_line
>>> utility.execute()
>>>   File 
>>> "c:\users\admin\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\__init__.py",
>>>  line 365, in execute
>>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>>   File 
>>> "c:\users\admin\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\__init__.py",
>>>  line 216, in fetch_command
>>> klass = load_command_class(app_name, subcommand)
>>>   File 
>>> "c:\users\admin\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\__init__.py",
>>>  line 36, in load_command_class
>>> module = import_module('%s.management.commands.%s' % (app_name, name))
>>>   File 
>>> "c:\users\admin\appdata\local\programs\python\python36-32\lib\importlib\__init__.py",
>>>  line 126, in import_module
>>> return _bootstrap._gcd_import(name[level:], package, level)
>>>   File "", line 994, in _gcd_import
>>>   File "", line 971, in _find_and_load
>>>   File "", line 955, in _find_and_load_unlocked
>>>   File "", line 665, in _load_unlocked
>>>   File "", line 678, in exec_module
>>>   File "", line 219, in 
>>> _call_with_frames_removed
>>>   File 
>>> "c:\users\admin\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\commands\startproject.py",
>>>  line 1, in 
>>> from django.core.management.templates import TemplateCommand
>>>   File 
>>> "c:\users\admin\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\templates.py",
>>>  line 17, in 
>>> from django.template import Context, Engine
>>> ModuleNotFoundError: No module named 'django.template'
>>> 
>>> what should i do to debug this error please?
>>> 
>>> 
>>> -- 
>>> 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 
>>> <mailto:django-users+unsubscr...@googlegroups.com>.
>>> To post to this group, send email to django-users@googlegroups.com 
>>> <mailto:django-users@googlegroups.com>.
>>> Visit this group at https://groups.google.com/group/django-users 
>>> <https://groups.google.com/group/django-users>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/CAPkbFbatt4e_SVMPbWEHk--tBKC8VJR6xYcAEjwEJRjMFwT7Wg%40mail.gmail.com
>>>  
>>> <https://groups.google.com/d/msgid/django-users/CAPkbFbatt4e_SVMPbWEHk--tBKC8V

Re: help

2018-07-05 Thread Tim Vogt (Tim Vogt)
do $ls and find the directory where the manage.py file is.
cd.. to go one directory back



> Op 5 jul. 2018, om 13:25 heeft Umar Kambala  het 
> volgende geschreven:
> 
> thanks Mr Tim
> i have python 3.6 install on my computer, i try running  python manage.py 
> migrate and this is what i got
> 
> C:\Users\Admin\Desktop\Django web>python manage.py migrate
> python: can't open file 'manage.py': [Errno 2] No such file or directory
> 
> On Thu, Jul 5, 2018 at 4:21 AM, Tim Vogt (Tim Vogt)  <mailto:timtv...@gmail.com>> wrote:
> perhaps run the project with python2 or 
> do python manage.py migrate.
> 
> 
>> Op 5 jul. 2018, om 13:18 heeft Umar Kambala > <mailto:umarkamb...@gmail.com>> het volgende geschreven:
>> 
>> please this what i had after running my Django-admin startproject myproject
>> 
>>   File 
>> "c:\users\admin\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\__init__.py",
>>  line 371, in execute_from_command_line
>> utility.execute()
>>   File 
>> "c:\users\admin\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\__init__.py",
>>  line 365, in execute
>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>   File 
>> "c:\users\admin\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\__init__.py",
>>  line 216, in fetch_command
>> klass = load_command_class(app_name, subcommand)
>>   File 
>> "c:\users\admin\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\__init__.py",
>>  line 36, in load_command_class
>> module = import_module('%s.management.commands.%s' % (app_name, name))
>>   File 
>> "c:\users\admin\appdata\local\programs\python\python36-32\lib\importlib\__init__.py",
>>  line 126, in import_module
>> return _bootstrap._gcd_import(name[level:], package, level)
>>   File "", line 994, in _gcd_import
>>   File "", line 971, in _find_and_load
>>   File "", line 955, in _find_and_load_unlocked
>>   File "", line 665, in _load_unlocked
>>   File "", line 678, in exec_module
>>   File "", line 219, in 
>> _call_with_frames_removed
>>   File 
>> "c:\users\admin\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\commands\startproject.py",
>>  line 1, in 
>> from django.core.management.templates import TemplateCommand
>>   File 
>> "c:\users\admin\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\templates.py",
>>  line 17, in 
>> from django.template import Context, Engine
>> ModuleNotFoundError: No module named 'django.template'
>> 
>> what should i do to debug this error please?
>> 
>> 
>> -- 
>> 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 
>> <mailto:django-users+unsubscr...@googlegroups.com>.
>> To post to this group, send email to django-users@googlegroups.com 
>> <mailto:django-users@googlegroups.com>.
>> Visit this group at https://groups.google.com/group/django-users 
>> <https://groups.google.com/group/django-users>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CAPkbFbatt4e_SVMPbWEHk--tBKC8VJR6xYcAEjwEJRjMFwT7Wg%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/django-users/CAPkbFbatt4e_SVMPbWEHk--tBKC8VJR6xYcAEjwEJRjMFwT7Wg%40mail.gmail.com?utm_medium=email_source=footer>.
>> For more options, visit https://groups.google.com/d/optout 
>> <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 
> <mailto:django-users+unsubscr...@googlegroups.com>.
> To post to this group, send email to django-users@googlegroups.com 
> <mailto:django-users@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-users 
> <https://groups.google.com/group/django-users>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/C04E4BEF-E8FF-4EF0-936A-69F04E1DD061%40gmail.com
>  
> <https://gr

Re: help

2018-07-05 Thread Tim Vogt (Tim Vogt)
perhaps run the project with python2 or 
do python manage.py migrate.


> Op 5 jul. 2018, om 13:18 heeft Umar Kambala  het 
> volgende geschreven:
> 
> please this what i had after running my Django-admin startproject myproject
> 
>   File 
> "c:\users\admin\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\__init__.py",
>  line 371, in execute_from_command_line
> utility.execute()
>   File 
> "c:\users\admin\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\__init__.py",
>  line 365, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File 
> "c:\users\admin\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\__init__.py",
>  line 216, in fetch_command
> klass = load_command_class(app_name, subcommand)
>   File 
> "c:\users\admin\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\__init__.py",
>  line 36, in load_command_class
> module = import_module('%s.management.commands.%s' % (app_name, name))
>   File 
> "c:\users\admin\appdata\local\programs\python\python36-32\lib\importlib\__init__.py",
>  line 126, in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 994, in _gcd_import
>   File "", line 971, in _find_and_load
>   File "", line 955, in _find_and_load_unlocked
>   File "", line 665, in _load_unlocked
>   File "", line 678, in exec_module
>   File "", line 219, in _call_with_frames_removed
>   File 
> "c:\users\admin\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\commands\startproject.py",
>  line 1, in 
> from django.core.management.templates import TemplateCommand
>   File 
> "c:\users\admin\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\templates.py",
>  line 17, in 
> from django.template import Context, Engine
> ModuleNotFoundError: No module named 'django.template'
> 
> what should i do to debug this error please?
> 
> 
> -- 
> 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/CAPkbFbatt4e_SVMPbWEHk--tBKC8VJR6xYcAEjwEJRjMFwT7Wg%40mail.gmail.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

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


Re: Templates html error

2018-06-28 Thread Tim Vogt (Tim Vogt)
/blog/mabase


your structure must be 

/blog/mabase/templates/mabase/index.html


TIm

> Op 28 jun. 2018, om 15:35 heeft emmanuel wyckens  het 
> volgende geschreven:
> 
> /blog/mabase

-- 
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/BAB370AB-1182-43F8-A43D-1CBFE2CBDA8C%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


NoReverseMatch at / ' homepage' is not a registered namespace

2018-06-25 Thread Tim Vogt (Tim Vogt)
I am building my django app from bas.html and with child themes

and get these errors:

any help woud be appreciated.

Tim


NoReverseMatch at /
' homepage' is not a registered namespace
Request Method: GET
Request URL:http://localhost:8000/
Django Version: 2.0.6
Exception Type: NoReverseMatch
Exception Value:
' homepage' is not a registered namespace
Exception Location: 
/Users/timvogt/newdjango/lib/python3.6/site-packages/django/urls/base.py in 
reverse, line 86
Python Executable:  /Users/timvogt/newdjango/bin/python3
Python Version: 3.6.5
Python Path:
['/Users/timvogt/coolapp',
 '/Library/Frameworks/Python.framework/Versions/3.6/lib/python36.zip',
 '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6',
 '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload',
 '/Users/timvogt/newdjango/lib/python3.6/site-packages']
Server time:Mon, 25 Jun 2018 20:46:07 +
Error during template rendering

In template /Users/timvogt/coolapp/homepage/templates/homepage/base.html, error 
at line 2
' homepage' is not a registered namespace

1   
2   main
3   topics {% block content 
%} {% endblock content %}

vieuws.py
from django.shortcuts import render

from .models import Topic
def index(request):
"""the homepage for the homepage"""
return render(request, 'homepage/index.html')

def topics(request):
"""show all topics"""
topics = Topic.objects.order_by('date_added')
context = {'topics': topics}
return render(request, 'homepage/topics.html', context)
# Create your views here.




base.html

main
topics {% block content %} {% 
endblock content %}

-- 
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/92C0C211-316E-49C9-96E0-ADA0C84B2E92%40gmail.com.
For more options, visit https://groups.google.com/d/optout.