Re: Book

2024-02-08 Thread Ruby
You are getting this because the database needs to have a value for
existing row(s), you can set default value or make the new field nullable
Either of these would work for you

Transactions(models.Model):
income = models.IntegerField(null=True, blank=True)
expense = models.IntegerField(null=True, blank=True)


Or


Transactions(models.Model):
income = models.IntegerField(default=0)
expense = models.IntegerField(default=0)

On Thu, Feb 8, 2024, 18:29 Janet Anastacia 
wrote:

> RE: DJANGO MODELS
> i have created an application called expense in django which has two
> fields in the models.py file which looks like class
> Transactions(models.Model):
> income = models.IntegerField(null=False, blank=False)
> expense = models.IntegerField(null=False, blank=False)
>
> I want my application to allow users to enter their expense and income
> themselves and these fields must be provided, it should not be empty. But
> when i run the command python manage.py makemigrations i get the this: It
> is impossible to add a non-nullable field 'expense' to transactions without
> specifying a default. This is because the database needs something to
> populate existing rows.
> Please select a fix: 1) Provide a one-off default now (will be set on all
> existing rows with a null value for this column) 2) Quit and manually
> define a default value in models.py. Select an option: Please select a
> valid option: Please select a valid option:
> i have chosen option 2 but still got the same prompt. how do solve this.
>
>
> On Sat, Feb 3, 2024 at 9:00 PM Kevin Tuo  wrote:
>
>> Good idea, Thanks!
>>
>> Envoyé à partir de Outlook pour Android 
>> --
>> *From:* django-users@googlegroups.com  on
>> behalf of Obam Olohu 
>> *Sent:* Saturday, February 3, 2024 4:15:02 PM
>> *To:* django-users@googlegroups.com 
>> *Subject:* Re: Book
>>
>> why don't you learn directly from a tutor?
>>
>>
>> On Thu, Feb 1, 2024 at 3:14 AM Kevin Tuo  wrote:
>>
>> Hello, Please can I get a book for building a portfolio website with
>> django?
>>
>>
>> Envoyé à partir de Outlook pour Android 
>>
>> --
>> 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/AS4PR09MB55764DA8881C3AB572B7468AFA7C2%40AS4PR09MB5576.eurprd09.prod.outlook.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/CAMc8uwNeDWk8QRicjFHg_Ph6%3DrN7ARRgGxAQBzxVM7ASFupL9g%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/VI1PR07MB511726EE0F530FF06C424722FA412%40VI1PR07MB5117.eurprd07.prod.outlook.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/CAA_zVTGp-HouU4Fe4KVWyTuzGTN_C%2BOXPfiDGg6AKxHHuYMgcw%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/CAPUD46tc5XjYP2VAVM0n3W%3Dx0ch1vKWCirbEmrMiaqV-4simAA%40mail.gmail.com.


Re: Django 5.0

2023-12-14 Thread Ruby
Consider reading the release notes


On Wed, Dec 13, 2023 at 6:18 PM Pete Doherty  wrote:

> Not yet, but database generated model fields
> 
> look pretty compelling!
> On Wednesday, December 13, 2023 at 9:15:21 AM UTC-5 attah paul wrote:
>
>> any review on the Django from you guys
>
> --
> 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/3317960d-b6d8-4336-9dd6-b07b129e0e10n%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/CAPUD46sJFoSwAbh1DVLRoGekmTbrmcjTyo2X_TkGJg0012tWjw%40mail.gmail.com.


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

2023-10-04 Thread Ruby
Hi there,
I don't know if there's a library for that, but I believe you can build
what you need using the built-in Django Content-Type

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 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 feature in our Web application and capture the
>> following events in log files:
>>
>> 1. If any image is deleted by any reason
>> 2. Any content is deleted by any reason
>>
>> Does Django have any libraries or functions to achieve this?
>>
>> Best regards,
>> ~Ram
>>
>>
>> --
>> 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%2BOi5F3GDxbL_3C20ygwE9yumUdLxDgZJRdLEuM9Wdm%2BeTyfEA%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/CAE5VhgUYV_r5yA%3DSn3Q1Cyie8mG71W6w6E1N%3D6wcBdVSoLvQOQ%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/CAPUD46vdk9bV%3DjC6OZa_DMx8feBwWcdUJ23WhjE9O-0LfZQeDw%40mail.gmail.com.


Re: UpdateView and DeleteView

2023-08-26 Thread Ruby
I'm glad it worked out,
Consider using LoginRequiredMixin to ensure that current user is
authenticated before accessing the view.


On Sat, Aug 26, 2023, 16:23 'Simon Connah' via Django users <
django-users@googlegroups.com> wrote:

> Thank you! That is very helpful.
>
> --- Original Message ---
> On Saturday, August 26th, 2023 at 14:07, Ruby 
> wrote:
>
> You can simply set a test case using the built-in user passes test (
> https://docs.djangoproject.com/en/4.2/topics/auth/default/#django.contrib.auth.decorators.user_passes_test
> )
>
> On Sat, Aug 26, 2023, 11:20 'Simon Connah' via Django users <
> django-users@googlegroups.com> wrote:
>
>> I want to make sure that the only people who can update and delete an
>> object are either superusers or the person that originally created them but
>> I'm not sure how to go about doing it. Can someone point me in the right
>> direction?
>>
>> I'm not sure which method(s) to override.
>>
>> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/iT1fh6Btk96LInLjgvQNNIOeqZTL6TMcV5IbsAmfVdnR1ujaNPCbV_zhJeXr5o7emCHzK_BHnYDtyxQ1ZJVu7oDGqyDRkJirWsaGto-5bbA%3D%40protonmail.com
> <https://groups.google.com/d/msgid/django-users/iT1fh6Btk96LInLjgvQNNIOeqZTL6TMcV5IbsAmfVdnR1ujaNPCbV_zhJeXr5o7emCHzK_BHnYDtyxQ1ZJVu7oDGqyDRkJirWsaGto-5bbA%3D%40protonmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAPUD46vM6PEJK4btLa-DCF8-VvExdnJ2OpzB0-Z6h03CVWvzOg%40mail.gmail.com.


Re: UpdateView and DeleteView

2023-08-26 Thread Ruby
You can simply set a test case using the built-in user passes test (
https://docs.djangoproject.com/en/4.2/topics/auth/default/#django.contrib.auth.decorators.user_passes_test
)

On Sat, Aug 26, 2023, 11:20 'Simon Connah' via Django users <
django-users@googlegroups.com> wrote:

> I want to make sure that the only people who can update and delete an
> object are either superusers or the person that originally created them but
> I'm not sure how to go about doing it. Can someone point me in the right
> direction?
>
> I'm not sure which method(s) to override.
>
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/RC50Lr8yv1j7M_cjvPHLpvLJ1RzHJP3QQaF5oQu4vAmfeijfMbprfVyyHGTIvg9udwKhe_-XcM9tYH9tRyaX-MDQauXKf3PiJbMOq2hEfj4%3D%40protonmail.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/CAPUD46vjq2Wm%3DMdFbkx-HBk_fjnbHAE%3Dn1UsGpfv6uOCdxXOhA%40mail.gmail.com.


Re: Timezone issue in when storing in DB

2023-08-16 Thread Ruby
You seem to be reinventing the wheel, Django already has timezone support
when you set USE_TZ
 to
True,
Note that your TIME_ZONE

would
be the default timezone for your project.

With everything set, you can now use .activate()

available
in `django.utils.timezone` to get the current time in your preferred
timezone.

I hope this answers your question.

Best regards
Reuben Sunday 

On Wed, Aug 16, 2023 at 3:35 AM Madhusudhan Reddy 
wrote:

> Hi All,
>
> I am trying to store the date with the timezone.
> for example, my servers are in Mumbai, when my servers are trying to get
> the time of America/Detroit. it is not able to get proper time
>
> Here is the snippet and details
> [image: Screenshot from 2023-08-16 08-00-21.png]
> def get_created_at(timezone):
> local_tz = pytz.timezone(timezone)
> print(datetime.utcnow())
> created_at = local_tz.localize(datetime.utcnow()).astimezone(tz=pytz.
> timezone(timezone))
> return created_at
>
>
> --
> Best regards,
> Madhusudhan
> +91 90007 79457
> Gmail  | LinkedIn
> 
>
>
> --
> 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/CAFwQctLvw9KinV8a%3DVTysi_NSNJfu3rodBoBPCY5Cih_ih-DGQ%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/CAPUD46vztpvyb8P21vnBf9Wt2d2r6NQ-hgPDD3kyCc%2BpZu3siA%40mail.gmail.com.


Re: Logout time

2023-07-28 Thread Ruby
I could barely understand what you meant,
I believe you're looking for a way to set how to set a session cookie age,
if that is the case, see SESSION_COOKIE_AGE


If that is not the case, note that you also have `last_login` and
`last_logout` object which is available to you when using
`django.contrib.auth`


*Reuben Sunday*
Contact For Further Assistance  

On Fri, Jul 28, 2023 at 3:46 PM Madhusudhan Reddy 
wrote:

> To get Logout time based on login time,
>
> login time = some thing
>
> logout time = login time + 8 hours
>
> use datetime timedelta module in python,
>
> >>> CODE <<<
> from datetime import datetime, timedelta
> login_time = datetime.now()
> logout_time = login_time + timedelta(hours=8)
> >>> CODE <<<
>
>
>
>
>
>
>
>
>
> On Fri, 28 Jul 2023 at 20:05, Prashanth Patelc 
> wrote:
>
>> Hi all,
>>
>> How to get logout time based on login time in python?
>>
>> I'm storing hour in one column
>> Eg ; hour
>> 8
>> Based on 8 Calculate logout time
>>
>> My login time 10:00:00
>>
>> I need 6: 00:00 (based 8)
>>
>> --
>> 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/CAMCU6Cpe32Pcs5PAmbx8LDcJzqqPwuhJVzrz%2B%3D67-tEMBychOw%40mail.gmail.com
>> 
>> .
>>
>
>
> --
> Best regards,
> Madhusudhan
> +91 90007 79457
> Gmail  | LinkedIn
> 
>
>
> --
> 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/CAFwQctLwNxagOX-QKVUdp58gk4px0M_qftqU3rnHayGaJ9BjAw%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/CAPUD46vOiqqe0YTBeWG-vDS8ng-8TR%3D2JG5j_d0vFmeDM36-8g%40mail.gmail.com.


Re: NGINX PAGE NOT FOUND

2023-07-28 Thread Ruby
Hi,
Have you checked the organization of your URL patterns?.

On Thu, Jul 27, 2023 at 12:16 PM clas...@gmail.com 
wrote:

> Dockerfile
>
> ###
> # BUILDER #
> ###
>
> # pull official base image
> FROM python:3.11.2-slim as builder
>
> # set work directory
> WORKDIR /app
>
> # set environment variables
> ENV PYTHONDONTWRITEBYTECODE 1
> ENV PYTHONUNBUFFERED 1
>
> # install system dependencies
> RUN apt-get update && \
>  apt-get install -y postgresql-server-dev-all gcc python3-dev musl-dev
>
> # lint
> RUN pip install --upgrade pip
> RUN pip install flake8==6.0.0
> COPY . .
> RUN flake8 --ignore=E501,F401,E231,F405,F403,W292,E712,W503 ./app
>
> # install python dependencies
> COPY ./app/requirements ./requirements
> RUN pip wheel --no-cache-dir --no-deps --wheel-dir /usr/src/app/wheels -r
> ./requirements/prod.txt
>
>
> #
> # FINAL #
> #
> # pull official base image
> FROM python:3.11.2-slim
>
> # create directory for the app user
> RUN mkdir -p /home/app
>
> # create the app user
> RUN addgroup --system app && adduser --system --group app
>
> # Set working directory
> WORKDIR /app
>
> # install dependencies
> COPY --from=builder /usr/src/app/wheels /wheels
> COPY --from=builder /app/requirements/prod.txt .
> RUN pip install --upgrade pip
> RUN pip install --no-cache /wheels/*
>
>
> # Install dependencies
> COPY ./app/requirements ./requirements
> RUN pip install --upgrade pip
> RUN pip install -r ./requirements/prod.txt
>
> # Copy entrypoint.sh
> COPY ./docker/prod/entrypoint.sh /entrypoint.sh
> RUN sed -i 's/\r$//g'  /entrypoint.sh
> RUN chmod +x /entrypoint.sh
>
> COPY ./app /app
>
>
> # chown all the files to the app user
> RUN chown -R app:app /app
>
>
> # change to the app user
> USER app
> ENTRYPOINT [ "/entrypoint.sh" ]
>
> On Thursday, July 27, 2023 at 5:37:57 AM UTC+1 clas...@gmail.com wrote:
>
>> Hello,
>> kindly help me with a solution i have a issue with my nginx it uses
>> docker-compose with clery and flower dashboard which point to difrent url
>> the flower url works fine as expected but the main django sever not working
>> saying page not found
>>
>> docker-compose
>> version: '3.9'
>>
>> services:
>>   api: 
>> build:
>>   context: .
>>   dockerfile: docker/prod/Dockerfile
>> image: 1.dkr.ecr.eu-west-2.amazonaws.com/pro:web
>> command: gunicorn core.wsgi:application --bind 0.0.0.0:8000
>> --timeout 420
>> logging:
>>   driver: "awslogs"
>>   options:
>> awslogs-region: "region"
>> awslogs-group: "amazon-linux-proxi"
>> awslogs-stream: "amazon-linux-proxi"
>> volumes:
>>   - ./app:/app
>> ports:
>>   - '8000:8000'
>> env_file:
>>   - ./.env
>> restart: unless-stopped
>>
>>
>>   celery:
>> <<: *api
>> command: celery -A core worker -l info
>> ports: []
>> volumes:
>>   - ./app:/app
>> env_file:
>>   - ./.env
>> depends_on:
>>   - api
>>
>>
>>   celery-beat:
>> <<: *api
>> user: root
>> command: celery -A core beat -l info
>> ports: []
>> volumes:
>>   - ./app:/app
>> env_file:
>>   - ./.env
>> depends_on:
>>   - api
>>   - celery
>>
>>
>>   dashboard:
>> <<: *api
>> command: celery --broker=${RABBITMQ_URL} flower --port=
>> ports:
>>   - '25559:'
>> env_file:
>>   - ./.env
>> depends_on:
>>   - api
>>
>>   - celery
>>   - celery-beat
>>
>>
>> server {
>> server_name tools.com
>> client_max_body_size 100M;
>>
>> location / {
>> proxy_pass http://127.0.0.1:8000;
>> proxy_set_header Host $host;
>> proxy_set_header X-Real-IP $remote_addr;
>> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
>> }
>>
>>
>>
>> listen 443 ssl; # managed by Certbot
>> ssl_certificate /etc/letsencrypt/live/tools.com/fullchain.pem; #
>> managed by Certbot
>> ssl_certificate_key /etc/letsencrypt/live/tools.com/privkey.pem; #
>> managed by Certbot
>> include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
>> ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
>>
>> }
>> server {
>> if ($host = tools.com) {
>> return 301 https://$host$request_uri;
>> } # managed by Certbot
>>
>>
>> server_name tools.com
>> client_max_body_size 100M;
>> listen 80;
>> return 404; # managed by Certbot
>>
>>
>> }
>>
>>
>>
>>
>>
>>
>>
>> --
> 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/d0fd6508-f5f1-41af-aae0-efdb695f2aden%40googlegroups.com
> 
> .
>

-- 
You 

Re: Pls recommend a course or youtube channel to prepare me for interview coding challange.

2023-06-26 Thread Ruby Shell
Hi Alerechi, consider taking some demo challenges on codility (
https://www.codility.com/).

On Mon, Jun 26, 2023 at 5:00 PM Alerechi Ordu 
wrote:

> Hello django family,
>
> I am almost 1 year now in Backend development with django, i am looking
> for a new role and has done some interviews, but i think some interview
> coding challanges are tricky, i need any material that could help to better
> prepare me for an interview coding challange.
>
> Any kind of meteria is appreciated, but though I prefare vidoe more.
>
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/539b251c-806b-4901-9fdb-779a7412140dn%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/CAPUD46sokDErryBuV972vOCYh1kKYScX9guvTPEWHh2wnO-j7A%40mail.gmail.com.


Re: Dashboard with plotting graph

2023-06-22 Thread Ruby Shell
Most time, it is wise to fetch your data from Django backend and then 
visualize it with javascript libs such as Apex chart, chartJS, chartist 
(you name them). And if you still wish to do it in the python way, you may 
have to take a look at Ploty for python (https://plotly.com/python/)

On Wednesday, 21 June 2023 at 14:41:58 UTC+1 Vitaly Bogomolov wrote:

> I like https://dygraphs.com/
>
> It's lightweight and have all option for common plots.
>
> среда, 21 июня 2023 г. в 04:53:09 UTC+4, DieHardMan 300: 
>
>> Hello, I hope everyone have a good day. I want to start building 
>> dashboard with the plotting graph in my Django 4.2 web application. So I 
>> want some recommendations of what libraries should I use or what libraries 
>> work best for you guys.
>
>

-- 
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/f49adbec-5254-45e9-ae0b-a26fb848f56bn%40googlegroups.com.


Re: User not Authenticating.

2023-04-24 Thread Ruby Shell
`authenticate` requires a positional argument (request)
try  userLogin = authenticate(request, username=username, password=password)

On Monday, April 24, 2023 at 5:51:45 PM UTC+1 oluwafemi damilola wrote:

> userLogin = authenticate(request, username=username, password=password)
>
> On Mon, 24 Apr 2023 at 17:29, Opeoluwa Fatunmbi  
> wrote:
>
>>
>> Let me see your login.html
>>
>>
>>
>>
>>
>>
>> On Mon, 24 Apr 2023 at 17:28, Lawal Tobiloba Samuel  
>> wrote:
>>
>>> code here:
>>>
>>> def loginPage(request):
>>> if request.method == "POST":
>>> username = request.POST.get("username")
>>> password = request.POST.get("password")
>>> userLogin = authenticate(username=username, password=password)
>>> if userLogin is not None:
>>> login(request, userLogin)
>>> return redirect("home")
>>> else:
>>> messages.info(request, "Username or Password incorrect.")
>>> context = {"title": "User Login"}
>>> return render(request, "account/login.html", context)
>>>
>>>
>>>
>>>
>>>  
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>  
>>>
>>> *Lawal Tobiloba Samuel*
>>>
>>> *Computer Engineer*
>>>
>>> *Front-end Developer*
>>>
>>> *IT Support Specialist*
>>>
>>>  
>>>
>>> *Mobile: *+23480-6386-0181
>>>
>>>   +23481-2027-2000
>>>
>>> *Email:*oluwash...@gmail.com
>>>
>>>   lawalt...@yahoo.com
>>>
>>>  
>>>
>>>  
>>>
>>>  
>>>
>>>
>>> On Mon, Apr 24, 2023 at 5:26 PM Lawal Tobiloba Samuel <
>>> oluwash...@gmail.com> wrote:
>>>
 Hi devs, 
 I wrote code for user authentication and login but I am not quite sure 
 of it. On the web interface it keeps displaying username or password 
 incorrect (message set in views.py).

 -- 
>>> 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 view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/CAAscozW9b%2B-RBrnBtNJMMdz5w%3DOStYRuW1mf35kaTBBva%2Br6Lg%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...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CAKVBneJRaAxWhK2D7cqfS5i7YBOBWH50axCMZj6-c-NTDtMSbA%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/2535b83b-785f-4ceb-9108-60b183771dfen%40googlegroups.com.


DO U WANT TO KNOW ABOUT SCIENTOLOGY?

2008-05-01 Thread ruby


HELLO FRIEND IAM SHALINI,

DO U WANT TO KNOW ABOUT
SCIENTOLOGY?

 PLS LOOK AT THE BELOW
WEBSITE.

 www.bigconcern3.blogspot.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



how to make django's sub dir rewritable?

2008-01-24 Thread ruby

can anyone give me a hint on how to add a rule to make the subdirectory
redirect to a different directory under apache?
where django mod_python using the same directory.

suppose i have a dir "/dj" and have a subdir "/Web/js",
my template's js src value is "js/myscript.js",
I want the dir "/dj/js/" can be redirected to "/Web/js",
since all js are located in this dir.
and better not handled by django for performance reason.

can anyone help me on this?
thank.




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---