Not sure if this is bug or not

2021-03-07 Thread vincent
Hi Guys, I came here for a question.

Few days ago, I made some app(i.e. proxy_polls) and happened to put proxy 
models(i.e. ProxyQuestion, ProxyChoice) into *admin.py* (which is not 
adequate place), and I didn't make *models.py*.

After running 'makemigrations' and 'migrate' commands, I realized there is 
no permissions with proxy models. With admin user, I can use proxy models 
on admin page, but staff users can't access to proxy models because I can't 
set permissions.

I know this ticket  fixed 
issue about proxy model's permission, but similar issue has happened.

After some attempts, I was able to find a solution. Just make empty 
'models.py' on proxy app and run 'migrate'. Django prints out "No 
migrations to apply." but after that, permission has been created.

If there are some messages like "You don't have models.py!" or "No 
migrations to apply, but made some missed permissions.", I think It is 
helpful.


For those who are curious about how to reproduce,

   1. django-admin startproject mysite
   2. cd mysite
   3. startapp polls
   4. (Make Question, Choice models on polls/models.py, set INSTALLED_APPS, 
   register models on admin site)
   5. makemigrations
   6. startapp proxy_polls
   7. (Make ProxyQuestion, ProxyChoice models on proxy_polls/admin.py, 
   remove proxy_polls/models.py, set INSTALLED_APPS, register proxy models on 
   admin site)
   8. makemigrations -> For now, there are no permissions about 
   'ProxyQuestion' and 'ProxyChoice'
   9. (Create empty models.py)
   10. migrate (No migrations to apply) -> now, there are permissions.

I've done this on Django 4.0-dev with python 3.10

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d5ab7a52-7f38-440b-a0fd-b56300db4d1en%40googlegroups.com.


Re: installing Django in python3

2021-03-07 Thread Septo Suharyanto
maybe your desktop o'clock must be revised

2021-03-07 0:29 GMT+07.00, Pavel Lopez :
> When installing Django in python3 I have the following error
> ValueError: ZIP does not support timestamps before 1980
> someone knows how i can solve 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2B-gHTE0HE8ZCo4aGgB%2BOQdi-n4Kd_ovjPM59zEArhuErUc5ww%40mail.gmail.com.
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHrViS52Dwgf0wkEwP5uf3HW65eef3GNwLuXEdUzCmvQiUuLQA%40mail.gmail.com.


Re: Api's for another projects.

2021-03-07 Thread Ryan Nowakowski
On Fri, Mar 05, 2021 at 04:09:27AM -0800, Sheldon Le Cooper wrote:
> I have requirement of Django Api's.
> 
> Brief about the requirement:
> 
> I have 2 projects (A and B), I did develop the API'S for Project A. The 
> Project A has been deployed in CentOs with NGNIX server.  Now I wanna use 
> the Project A Api's in Project B.
> 
> Kindly suggest me how to achieve this requirement.
> Kindly suggest me any blogs or videos.
> 
> Note: Just  I wanna give Project A API"S Urls to project B.

This might be another case of "Django is just Python".  You probably
want to use a Python package like requests[1] to access the API from
project A in the views.py from project B.

[1] https://requests.readthedocs.io/en/master/

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20210307190621.GF15054%40fattuba.com.


Re: Problem with adding image files to my object.

2021-03-07 Thread Ryan Nowakowski
On Thu, Mar 04, 2021 at 05:16:55AM -0800, N!KH!L wrote:
> Hello everyone!
> I am trying to convert multiple audio files to image files. 
> After data processing when i try to add o/p(image) using 
> below code,
> *I am getting an error "'list' object has no attribute '_committed'" in my 
> browser*
> 

Can you please reply with the full traceback?  It's hard to help debug
with just the error message.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20210307191328.GG15054%40fattuba.com.


Re: installing Django in python3

2021-03-07 Thread Kasper Laudrup

On 06/03/2021 18.29, Pavel Lopez wrote:

When installing Django in python3 I have the following error
ValueError: ZIP does not support timestamps before 1980
someone knows how i can solve this



What do you man by "installing Django in python3"? That doesn't make 
much sense.


If you want some help, try to provide relevant information so people are 
actually able to help you.


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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7833ca4e-b4d5-6ceb-2a97-27abbf744b69%40stacktrace.dk.


Re: can we integrate html views that look far better then what is available with django

2021-03-07 Thread Ryan Nowakowski
Hey Sridhar,

Since you mentioned you're a "starter", I'm also going to assume you're
generally new to web programming.  I had similar questions back when I
started.  Django is really good at generating HTML but it's very
un-opinionated about what kind of HTML it generates.  You have total
control over what kind of HTML is generates.  For example:

   * HTML is usually styled using CSS.  You can include any kind of CSS
 you want!
   * HTML can include images using the  tag or background images
 using CSS.  You get to decide how many images you use and how to
 display them.
   * HTML can include links to and snippets of JavaScript that get run
 by the browser.  You decide if you want to include JavaScript and
 what that JavaScript should do.

Whew!  That's a lot of flexibility but also a lot of decisions for you
to make.  Luckily there are some opinionated HTML/CSS frameworks that make
some or all of those decisions for you.  Examples include:

   * https://getbootstrap.com/
   * https://get.foundation/

...or even more opinionated (sometimes these are called "themes"):

   * https://coreui.io (for dashboards)
   * (I did a quick web search for a "stackoverflow Q&A theme but couldn't find 
one)

You can use any of these as your base template[1] in Django.  Hope this
helps!

- Ryan

[1] 
https://docs.djangoproject.com/en/3.1/ref/templates/language/#template-inheritance


On Sat, Mar 06, 2021 at 12:55:25PM +0530, sridhar vumma wrote:
> Does using bootstrap improve the view of each page,
> Thanks & Regards,
> Sridhar.V
> +91-9591729335
> 
> 
> On Fri, Feb 19, 2021 at 12:21 PM sridhar vumma 
> wrote:
> 
> > The look and feel with typical example flows possible for html were not
> > looking similar to websites like stackoverflow.com so i had a doubt if
> > they all look very image free. I am a starter with Django.
> >
> > Thanks & Regards,
> > Sridhar.V
> > +91-9591729335
> >
> >
> > On Thu, Feb 18, 2021 at 8:07 PM Andréas Kühne 
> > wrote:
> >
> >> Hi,
> >>
> >> This is a very strange question? You can create anything you want with
> >> Django. For example Instagram and Youtube are built with Django. The
> >> framework allows for any design that you really want yourself - you just
> >> need to design the HTML the way you want - I have personally used Django
> >> for many different projects and they all look different. There is no
> >> default layout for Django - so I think I don't really understand your
> >> question :)
> >>
> >> Regards,
> >>
> >> Andréas
> >>
> >>
> >> Den tors 18 feb. 2021 kl 14:43 skrev sridhar vumma  >> >:
> >>
> >>> we see better html views with websites like stackoverflow.com can we
> >>> integrate such high end html websites along with django is that possible
> >>>
> >>> --
> >>> 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 view this discussion on the web visit
> >>> https://groups.google.com/d/msgid/django-users/e771045b-907f-479a-80c0-dd5f0079593cn%40googlegroups.com
> >>> 
> >>> .
> >>>
> >> --
> >> You received this message because you are subscribed to a topic in the
> >> Google Groups "Django users" group.
> >> To unsubscribe from this topic, visit
> >> https://groups.google.com/d/topic/django-users/lRQXOzu-qps/unsubscribe.
> >> To unsubscribe from this group and all its topics, send an email to
> >> django-users+unsubscr...@googlegroups.com.
> >> To view this discussion on the web visit
> >> https://groups.google.com/d/msgid/django-users/CAK4qSCekgAb3CAW4sKF3r8wcujUOmtA9xtnMSqY%2B%3DLZzT9Gw%3DA%40mail.gmail.com
> >> 
> >> .
> >>
> >
> 
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CANoZYUoZN-Y-xH2_J6NWe3yB2XgOzROhOqYFgNL%2B3G_eZZvkVg%40mail.gmail.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20210307195810.GH15054%40fattuba.com.


Re: login and signup form in one view

2021-03-07 Thread Ryan Nowakowski


On Fri, Mar 05, 2021 at 08:51:54AM -0800, uma shankar wrote:
> I want to connect my Html input  tags with fields created in models .py 
> using the name attribute of each input tag
> 
> def user_login(request): 
> if request.method=='POST':
> if request.POST.get('submit') == 'checkform1':
> user_form = SignupForm(data = request.POST) # i want this to 
> connect with html input tags using the name attribute but they are 
> overlapping each other
> 
> return render(request,'first_app/Login.html')

I think you might be looking for Form.prefix:

https://docs.djangoproject.com/en/3.1/ref/forms/api/#prefixes-for-forms

> On Friday, 5 March 2021 at 21:34:02 UTC+5:30 Kasper Laudrup wrote:
> 
> > On 05/03/2021 16.39, Eugene TUYIZERE wrote:
> > > Then, what is the problem
> > > 
> >
> > I have no idea. Doesn't seem like there is any.
> >
> > I guess Uma just wanted to share what he's currently working with for 
> > some reason. Would be nice if he shared it if he's come up with some 
> > clever solution though.
> >
> > 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/ed93ac8e-198a-4366-989b-4fb94e23c312n%40googlegroups.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20210307200405.GI15054%40fattuba.com.


Re: Django vs Spring decision

2021-03-07 Thread Mottaz Hegaze
Use Django , its really much faster and easier to develop a product using
it.

On Sun, 7 Mar 2021, 4:11 am makhan Kumbhkar, 
wrote:

> Django is Best framework for upcoming time
>
> On Sunday, March 7, 2021 at 12:38:04 AM UTC+5:30 Jan-Marten de Jong wrote:
>
>> Derek and Laya,
>> Thank you for the feedback.  Best regards, Jan-Marten
>>
>> On Tuesday, 2 March 2021 at 13:41:43 UTC Derek wrote:
>>
>>> You''ll probably not get a unbiased opinion. Devs who work with Java as
>>> their primary language are going to pick Spring; and the opposite in the
>>> case of Python.
>>>
>>> If you already have much Java experience and don't want to start
>>> learning Python, then rather go on with Spring.
>>>
>>> Some comments over at Reddit:
>>> https://www.reddit.com/r/django/comments/d8dbx3/django_vs_spring_for_backend_development/
>>>
>>> P.S. Python is not an "upcoming" language - its been around longer than
>>> Java (
>>> https://en.wikipedia.org/wiki/Timeline_of_programming_languages#1990s)
>>> and has a substantial and well-developed ecosystem. Its bigger use is
>>> (probably) in data science and the wider science community.  If you're
>>> planning to develop "pure" enterprise business systems, you may be better
>>> off staying with Java.
>>>
>>>
>>> On Tuesday, 2 March 2021 at 02:16:50 UTC+2 Jan-Marten de Jong wrote:
>>>
 Dear Django users,

 I am in the process of deciding the architecture of a new Web
 application and I am considering Django or Spring.

 Would appreciate some feedback on why Django would be a better choice
 than the Spring Framework. I had quite some experience with JAVA but at the
 Universities they all start with Phyton nowadays so that seems to be an
 upcoing language and Django seems to be one of the most popular Frameworks
 for Phython.

 Looking forward to your support in making theis very important
 decision.

 Best regards, Jan Marten

 --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c105c990-c344-4216-84c5-c72c0b6045d5n%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHV4E-cW%3D5bZPj-hukpp1QBpf%2Bh5FYFdq_vUM0RD0vqnGy_utA%40mail.gmail.com.