Add tutorial code to django repo

2024-06-27 Thread David Chapuis
Django in GitHub for the tutorial? Thanks, David -- 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

Re: Contract Full Stack Django Engineer

2024-06-27 Thread David Chapuis
where you can share your ad. Best, David Em quinta-feira, 27 de junho de 2024 às 04:41:07 UTC-3, Yeboah Dominic escreveu: > Okay can I get your mailing address? > > On Thu, 27 Jun 2024 at 00:28, 'Bernard Mallala' via Django users < > django...@googlegroups.com> wrote: > >

Re: E-comm live project

2024-03-20 Thread Abwao David
add +254719582987 Kind regards David Abwao On Wed, Mar 20, 2024 at 6:54 AM Amar tutorial wrote: > 6386805378 > > On Wed, 20 Mar 2024, 8:58 am André Lewis, wrote: > >> Ooh ooh. Add me too 18763198281 >> >> On Mon, 18 Mar 2024, 12:26 pm 1001_prabhjot Singh, < &

Re: How can I acess Multilinestring(dim=3)

2024-02-24 Thread David James Nwoyie
Increase the dim to 4 because of the Django of use 0 as the starting point On Sat, Feb 24, 2024, 8:48 PM Richard Mair wrote: > Hi i am using > > geom = models.MultiLineStringField( > dim=3, srid=EPSG_CODE, blank=True, null=True, spatial_index=True > ) # EPSG:3128=AustriaLambert > > > and my

Re: Exciting Opportunity: Join Our Django WhatsApp Bulk Messaging Project!

2024-02-24 Thread David James Nwoyie
Am interested in the +2349038924701 On Sun, Feb 18, 2024, 5:48 PM SURAJ TIWARI wrote: >  Join Our Django WhatsApp Bulk Messaging Project! > >  Hello everyone, > > Are you looking for an exciting opportunity to gain hands-on experience in > Django development? Do you want to work on a

Re: Exciting Opportunity: Join Our Django WhatsApp Bulk Messaging Project!

2024-02-18 Thread David K
Hi Suraj, Please count me in. I'd like to contribute and learn. Thanks On Sun, Feb 18, 2024, 8:48 AM SURAJ TIWARI wrote: >  Join Our Django WhatsApp Bulk Messaging Project! > >  Hello everyone, > > Are you looking for an exciting opportunity to gain hands-on experience in > Django

Re: Looking for collaborators for an online marketplace project with Python, Django, React.js and Next.js

2024-02-12 Thread David Emanuel Sandoval
Hello - Holaa! I would like to help. Me gustaría colaborar. I'm emasmach on github. Un saludo. See you. El lun, 12 feb 2024, 12:08, T Y escribió: > im in. pls add me in git. > > tommyyama2020 > > > On Sun, Feb 11, 2024 at 1:55 AM Jorge Bueno > wrote: > >> The project: >> >> I am working on

Re: Django Channels and multi-tenant will this be a world of hurt?

2024-01-27 Thread David Emanuel Sandoval
the correct schema. David Emanuel Sandoval <https://www.linkedin.com/in/david-emanuel-sandoval/> WEB DEVELOPER +549 3734 607102 <https://linkedin.com/in/david-emanuel-sandoval/> <https://github.com/emasmach/> El sáb, 27 ene 2024 a las 14:14, David Emanuel Sandoval (&

Re: Django Channels and multi-tenant will this be a world of hurt?

2024-01-27 Thread David Emanuel Sandoval
To identify the tenant i used a middleware that extract the tenant from the domain. El sáb, 27 ene 2024, 10:28, Nagaraja escribió: > Y cnt u use pusher instead of channels > > On Sat, 27 Jan, 2024, 4:40 pm 'Sebastián García' via Django users, < > django-users@googlegroups.com> wrote: > >> Hi,

Select Boxes and Database

2023-12-02 Thread David Merrick
Hi. I can put an item from the database into a select box ie Countries of the World. What I want to know is saying, having chosen New Zealand from the select box, how do I display all the cities of New Zealand in another select box. The database has two tables. First one is Countries. The second

Re: Writing migrations to wrong database entirely

2023-11-14 Thread David Crandell
, 2023 at 7:14:22 AM UTC-7 David Crandell wrote: > <https://stackoverflow.com/posts/77481255/timeline> > > Howdy, I have been working with Django for about three years now and have > developed a couple business grade apps which are deployed and doing great. > > The other day,

Writing migrations to wrong database entirely

2023-11-14 Thread David Crandell
Howdy, I have been working with Django for about three years now and have developed a couple business grade apps which are deployed and doing great. The other day, I created a new project with a new database, etc. I built out the initial

Re: How to monitor content updates or deletion in Django web applications

2023-10-04 Thread David Nugent
ib/contenttypes/> > I have used it a few times and Django admin site also uses it under the > hood. > > On Wed, Oct 4, 2023 at 4:58 AM David Nugent wrote: > >> The may not be enough context in your question but I imagine that the >> following link may take you to

Re: How to monitor content updates or deletion in Django web applications

2023-10-03 Thread David Nugent
The may not be enough context in your question but I imagine that the following link may take you to something that may work for you. https://docs.djangoproject.com/en/4.2/topics/signals/ On 4 October 2023 at 14:42:45, Ram (ram.mullap...@gmail.com) wrote: > Hi, > > We would like to add this

Re: pytest, asgiref, Selenium and database access? How to make them work?

2023-09-07 Thread David Nugent
install pytest-django use fixture @pytest.mark.db profit On 5 September 2023 at 08:15:10, Alfons Eberle (alfons.sig...@gmail.com) wrote: > Hey, has anyone gotten pytest to work with django-channels (or asgiref + > Daphne) and Selenium in general when database access is required? > > My fixtures

Re: Change data in DB before migrating

2023-09-03 Thread David Nugent
Yes, this is certainly possible. Migrations are just python scripts that follow a specific protocol/api that is detailed in the excellent django documentation. You can insert your own hand crafted migrations to handle many cases that can cater for a variety of use cases. i would suggest though

Error when trying to implement google Oauth sign in using react and django

2023-09-03 Thread david ekechukwu
I am using React and Django to implement an OAuth Google login, however whenever I send the request, I receive the access denied error. I am handling the request in the backend using the drf-Social-Oauth2 library. {"error":"access_denied","error_description":"Your credentials aren't

Re: CreateView for non default database

2023-07-27 Thread David Nugent
Database Router is the trick for this. Django calls this function to determine which database the transaction will use based on the type of operation requested, so you can separate which database is selected for reads, writes and migrations. Regards, David On Wed, Jul 26, 2023 at 1:11 PM

Re: Re:

2023-07-19 Thread David Emanuel Sandoval
work a lot to improve my skills in this field. David Emanuel Sandoval <https://www.linkedin.com/in/david-emanuel-sandoval/> WEB DEVELOPER +549 3734 607102 <https://linkedin.com/in/david-emanuel-sandoval/> <https://github.com/emasmach/> El mié, 19 jul 2023 a las 11:06, Vitor

Re: developing a data logger

2023-07-12 Thread David Nugent
support as well. HTH, David On Wed, Jul 12, 2023 at 8:23 PM o1bigtenor wrote: > On Wed, Jul 12, 2023 at 3:38 AM David Nugent wrote: > > > > It depends on what you want to do. Simply gathering data and scooping it > into a db does not require Django, which will probably not help muc

Re: developing a data logger

2023-07-12 Thread David Nugent
definitely in the right ball park. Regards, David On Wed, Jul 12, 2023 at 8:52 AM o1bigtenor wrote: > Greetings > > It seems to me that Django together with a database (I'm thinking of > using postgresql) > would make a good fit for rolling a datalogger for some sensors. > &

Re: Running migrations with multiple databases

2023-07-10 Thread David Nugent
Migrations are executed according to how your db routers is setup. See setting DATABASE_ROUTERS. Note that normally you would be replicating secondaries, so migrations are normally not applied on all bu the primary, so this is the default. Regards, David On Mon, Jul 10, 2023 at 10:26 PM

Re: Django Deployment.

2023-06-25 Thread David Nugent
honestly wouldn't advise going down that rabbit hole. Regards, David On Sat, Jun 24, 2023 at 11:37 PM Steve Liu wrote: > Hey > > Maybe you can use Docker for it? > > > > On Sat, Jun 24, 2023 at 6:44 PM Thomas Mutavi > wrote: > >> Hello team, >> >&

Re: Django rest framework resources

2023-06-10 Thread David Nugent
is that things are _mostly_ backwards compatible, so what is presented by those sites/articles/videos will most likely still work unless they are very old, but there may be better approaches available since they were published. HTH, David On Sun, Jun 11, 2023 at 8:28 AM Oladunjoye Olasubomi < olasubomi24

Re: Looking for Internship Position

2023-06-06 Thread david ekechukwu
Dear Sir, I am a skilled full-stack Python developer with expertise in Django framework. I have sent a LinkedIn connection request to express my interest in the Full-Stack Python Django Developer internship at your agency. I believe my skills and passion make me a strong fit for the position.

Re: how to convert to Django 3 or 4

2023-06-03 Thread David Nugent
nppe url is obsolete and removed in 4.x. You can use re_path, which is a kind of replacement but even then you will need to adjust the regex in many cases. The best approach is to understand what the url() is doing, and replicate the same using path(). Once you do, the conversions should be more

Re: how to convert to Django 3 or 4

2023-06-02 Thread David Nugent
same. HTH, David On Sat, Jun 3, 2023 at 7:21 AM john fabiani wrote: > Hi everyone, > > I am tasked with updating/upgrading a very old Django web site - I believe > it is 1.7. I need convert and need what is required. > Thanks in advance. > > > I need to convert the fo

Re: python manage.py commonds: AttributeError: 'PosixPath' object has no attribute 'startswith'

2023-05-14 Thread David Du
ere were other non default configurations of the > variable BASE_DIR. > > > Julius. > > On Wed, Apr 26, 2023 at 1:15 AM David Nugent wrote: > >> This error is being triggered by an outdated and badly behaved module >> that contains the run_cmdb_worker management

Re: Django Themes help

2023-05-02 Thread David Nugent
This is a styling issue (aka CSS). The best answer depends on the CSS framework (if any) you might be using. Or you can just apply: .text-center { text-align: center; } on the containing div. On Wed, May 3, 2023 at 12:19 AM William Nash (Bill) wrote: > I'm working on a small program that

Re: Serving static files in production

2023-04-27 Thread David Nugent
dia|static)/ { ... HTH, David On Thu, Apr 27, 2023 at 3:42 PM Brian Odhiambo wrote: > Thanks for your response @David. > Here is my nginx configuration.[image: > 1c9b64ec-c74f-4004-8b8d-9a6e7a3d8069.png] > Pointed it to staticfiles after running collectstatic files command. > >

Re: Serving static files in production

2023-04-26 Thread David Nugent
that the location blocks are defined in the wrong order or the directory pointing to the incorrect location. In any case, whitenoise is not a bad solution tbh, and very flexible besides. I would solve the above - which should work - before investigating that further. Regards, David On Thu, Apr 27

Re: python manage.py commonds: AttributeError: 'PosixPath' object has no attribute 'startswith'

2023-04-25 Thread David Nugent
bably fine. Regards, David On Mon, Apr 24, 2023 at 2:21 AM DL wrote: > Django 4.2 > Python 3.10.10 > > # python manage.py run_cmdb_worker > Traceback (most recent call last): > File "/usr/local/python/lib/python3.10/pkgutil.py", line 417, in > get_importer >

Re: Image uploaded to database but not displaying

2023-04-12 Thread David Nugent
dev static files config, except for MEDIA_URL and pointing to the file system location where they are actually being uploaded. HTH, David From: Michael Starr Reply: django-users@googlegroups.com Date: 12 April 2023 at 18:00:56 To: Django users Subject: Image uploaded to database

Re: Migration running in shell, but no change in DB

2023-04-01 Thread David Nugent
I would check in the django_migrations table to ensure that the migration has successfully been run. From: 'Martin Heitmann' via Django users Reply: django-users@googlegroups.com Date: 31 March 2023 at 19:46:02 To: Django users Subject: Migration running in shell, but no change in DB

Re: What makes the images deletion from the media folder?

2023-03-23 Thread David Nugent
Are you using Django in a docker container? If so, any changes to the filesystem are ephemeral and disappear when the container is recycled. Regards, David -- Original Message -- From "Ram" To django-users@googlegroups.com Date 3/24/2023 2:04:56 PM Subject What makes

Re: Django error while running

2023-03-21 Thread David Nugent
be nice if Django would output a more sensible error message for issues like this  Hmm, an idea for a useful PR right there. Seems to be common issue (since the very next message I read in this mail list is exactly the same thing). Regards, David "Chandresh . T" writes Recently I w

Re: Uncaught TypeError: styled_default is not a function

2023-03-15 Thread David Nugent
A Django mailing list is probably not a good place to ask this question - this is a JS issue and there are a plethora of more appropriate forums. But - why is Popper.js being loaded? Is it a hangover from using bootstrap? Don’t load both bootstrap (and associated scripts) with React+mui.

Re: Ordering of code

2023-03-03 Thread David Nugent
Both are related to the python language, nothing Django specific about them. This may help (not in explaining so much as demonstrating workarounds): https://stackoverflow.com/questions/4162456/forward-declaration-of-classes https://erdantic.drivendata.org/v0.4/forward-references/ Regards, /d

Re: "Django road map and resources"

2023-03-02 Thread David Nugent
I’ll second that - Udemy is a great resource and frequent run specials on courses. Also, don’t overlook Youtube where you can often find same/similar and good quality content available for free. Regards, David -- Original Message -- From "Sebastián Bevc Costa" To &qu

Re: Exceeded conections to DB (postgres and django-tenants)

2023-02-23 Thread David Emanuel Sandoval
I want to make a correction: I'm using django 3.2 El jue, 23 feb 2023 a las 16:11, David Emanuel Sandoval (< davidemanuelsando...@gmail.com>) escribió: > Hello everyone! > > I hope you can help me with a problem that I have from time to time (I > wasn't able to r

Exceeded conections to DB (postgres and django-tenants)

2023-02-23 Thread David Emanuel Sandoval
Hello everyone! I hope you can help me with a problem that I have from time to time (I wasn't able to replicate the error). The problem is that sometimes the connections to DB exceed the maximum number of allowed connections and I'm not sure why that happens. That causes the app to crash. I'm

Re: error problem

2023-02-20 Thread David Nugent
available via a google search on account registration and signup with Django. HTH, David On Tue, Feb 21, 2023 at 12:49 PM Tanjil Hossain wrote: > i am fatchig this error any one help me > > -- > You received this message because you are subscribed to the Google Groups

Re: Facing Issue with ODBC Driver 17 for SQL Server

2023-02-10 Thread David Nugent
Hi Sahan, "the target machine actively refused it” - in TCP parlance, that means that there’s nothing listening on that port, aka “connection refused”. The server you are trying to connect to isn’t there (or there is a firewall similar blocking the connection - but doubt it). IIRC by

Re: Admin validation activated just once after final call to save_model()

2023-01-18 Thread David Wallace
ormset > [b] https://django-admin-sortable2.readthedocs.io/en/latest/ > [c] > https://docs.djangoproject.com/en/4.1/topics/forms/formsets/#custom-formset-validation > [d] > https://docs.djangoproject.com/en/4.1/topics/db/transactions/#controlling-transactions-explicitly > > On Sun,

Admin validation activated just once after final call to save_model()

2023-01-15 Thread David Wallace
I am attempting to modify a page on my Django admin so that a trusted race administrator can manually rearrange a leader board of race results. The results go from 1 to N competitors in a race, and are mutually exclusive. Draw results are not allowed, so race administrators apply often complex

Re: any solutions guys on the ERROR admin E108 on list_display[2] attributes not callable

2023-01-10 Thread David Nugent
This is due to an error in your admin class (ProductAdmin in this case) The error message points directly where and what you need to check (spoiler: list_display item, 3rd field “stock”, which is incorrect). -- Original Message -- From "E Mollz" To "Django users" Date 1/10/2023

Re: Merge Project

2022-12-29 Thread David Nugent
"Anil Singh" writes: Hi Friends, I am merging tow one project to another project, also install app in settings.py, but i error : RuntimeError: Model class django.contrib.contenttypes.models.ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS. I

Re: Location identification with login

2022-12-25 Thread David Nugent
they typically log in from. This can trigger, e.g. email verification when a user logs in from an unexpected address. Blacklisting by source IP though, I would argue is the job more suited to a reverse proxy, tcpwrappers or a firewall like Linux iptables. Regards, David -- Original Message

Re: django internationalization

2022-11-28 Thread David Emanuel Sandoval
Hi, in my case I'm not sure if I'm understanding the problem well. Do you have a different url for every language? Are the urls also translated? In the docs i see they use a tag to get the correct url for the given language, but as I said, I'm not sure if that is what you want.

Re: Template inheritance not working

2022-11-18 Thread David Emanuel Sandoval
The base template contains the default content, and blocks with default contents in it. Then, in the child template, you can override those blocks. El vie, 18 nov 2022 17:54, Alec Delaney <96alecpatr...@gmail.com> escribió: > Hello. How are you? Can I see another example of template inheritance?

Re: Django-tenants-schema and django-tenant

2022-11-14 Thread David Emanuel Sandoval
I work on a project using django tenants, so i know it works on heroku. I just dont know how it was configured in the "dns" part. El lun, 14 nov 2022 11:43, Alejandro hurtado chacñama escribió: > 1:in your nginx configuration you should add something like: > *server_name *.mydomain.com

Re: Django multistep form

2022-11-07 Thread David Nugent
A quick reading of your code suggests that `form.customer_choices.choices` should be returned as an array with the state of each choice, so == here is probably not going to work. On Mon, Nov 7, 2022 at 8:58 PM Obodoma Uzondu Vincent wrote: > I have a multi-step form that is 3 steps but it has 4

Re: Multitenant App

2022-11-07 Thread David Emanuel Sandoval
Hi, I'm not sure what you mean by updating all templates. In my case, when I update a template, the changes are reflected in all tenants/clients. David Emanuel Sandoval <https://www.linkedin.com/in/david-emanuel-sandoval/> WEB DEVELOPER +549 3734 607102 <https://linkedin.com/in/davi

Re: Static files is not loading while deploying the project to AWS ec2

2022-11-05 Thread David Nugent
An article I wrote on this topic last year for fellow developers at work who were similarly confused. HTH! *Django - Statically Confusing* I started learning Django several years ago (and am still doing so today!), and for some time had a real sense of confusion as to how static files worked.

Re:

2022-09-27 Thread David Nwaekwu
09136882184 my number On Mon, Sep 26, 2022 at 1:53 PM Abdulfarid Olakunle wrote: > Hello fellow developers, I will be creating a WhatsApp group chat later in > the day, So I will like my fellow Python Django Developers to join the > group. It will be much easier to discuss there and I will

Bug with Watchman on Windows

2022-08-31 Thread David V
further steps I should take to make sure that watchman works out of the box like it is supposed to. Thanks, David V. -- 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, sen

Re: Looking for experienced Django backend engineer

2022-07-03 Thread David Oluwafemi
I an experienced Django developer with 2.5 years of experience. You can reach out to my email - davidoluwafemi...@gmail.com. I am available full time. On Sun, Jul 3, 2022, 3:24 AM Madhusudhan Reddy wrote: > Hi Tony, > > Good to hear from you and you idea is great, > I have an experience of 2+

Re: Model Design

2022-05-05 Thread 'David Turner' via Django users
We receive the data every two weeks and then use django-import-export to import the data into our database. There is no mention of the account manager in these as this is something on our side. Am I missing the point in that by having the foreign key to the account manager this would impact on

Re: 'ascii' codec can't encode character

2022-04-29 Thread David Crandell
You'd actually want to handle UNICODE strings, not ASCII. https://docs.djangoproject.com/en/4.0/ref/unicode/ On Thursday, April 28, 2022 at 7:02:49 PM UTC-5 Thiago Luiz Parolin wrote: > Hi, > i have a model with 2 charfields for givenname, surname: > >nome = models.CharField( >

Re: Including URLconf

2022-03-07 Thread David Crandell
That's definitely your problem. Include the app under INSTALLED_APPS - put "app_name.apps.AppNameConfig" with app_name being the name of your app. On Monday, March 7, 2022 at 11:35:40 AM UTC-6 alec...@gmail.com wrote: > this is the installed apps in settings.py I haven't touched it. i only did

Re: Including URLconf

2022-03-07 Thread David Crandell
Do you have the app imported in the settings.py? Also try using the "app_name" var in each of your urls.py files. On Sunday, March 6, 2022 at 10:29:23 PM UTC-6 alec...@gmail.com wrote: > > if i try to migrate, this error pops up as well > On Sunday, March 6, 2022 at 6:24:44 PM UTC-6 Alec

Re: How to add object to users unique list?

2022-03-01 Thread David Crandell
Hello. You need a corresponding URL for your link that's why you're getting reverse error: path('add/anime///', views.MYVIEW, name='url-to-my-view'> and then return redirect to your success_url after your enter the data, not return render. On Monday, February 28, 2022 at 12:00:19 PM UTC-6

Re: get country from IP_addres.

2021-12-16 Thread Agoua David
Hi I think you should use an API to fetch the country and some other information about you users Many site provide a way to get the country of an IP address through an api Le jeu. 16 déc. 2021 à 02:09, Amor Zamora a écrit : > Can you help me? > I need to obtain the country of where the users

Re: How to import UGETTEXT_LAZY ON DJANGO 4.0

2021-12-09 Thread David Nugent
Simply change it to gettext_lazy. You don't need the deprecated functions, they were for python 2. Regards, David On Fri, Dec 10, 2021 at 3:43 PM wrote: > It seems Django has removed ‘ugettext_lazy`(from django.utils.translation > import ugettext_lazy as _) from Django version 4.0.x &

Re: How to get a variable from an ajax request and use it in another application in Django?

2021-12-04 Thread David Nugent
There's a little more to handling session data than what you have there (unless code is missing?). IIRC you need to set `session.modified = True` in order to persist the data. Where are you serialising the session data? db, redis .. ? Regards, David On Fri, Dec 3, 2021 at 11:00 PM kayhan

Re: gettext vs ugettext_lazy

2021-12-03 Thread David Nugent
Correction, Python 2.x support On Fri, Dec 3, 2021 at 8:12 PM David Nugent wrote: > Don't use ugettext*, they are deprecated and no longer exist in 3.x. m > They were for Django 2.x support. > > On Fri, Dec 3, 2021 at 5:54 PM wrote: > >> Hello >> >> Would like

Re: gettext vs ugettext_lazy

2021-12-03 Thread David Nugent
Don't use ugettext*, they are deprecated and no longer exist in 3.x. m They were for Django 2.x support. On Fri, Dec 3, 2021 at 5:54 PM wrote: > Hello > > Would like to know, what are the difference between gettext and > ugettext_lazy? > > When to use each of them? > > -- > You received this

Re: return or not from super().method(*args, **kwargs)

2021-11-30 Thread David Nugent
so do you in effect, so all good. return clearly marks the end of block execution. Regards, David -- 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 d

Re: How to get a variable from an ajax request and use it in another application in Django?

2021-11-30 Thread David Nugent
). Regards, David On Wed, Dec 1, 2021 at 6:04 AM kayhan wrote: > Sorry I did not ask the question well. > Question: > How to first send some data with an Ajax request to Django view and then > with a post request, send the form information to the same view and use the > data sent

Re: How to get a variable from an ajax request and use it in another application in Django?

2021-11-29 Thread David Nugent
A little more context would help, "use it in another application" is a little vague. The backend the API request and can pretty much do anything you need in the corresponding view at that point but should endeavour to return an appropriate response ASAP. On Tue, Nov 30, 2021 at 12:35 AM kayhan

Re: Pagination on different cards reside on the same template

2021-11-25 Thread David Nugent
Hi Eurgene, I would implement this in Javascript (or htmx). Some good examples are only a google search away. Regards, David On Fri, Nov 26, 2021 at 6:41 AM Eugene TUYIZERE wrote: > Dear Team, > > I have 4 cards on a single html page. I want to display data on each one > but si

Re: Multiple Templates in single list view

2021-11-21 Thread David Nugent
with all cases with conditional blocks where appropriate. Regards, David -- 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...@google

Re: Multiple Templates in single list view

2021-11-21 Thread David Nugent
the associated path in urls.py. This is typically a better pattern and very similar to what Dango admin does when a filter is enabled. I would also avoid the word `Manager` in a CBV, since `Manager` has a special meaning in Django. Regards, David -- You received this message because you are subscrib

Re: costum user in Django 3.2

2021-11-10 Thread David Nugent
On Tue, Nov 9, 2021 at 10:15 PM DJANGO DEVELOPER wrote: > have you added AUTH_USER_MODEL = 'my_app.custommodel' in your settings.py? > And note the lower case here as pointed out. App names are always handled as lowercase internally in Django. On Monday, November 8, 2021 at 10:50:14 PM UTC+5

Re: django.db.utils.OperationalError: no such table abc

2021-10-24 Thread David Nugent
you may run into issues), you can also reset or drop django_migrations table, remove migrations for apps with missing migration files, run makemigrations to re-create them (without any history) then migrate --fake to re-create and re-populate the django_migrations table which will not affect existing tables.

Re: django admin

2021-10-10 Thread David Nugent
STATICFILES_DIRS. In the case of admin assets, these should always render except in the first case, so after checking on these settings check the traceback in the console to help triage the cause. Regards, David -- You received this message because you are subscribed to the Google Groups "Django

Re: When you app depends on a custom user model

2021-10-10 Thread David Nugent
Why not just edit the migration file directly and substitute 'my_custom..' for settings.AUTH_USER_MODEL? There should be no problem in doing that. Regards, David On Sun, Oct 10, 2021 at 3:02 AM bnmng wrote: > Django "strongly recommends" you create custom user, and in your a

Re: [DJANGO-TUTORIAL]

2021-10-08 Thread David Nugent
visual representation and has a strong following in scientific applications and is a good investment of your time to learn. Regards, David On Sat, Oct 9, 2021 at 1:17 AM Chakresh Singh < chakresh.si...@alumni.iitgn.ac.in> wrote: > Dear All, > I am beginning my first task on Django. I c

Re: Strange ValueError in Safari on iOS

2021-10-01 Thread David Nugent
, David On Sat, Oct 2, 2021 at 10:47 AM Mike Dewhirst wrote: > In the error message below that "icon-yes.svg" is named in > django/contrib/admin/static/admin/css/base.css > > ul.messagelist li { > display: block; > font-weight: 400; > font-size: 13px;

Re: INPUT TEXT in grid

2021-09-28 Thread David Nugent
roject.com/en/3.2/ref/forms/api/> after using proper form validation, and in this case you should probably be using a formset <https://docs.djangoproject.com/en/3.2/topics/forms/formsets/> instead of manually generating a multiple record input form. HTH, David On Wed, Sep 29, 2021 at

Re: need help integrating SSL with react/django web app

2021-09-20 Thread David Nugent
icult, right? Regards, David -- 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 o

Re: Idea

2021-09-20 Thread David Nugent
languages when 1 will do? node backend and js front end, one language. (not that I think this is a Good Thing :-)) TBH I don't consider learning multiple programming languages a particularly difficult thing, and one might argue that there are significant benefits in doing so. Regards, Da

Re: 'str' object is not callable error appears from Django Message Framework

2021-09-20 Thread David Nugent
Hi Salima, Stack trace? Always the first call for triage on python exceptions. Also (and unrelated to your issue) google "django messages bootstrap" and check on how to avoid the {% if message.tags == .. %} horror show and make your templates much more readable/easily maintained. On Mon, Sep

Re: View that displays my ManyToManyField('self'...) relations in a with levels

2021-08-19 Thread David Crandell
I would create two dictionaries, one for subassembly and one for component. then in your view, loop through the first group, pulling your data from a master dataset: assem = Assembly.objects.all() sa = assem.subassembly.all() comp = assem.component.all() send 'sa' and 'comp' to your template

Re: Error - module 'django.db.models' has no attribute 'FieldDoesNotExist' when adding FK relationship object

2021-08-11 Thread David Crandell
Try adding related_name='+' to your FK definition. class ReleaseImageGallery(BaseImageGallery): release = models.ForeignKey(Release, related_name='+', on_delete =models.CASCADE) class Meta: verbose_name = "release image gallery" verbose_name_plural = "release image galleries" On Friday, August

Re: Django Discord

2021-08-11 Thread David Crandell
Discord is its own API, programmable with Python or nodejs. Django is a python-based web application framework. The two aren't related except both are programmable with Python. On Tuesday, August 10, 2021 at 2:34:59 PM UTC-5 Lloyd wrote: > Hi everyone, > > Where can I find Django on Discord? >

Re: help me

2021-07-28 Thread David Crandell
Try deploying to a PaaS platform like Heroku or DigitalOceans Apps service. They can be very cost effective and are an excellent way to host a Django app. On Tuesday, July 27, 2021 at 11:26:13 AM UTC-5 kossit...@gmail.com wrote: > > I need a video who explains how to host a site on ionos > --

specify querysets in forms

2021-07-20 Thread David Crandell
Hello again. I know I'm posting in here all the time. I am trying to get specific querysets in my forms based on the id in the kwargs but it says there is a keyerror with 'id'. It's the same kwargs.get('id') I reference whenever I do other stuff. Not sure why it doesn't like it this time. Any

attribute has no file associated with it

2021-07-19 Thread David Crandell
This error keeps appearing when I try to update forms with image fields. When I try to upload images, the field containing the image says "[field] attribute has no file associated with it" I'm using model forms and generic update views. I don't know how to make the attribute have the file

Re: Credentials fail from custom Auth backend

2021-07-05 Thread David Crandell
is_active or is_active is None def get_user(self, user_id): try: return Emp.objects.get(pk=user_id) except Emp.DoesNotExist: return None def has_perm(self, perm, obj=None): return True def has_module_perms(self, app_label): return True On Monday, July 5, 2021 at 12:09:17 PM UTC-5 David Crandell

Re: Credentials fail from custom Auth backend

2021-07-05 Thread David Crandell
This is the message I get when I try to login "Please enter a correct email and password. Note that both fields may be case-sensitive." I've changed my code a little in an effort to try to remedy my situation. I'm really stuck on this. From what I can tell, it's passing the values to the

Re: Credentials fail from custom Auth backend

2021-07-04 Thread David Crandell
There is no error. It just says invalid login. I get the login template and it rejects my credentials. David L. Crandell 469-585-5009 g uitard...@outlook.com guitardave8...@gmail.com da...@onholdwizard.com On Sun, Jul 4, 2021 at 9:15 PM ANi wrote: > What does the error message say? > g

Re: Email Form with attachments

2021-07-04 Thread David Crandell
Attachments need to be written to mail headers using MIME. This article gives a good breakdown https://stackoverflow.com/questions/1633109/creating-a-mime-email-template-with-images-to-send-with-python-django On Sunday, July 4, 2021 at 10:30:10 AM UTC-5 sebasti...@gmail.com wrote: > Hello, >

Credentials fail from custom Auth backend

2021-07-03 Thread David Crandell
Hello, I am using a custom auth backend and everything displays properly, except I cannot login with the credentials in my model. I have spent 5 hours on this and cannot figure it out. Please help. views.py class MyLogin(LoginView): template_name = 'employees/login.html' form_class = LoginForm

Re: Manager.raw() in a class method

2021-06-27 Thread David Nugent
Not actually sure what the issue is here, but I'm a devotee of avoiding raw sql at any stage. :-) If your query is really this simple, you certainly don't need a raw query to achieve it, nor a SQL proc to handle the sub-query that results from it. Either way, bear in mind that all that is

Re: Django 3.1 Makemigrations fails with FilePathField but succeeds with CharField

2021-06-27 Thread David Nugent
ions Django can serialize "any Django field". Should it > serialize FilePathField ? > [1] > https://docs.djangoproject.com/en/3.1/topics/migrations/#migration-serializing > > Yeah it's not the field at fault, it is the path= initialiser :-) > 3. How to work around this w

Re: register_converter doesn't work with ASGI

2021-06-27 Thread David Nugent
for this), and maybe add a signal on the relevant model to reload if it changes. HTH, David On Mon, Jun 21, 2021 at 5:22 PM Konstantin Kuchkov < konstantin.kuch...@gmail.com> wrote: > Thanks for the explanation! > > To get it working, I will replace my model converters with bas

Re: Django relationships

2021-06-25 Thread David Crandell
the way I manage my inventory system is keep all devices in one table and flag assigned or unassigned like you're trying to do. Each is then assigned to a locationID. On Thursday, June 24, 2021 at 4:24:22 PM UTC-5 murad...@gmail.com wrote: > Hi Django developers, > i am new in Python, > > i

Re: Django relationships

2021-06-25 Thread David Crandell
You'll have to define "in_use" as a models.BooleanField() I would have base class Devices and have Stock and Assign inherit from those On Thursday, June 24, 2021 at 4:24:22 PM UTC-5 murad...@gmail.com wrote: > Hi Django developers, > i am new in Python, > > i want to develop a simple app stock

Related records on same page with DetailView

2021-06-23 Thread David Crandell
Hello, I just don't stop having problems LOL. All I want to do is display related Subcats on the detail page under the Category detail. Seems like the exact same thing as the Books/Publisher demo but I just can't get it to work. It keeps saying my field doesn't exist, or it pulls all the

  1   2   3   4   5   6   7   8   9   10   >