Hello Aldian Fazrihady,
Your code is working,
How to link this code to my user so that when I search the code I should
grab user profile.
Thank you so much for sharing the approach.
On Fri, Oct 4, 2019 at 8:41 PM Aldian Fazrihady wrote:
> import random
> import string
>
> from django.db import
and after clicking on widgets also no errors
пятница, 4 октября 2019 г., 17:58:22 UTC+3 пользователь Dmitri S. написал:
>
> Unchecked runtime.lastError: The message port closed before a response was
> received. in Opera after page loading for the first time and no errors in
> Chrome. When I add
Hi,
In Speedy Net we generate a unique random ID with 15 digits and this is
used as the table's primary key. We don't use the DB's auto-generated ID.
The first digit of the random ID we generate is never zero.
https://github.com/speedy-net/speedy-net
Use uuid
On Fri, 4 Oct, 2019, 8:23 PM yashwanth .k, wrote:
> Hello,
>
> My model consists of user details such as username and his id which is
> auto-generated by DB(indexing).
> Apart from this, I need to assign a random unique 9 digit number for every
> user.
> The reason for assigning a
Dear all,
please anyone can send create, update, delete, retrieve using Django
mini-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
This problem also happens in Linux, with exactly the same symptoms. A
workaround has been found! It works when the file is in the proper
staticfiles folder and not inside a subdirectory.
If I add "styles.css" to the directories:
*STATICFILES_DIRS = [os.path.join(BASE_DIR, 'css').replace("\\",
Note that above solution doesn't guarantee unique id. As it is a problem of
any pseudorandom generator.
So it is possible (but unlikely) that insertion fails.
pe 4. lokak. 2019 klo 18.12 Aldian Fazrihady kirjoitti:
> import random
> import string
>
> from django.db import models
>
>
> def
import random
import string
from django.db import models
def generate_random_code():
return ''.join(random.choices(string.ascii_uppercase + string.digits, k=9))
class MyModel(models.Model):
code = models.CharField(
max_length=9, default=generate_random_code, db_index=True
Counter0 only exists for variables declared within template itself for for
loops. Lista isn't for loop variable and thus it's always empty.
pe 4. lokak. 2019 klo 17.53 Luca Bertolotti
kirjoitti:
> from the view i give to the template the following variables
>
> selezione =
Unchecked runtime.lastError: The message port closed before a response was
received. in Opera after page loading for the first time and no errors in
Chrome. When I add new form no other errors appear.
пятница, 4 октября 2019 г., 10:41:58 UTC+3 пользователь lemme smash написал:
>
> and you have
Hello,
My model consists of user details such as username and his id which is
auto-generated by DB(indexing).
Apart from this, I need to assign a random unique 9 digit number for every
user.
The reason for assigning a random number to a registered user is to search
a particular user using his
from the view i give to the template the following variables
selezione = Dbasedett.objects.filter(idbase=mod_id, revdbase=rev_test)
lista = ['test', 'test_one']
Than i return render(.{'selezione':selezione, 'lista':lista}
In the form i need to do this:
{% for dati in
Hi,
once you try with href="/static/css/styles.css">
and discard STATIC_URL completely. Check whether the css is rendered or
not? If yes, then the static-files of your project are not loaded properly.
If no, then it is definitely a bug in(2.2.6).
Thank you.
On Friday, October 4, 2019 at
Django doesn’t support composite primary key as the ORM heavily relies on a
single attribute of a class(e.g: pk or id) field for its inference and
usage in the django applications. Owing to this reason composite primary
keys are not permitted in Django. But you may use unique_together
constraint
Hi.
Django doesn't support composite keys.
pe 4. lokak. 2019 klo 14.47 narendra thapa
kirjoitti:
> as i was trying to make a composite key on students model . i wanna make
> composite key of field enrolled year and roll no but django is not
> accepting a two primary key in same model
>
> --
>
Also you never put STATIC_ROOT to STATICFILES_DIRS.
Because then you would with collectstatic command copy STATICFILES_DIRS to
STATIC_ROOT...
ke 2. lokak. 2019 klo 19.07 red sky kirjoitti:
> My system: Windows 10 1903. Python 3.7.4, 64 bit.
>
> My directory structure:
>
Hi.
It seems that you have mixed some concepts here.
First you rarely need to manually serve static files in development. Django
takes care of that when using runserver.
STATIC_ROOT is location where static files are collected when you run
collectstatic management command. And that command you
I think this might be a bug.
It renders the static css files if I configure it as
STATIC_URL = 'static/'
and then change my code to href="/static/css/styles.css">
This breaks compatibility with django toolbar, though...
I think this might be a bug.
El jueves, 3 de octubre de 2019, 23:13:19
as i was trying to make a composite key on students model . i wanna make
composite key of field enrolled year and roll no but django is not
accepting a two primary key in same model
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
Simpleisbetterthancomplex.com
Kind Regards
On Fri, 4 Oct 2019, 09:32 lemme smash, wrote:
> it's more about client, so you probably want to look for calendar
> libraries and then JUST make an api for it.
>
> On Tuesday, September 24, 2019 at 12:47:37 AM UTC+3, Perceval Maturure
> wrote:
>>
and you have no errors in browser console?
On Tuesday, October 1, 2019 at 11:41:28 PM UTC+3, Dmitri S. wrote:
>
> I have a formset with fields with Select2 widgets and a calendar
> (date-picker) from django app.
>
> And I use dynamic addition of formset forms.
>
>
> When I render a template for
you probably may want to figure out what you actually need to do first
On Tuesday, September 24, 2019 at 5:54:12 PM UTC+3, Rain wrote:
>
> i have a question how to create school year with start date and end date
> all transaction must under this year. Thanks..
>
--
You received this message
it's more about client, so you probably want to look for calendar libraries
and then JUST make an api for it.
On Tuesday, September 24, 2019 at 12:47:37 AM UTC+3, Perceval Maturure
wrote:
>
> Is there anyone with a step by step procedure of doing this app in a
> Django 2.1 environment For
yourapp/urls.py
from django.urls import path
from . import path
urlpatterns =[
path(' ', views.index, name='index'),
]
views.py
def index(request):
return render(request, 'index.html')
On Thu, 3 Oct 2019, 17:03 Tosin Ayoola, wrote:
> Did you set your template
wut?
On Saturday, September 14, 2019 at 7:01:13 AM UTC+3, nitin kumar wrote:
>
> How does make application to understand a document!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails
25 matches
Mail list logo