Re: Building a framework

2018-12-29 Thread Jani Tiainen
Hi.

Unfortunately your question is really too broad to answer but I'll give
something to grasp on.

It all depends on features you want to build, time it takes to build those
features and time you do have available.

You should split your planned tasks to about two week periods (longer
periods are harder to estimate). Also you need a plan what you do if your
estimates are wrong and you start fall behind.

Also note that there are tasks like testing and documenting which you need
to allocate time. Also you might need to allocate time for research and
learning things.

Muhammad Zuhair Askari  kirjoitti la 29. jouluk. 2018
klo 5.05:

> Yes, What if I move towards building such framework like Flask, I even
> want to make more simpler and having less features (just basic features)
> framework, will that be useful for learning web in a bit deeper and is it
> worthy for a final Year Project for an under-graduate level student? Or
> there is another choice that what If I just download or forked the source
> code of Django or Flask or other simple framework and first understand and
> then making changes in that framework and customize that. What about this
> idea Sir?  @jani Tiainen
>
> On Friday, December 28, 2018 at 7:52:11 PM UTC+5, Jani Tiainen wrote:
>>
>> Hi,
>>
>> If you consider that Django has been in development over 10 years now and
>> been developed by several individuals. So building a framework like Django
>> doesn't happen overnight.
>>
>> Flask is microframework, containing very minimal set of tools and relying
>> on external components. Building something like Flask could be possible
>> since you wouldn't need to deal with complex issues like ORM or database
>> supports.
>>
>> On Fri, Dec 28, 2018 at 4:27 PM Muhammad Zuhair Askari <
>> mzuha...@gmail.com> wrote:
>>
>>> Hi! I want  to develop a framework like Django, Flask etc. using python
>>> as a final year project of my graduation. This may be very useful for
>>> learning purpose. Can anybody tell me how much time will it take for a not
>>> well experienced python developer? And is it a good Final Year Project?
>>>
>>> --
>>> 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/4e7d6365-4658-4bfa-9257-5157a233fb53%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>> Jani Tiainen
>>
>> - Well planned is half done, and a half done has been sufficient before...
>>
> --
> 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/ed939186-b30b-43c2-b9d6-e2da85bde218%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/CAHn91odacE23a-2A4Af5NLaqPEZB9OHKYKxfZSYGK%3D0RjzeR5A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: db_index=True not working, and indexes in class Meta yes

2018-12-29 Thread Jason
django automatically creates an index for foreign key columns, unless you 
specify db_index=False for that field.

what I suspect is happening here, you're telling django that it should have 
two indices for that particular column covering identical areas of 
responsibility.

-- 
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/421be6d8-8d45-486f-85f1-0c2261fa3e7d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


django admin site change_related_template_url problem

2018-12-29 Thread Zhe Li
Hi,

I am having issues with django installed on a server reversed proxied to 
the main website. Most of the sites work just fine except a very small 
detail in the admin site, change form page.

Django is running on server A, served at / on port 12345. Server B which is 
the main web server and has a domain www.example.com, and serves content 
(reverse proxies) from server A under /app/myapp.

i.e. *http://A:12345/admin/* translates to 
*https://www.example.com/app/myapp/admin*.

Everything is fine except when I try to modify a foreign key value from the 
model that it is referenced. You know, if I modify fields of model A in the 
django admin site, I can click on these buttons to change a foreign key 
model B.

[image: Screen Shot 2018-12-29 at 9.45.42 AM.png] 






The problem is that the links are not properly translated on server B. The 
"add" button is fine, but the "change" and the "delete" buttons are not. 
For example, the correct "change" button should point to 
*https://www.example.com/app/myapp/admin/main/modelb/1/change/?_to_field=id&_popup=1*,
 
but it actually points to 
*https://www.example.com/admin/main/modelb/1/change/?_to_field=id&_popup=1*, 
which does not exist. The problem is that the relative URL is stored in the 
"data-href-template" attribute of the  tag, like this

* id="change_id_modelb" 
> data-href-template="/admin/main/modelb/__fk__/change/?_to_field=id&_popup=1"
>  
> title="Change selected modelb">*
>

which is parsed by static/admin/js/admin/RelatedObjectLookups.js, which 
adds a "real" href attribute via JS, giving

* id="change_id_system" 
> data-href-template="/admin/main/modelb/__fk__/change/?_to_field=id&_popup=1"
>  
> title="Change selected modelb" 
> href="/admin/main/modelb/1/change/?_to_field=id&_popup=1"> src="/app/myapp/static/admin/img/icon-changelink.svg" alt="Change">*


The reverse proxy program, however, only translates whatever is in the HTML 
, and does nothing about this customized data field.

This is not necessarily a bug, as it only happens in special cases like 
mine. I am not sure what to do -- I can modify this RelatedObjectLookups.js 
and just add '/app/myapp' in front of every link it produces, which should 
work and fix this problem at this point. However, a more complete solution 
would be to overhaul this lookup js and put a real link there, which is 
quite some work to do. Should I write a new ticket to Django Project, or do 
you have better suggestions?

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/cf876c89-c3e7-414e-8290-1e050f80f7b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


STATIC FILES not working for admin site, projects and apps on DJANGO

2018-12-29 Thread abel otugeme
I really need help i have combed through stackover flow and this group but 
the solutions provided don't work for me.  i use a 32bit windows 7 OS and 
the latest version of 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/b9e5b171-5c2d-4233-9766-86343c34777e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


template location for django-registration framework

2018-12-29 Thread Yuval Bachrach
I have installed "django-registration:" and now follow "
https://django-registration.readthedocs.io/en/3.0/quickstart.html";

I have set URLs as explained (see below) but failed to tell django where to
find the templates.

What do I need to do to have django find the templates?


More details:

http://127.0.0.1:8000/accounts/register/

is resulted with an error:
TemplateDoesNotExist at /accounts/register/

django_registration/registration_form.html

Request Method: GET
Request URL: http://127.0.0.1:8000/accounts/register/
Django Version: 2.1.3
Exception Type: TemplateDoesNotExist
Exception Value:

django_registration/registration_form.html

Exception Location: C:\Program Files
(x86)\Python37-32\lib\site-packages\django\template\loader.py in
select_template, line 47
Python Executable: C:\Program Files (x86)\Python37-32\python.exe
Python Version: 3.7.1

I have tried to locate *registration_form.html* at
django_reistration/reister/templates at
"django_registration\registration\templates\registration" under my
project.
Also tried "django-registration\registration\templates\registration" and
several other locations but I keep getting the error message.

The problem could be the template location or  a missing setting,...

   - I added no app to the "INSTALLED_APPS" at setting.py
   - my template is:

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
# changed at tutor7
# 'DIRS': [],
'DIRS': [os.path.join(BASE_DIR, 'templates')],
# DIRS is a list of filesystem directories to check when loading
Django templates; it’s a search path
'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',
],
},
},
]



from django.conf.urls import include, url
urlpatterns = [
# Other URL patterns ...
url(r'^accounts/', include('django_registration.backends.activation.urls')),
url(r'^accounts/', include('django.contrib.auth.urls')),
# More URL patterns ...



-- 

Yuval B

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


Re: template location for django-registration framework

2018-12-29 Thread Zhe Li
Have you searched the internet before posting?

https://stackoverflow.com/questions/6127264/troubleshooting-templatedoesnotexist-at-accounts-login-django-auth-setup

You can either create your own pages or copy the whole templates under the 
django admin site 
-- site-packages/django/contrib/admin/templates/registration/

On Saturday, December 29, 2018 at 10:22:11 AM UTC-5, Yuval Bachrach wrote:
>
> I have installed "django-registration:" and now follow "
> https://django-registration.readthedocs.io/en/3.0/quickstart.html"; 
>
> I have set URLs as explained (see below) but failed to tell django where 
> to find the templates.
>
> What do I need to do to have django find the templates?
>
>
> More details:
>
> http://127.0.0.1:8000/accounts/register/
>
> is resulted with an error: 
> TemplateDoesNotExist at /accounts/register/
>
> django_registration/registration_form.html
>
> Request Method: GET
> Request URL: http://127.0.0.1:8000/accounts/register/
> Django Version: 2.1.3
> Exception Type: TemplateDoesNotExist
> Exception Value: 
>
> django_registration/registration_form.html
>
> Exception Location: C:\Program Files 
> (x86)\Python37-32\lib\site-packages\django\template\loader.py in 
> select_template, line 47
> Python Executable: C:\Program Files (x86)\Python37-32\python.exe
> Python Version: 3.7.1
>
> I have tried to locate *registration_form.html* at 
> django_reistration/reister/templates at 
> "django_registration\registration\templates\registration" under my 
> project.  
> Also tried "django-registration\registration\templates\registration" and 
> several other locations but I keep getting the error message. 
>
> The problem could be the template location or  a missing setting,...
>
>- I added no app to the "INSTALLED_APPS" at setting.py
>- my template is:
>
> TEMPLATES = [
> {
> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
> # changed at tutor7
> # 'DIRS': [],
> 'DIRS': [os.path.join(BASE_DIR, 'templates')],
> # DIRS is a list of filesystem directories to check when loading 
> Django templates; it’s a search path
> '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',
> ],
> },
> },
> ]
>
>
>
> from django.conf.urls import include, url
> urlpatterns = [
> # Other URL patterns ...
> url(r'^accounts/', 
> include('django_registration.backends.activation.urls')),
> url(r'^accounts/', include('django.contrib.auth.urls')),
> # More URL patterns ...
>
>
>
> -- 
>
> Yuval B
>
>

-- 
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/a0f6a2f7-455d-4cdc-985d-acc8a810daf4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: STATIC FILES not working for admin site, projects and apps on DJANGO

2018-12-29 Thread Kasper Laudrup

Hi Abel,

On 29/12/2018 08.07, abel otugeme wrote:
I really need help i have combed through stackover flow and this group 
but the solutions provided don't work for me.  i use a 32bit windows 7 
OS and the latest version of django




It would probably be easier for someone to help you if you tried to 
describe what your actual problem is.


Kind regards,

Kasper Laudrup

--
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/c8273be3-bc53-2103-f503-ae7668f01622%40stacktrace.dk.
For more options, visit https://groups.google.com/d/optout.


inserting data in django using forms

2018-12-29 Thread Saeed Pooladzadeh
Hello,

For inserting and editing data in a database should we use Django forms?

thanks 
Saeed

-- 
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/3b3f261f-5f4a-4ba5-be24-1b556ade3ddb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: inserting data in django using forms

2018-12-29 Thread Gear Crew
if you use class based view you can use Detailview, CreateView, DeleteView 
, UpdateView 
and call CRUD Django and I think is so easy from using Function based view 

On Saturday, 29 December 2018 23:26:36 UTC+2, Saeed Pooladzadeh wrote:
>
> Hello,
>
> For inserting and editing data in a database should we use Django forms?
>
> thanks 
> Saeed
>

-- 
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/b8f3e48e-c603-4698-a860-d2f861eb0bb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Itterate with Include Tag

2018-12-29 Thread Shazia Nusrat
Hi Guys,

I have a form created from foreignkey model. I have used "include" with
jinja for displaying my fields. But I don't know how to iterate through and
include tag.
%
Below is the code and I would appreciate if someone can help me to iterate
through following template code.

{% for field in form %}
{% include 'includes/form/form_fields.html' with form=field.myform %}
{% endfor %)
I can't get fields from the form. Please advise.
Looking forward to your feedback. :-)

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


Re: inserting data in django using forms

2018-12-29 Thread Mamadou Harouna Diallo
Its ORM object must make a CRUD( creat, insert, read, delete) in a
database. You can use forms or not in the back but its ORM mutable data.

Sorry my english is bea 😂😂😂

Le sam. 29 déc. 2018 à 21:27, Saeed Pooladzadeh  a
écrit :

> Hello,
>
> For inserting and editing data in a database should we use Django forms?
>
> thanks
> Saeed
>
> --
> 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/3b3f261f-5f4a-4ba5-be24-1b556ade3ddb%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/CAO73PDp0_S-q%2B-R0a6-j%2Bi-%3D8E3Kyv%2BBZxZ5sBn2Rb2G%3DCG6kw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


500 Internal Server Error!! - Issue in wsgi in django application migrating from python2.7 to python3.6

2018-12-29 Thread Sindhujit Ganguly


I am getting 500 Internal Server Error when I migrated my django app from 
python2.7 to python3.6. I have created a new virtualenv, and created all 
the apps individually. The virtualenv is defined in uwsgi.ini file

home = /home/netadc/.venvs1/netadc

I have installed all the packages using pip3.6. I am not sure what I am 
missing. Every config in uwsgi is same as python2.7 when it was working.I 
am using uwsgi 2.0.13. I have restarted nginx as well. Is there a separate 
uwsgi for python3 which I cannot locate? The socket permissions are also 
same as before. Please help.

The command to start wsgi is :- /home/netadc/.venvs1/netadc/bin/uwsgi --ini 
/home/netadc/apps/netadc/netadc/uwsgi/netadc_uwsgi.ini --enable-threads

In wsgi logs, i see :- --- no python application found, check your startup 
logs for errors --- [pid: 13634|app: -1|req: -1/3] x.x.x.x () {42 vars in 
1029 bytes} [Mon Dec 17 09:04:40 2018] GET /netadc/home => generated 21 
bytes in 0 msecs (HTTP/1.1 500)

The access logs in nginx show :- x.x.x.x - - [17/Dec/2018:09:05:43 -0700] 
"GET /netadc/home HTTP/1.1" 500 32

Nothing comes up in nginx error logs.

When I do manage.py shell, I see :- ImportError: bad magic number in 'lib': 
b'\x03\xf3\r\n'

I removed all the .pyc files, but then sometimes manage.py shell hangs up 
and sometimes it opens fine. But again after sometime, I will get the magic 
number error as above.

When I revert the virtualenv back to my previous virtualenv in the 
uwsgi.ini file which uses python2.7, I get some error logs on uwsgi.

home = /home/netadc/.venvs/netadc Log :- File "./ivpn/rest_appviewx.py", 
line 29 print('Server IP has NAT already. So no QIP update needed.', end=' 
') ^ SyntaxError: invalid syntax

-- 
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/bb716e96-b7f8-4fec-b51b-713a3edc427e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: STATIC FILES not working for admin site, projects and apps on DJANGO

2018-12-29 Thread abel otugeme
This is how a site looks when i open it up in my browser No CSS! i have
done the necessary settings for Django to find the static files

On Sat, Dec 29, 2018 at 5:14 PM Kasper Laudrup 
wrote:

> Hi Abel,
>
> On 29/12/2018 08.07, abel otugeme wrote:
> > I really need help i have combed through stackover flow and this group
> > but the solutions provided don't work for me.  i use a 32bit windows 7
> > OS and the latest version of django
> >
>
> It would probably be easier for someone to help you if you tried to
> describe what your actual problem is.
>
> Kind regards,
>
> Kasper Laudrup
>
> --
> 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/c8273be3-bc53-2103-f503-ae7668f01622%40stacktrace.dk
> .
> 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/CAMrS0S91GG0A%3D3Z263Q9nxLccStat-URs3NsW_pfqES_J5uU2Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: inserting data in django using forms

2018-12-29 Thread Saeed Pooladzadeh
Can you please give me an example?

On Sat, Dec 29, 2018, 4:53 PM Gear Crew  if you use class based view you can use Detailview, CreateView, DeleteView
> , UpdateView
> and call CRUD Django and I think is so easy from using Function based view
>
> On Saturday, 29 December 2018 23:26:36 UTC+2, Saeed Pooladzadeh wrote:
>>
>> Hello,
>>
>> For inserting and editing data in a database should we use Django forms?
>>
>> thanks
>> Saeed
>>
> --
> 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/b8f3e48e-c603-4698-a860-d2f861eb0bb2%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/CAKh%2BqayyJfFjDjeRUq192_tcA%2B6s84DsTPLCuii60WdtZuJ%3DBQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Building a framework

2018-12-29 Thread Muhammad Zuhair Askari

The very serious and important point this is which needs to be focused. 
Thanks alot Jani Tiainen :), I will try... 

On Saturday, December 29, 2018 at 4:23:19 PM UTC+5, Jani Tiainen wrote:
>
> Hi.
>
> Unfortunately your question is really too broad to answer but I'll give 
> something to grasp on.
>
> It all depends on features you want to build, time it takes to build those 
> features and time you do have available.
>
> You should split your planned tasks to about two week periods (longer 
> periods are harder to estimate). Also you need a plan what you do if your 
> estimates are wrong and you start fall behind.
>
> Also note that there are tasks like testing and documenting which you need 
> to allocate time. Also you might need to allocate time for research and 
> learning things.
>
> Muhammad Zuhair Askari > kirjoitti la 
> 29. jouluk. 2018 klo 5.05:
>
>> Yes, What if I move towards building such framework like Flask, I even 
>> want to make more simpler and having less features (just basic features) 
>> framework, will that be useful for learning web in a bit deeper and is it 
>> worthy for a final Year Project for an under-graduate level student? Or 
>> there is another choice that what If I just download or forked the source 
>> code of Django or Flask or other simple framework and first understand and 
>> then making changes in that framework and customize that. What about this 
>> idea Sir?  @jani Tiainen
>>
>> On Friday, December 28, 2018 at 7:52:11 PM UTC+5, Jani Tiainen wrote:
>>>
>>> Hi,
>>>
>>> If you consider that Django has been in development over 10 years now 
>>> and been developed by several individuals. So building a framework like 
>>> Django doesn't happen overnight.
>>>
>>> Flask is microframework, containing very minimal set of tools and 
>>> relying on external components. Building something like Flask could be 
>>> possible since you wouldn't need to deal with complex issues like ORM or 
>>> database supports.
>>>
>>> On Fri, Dec 28, 2018 at 4:27 PM Muhammad Zuhair Askari <
>>> mzuha...@gmail.com> wrote:
>>>
 Hi! I want  to develop a framework like Django, Flask etc. using python 
 as a final year project of my graduation. This may be very useful for 
 learning purpose. Can anybody tell me how much time will it take for a not 
 well experienced python developer? And is it a good Final Year Project?

 -- 
 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/4e7d6365-4658-4bfa-9257-5157a233fb53%40googlegroups.com
  
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>> -- 
>>> Jani Tiainen
>>>
>>> - Well planned is half done, and a half done has been sufficient 
>>> before...
>>>
>> -- 
>> 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/ed939186-b30b-43c2-b9d6-e2da85bde218%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/4bcf0cfb-f813-4059-9112-6cb97b17a1de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


how to insert or rewrite a text box value in a database

2018-12-29 Thread Saeed Pooladzadeh
Hi


.In this tutorial, there is a complete example of CRUD using function base 
and class base

https://rayed.com/posts/2018/05/django-crud-create-retrieve-update-delete/

but my question is if we want to insert a textbox value to the database 
what we should do.

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/42c764c1-94e3-4d44-8882-d73cfd6c6204%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: db_index=True not working, and indexes in class Meta yes

2018-12-29 Thread Gonzalo Amadio
Yes, exactly. Django doc tells they do the same. And they do, but if you do 
not specify db_index=False in field, both indexes are created.

Here is exaplanation 
: 
https://stackoverflow.com/questions/53966256/django-db-index-true-not-creating-index-but-class-meta-indexes-yes

El domingo, 30 de diciembre de 2018, 0:37:20 (UTC+11), Jason escribió:
>
> django automatically creates an index for foreign key columns, unless you 
> specify db_index=False for that field.
>
> what I suspect is happening here, you're telling django that it should 
> have two indices for that particular column covering identical areas of 
> responsibility.
>

-- 
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/53c6a572-b860-4195-bede-12af7085dea5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.