Merge branch 'main' into prod
This commit is contained in:
commit
e85c26c385
|
@ -60,7 +60,6 @@ def model_admin_url(obj, name=None) -> str:
|
||||||
class StudentAdmin(ImportExportMixin, SimpleHistoryAdmin):
|
class StudentAdmin(ImportExportMixin, SimpleHistoryAdmin):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@admin.register(Student)
|
@admin.register(Student)
|
||||||
class Student(StudentAdmin):
|
class Student(StudentAdmin):
|
||||||
list_display = ("roll_no", "name", "batch", "branch", "phone_number", 'can_apply')
|
list_display = ("roll_no", "name", "batch", "branch", "phone_number", 'can_apply')
|
||||||
|
@ -79,6 +78,14 @@ class Student(StudentAdmin):
|
||||||
queryset.update(can_apply=True)
|
queryset.update(can_apply=True)
|
||||||
self.message_user(request, "Registered the users")
|
self.message_user(request, "Registered the users")
|
||||||
|
|
||||||
|
class PlacementResources(resources.ModelResource):
|
||||||
|
class Meta:
|
||||||
|
model = Placement
|
||||||
|
exclude = ('id','changed_by', 'is_company_details_pdf', 'is_description_pdf',
|
||||||
|
'is_compensation_details_pdf', 'is_selection_procedure_details_pdf')
|
||||||
|
class AdminAdmin(ExportMixin, SimpleHistoryAdmin):
|
||||||
|
resource_class = PlacementResources
|
||||||
|
|
||||||
|
|
||||||
class PlacementResources(resources.ModelResource):
|
class PlacementResources(resources.ModelResource):
|
||||||
class Meta:
|
class Meta:
|
||||||
|
@ -104,7 +111,6 @@ class PlacementApplicationResources(resources.ModelResource):
|
||||||
model = PlacementApplication
|
model = PlacementApplication
|
||||||
exclude = ('id', 'changed_by')
|
exclude = ('id', 'changed_by')
|
||||||
|
|
||||||
|
|
||||||
class PlacementAdmin(ExportMixin, SimpleHistoryAdmin):
|
class PlacementAdmin(ExportMixin, SimpleHistoryAdmin):
|
||||||
resource_class = PlacementApplicationResources
|
resource_class = PlacementApplicationResources
|
||||||
|
|
||||||
|
@ -128,7 +134,6 @@ class PrePlacementResources(resources.ModelResource):
|
||||||
model = PrePlacementOffer
|
model = PrePlacementOffer
|
||||||
exclude = ('id', 'changed_by')
|
exclude = ('id', 'changed_by')
|
||||||
|
|
||||||
|
|
||||||
class PrePlacementOfferAdmin(ExportMixin, SimpleHistoryAdmin):
|
class PrePlacementOfferAdmin(ExportMixin, SimpleHistoryAdmin):
|
||||||
resource_class = PrePlacementResources
|
resource_class = PrePlacementResources
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,8 @@ python# CDC - Backend
|
||||||
2. Create a Virtual Environment in the [CDC_Backend](./) folder with this command below <br>
|
2. Create a Virtual Environment in the [CDC_Backend](./) folder with this command below <br>
|
||||||
`python -m venv venv`
|
`python -m venv venv`
|
||||||
3. Activate the environment with this command <br>
|
3. Activate the environment with this command <br>
|
||||||
`.\venv\Scripts\activate`
|
`.\venv\Scripts\activate` (for WINDOWS) <br>
|
||||||
|
`source ./venv/bin/activate` (for LINUX)
|
||||||
4. Install the dependencies <br>
|
4. Install the dependencies <br>
|
||||||
`pip install -r requirements.txt `
|
`pip install -r requirements.txt `
|
||||||
5. Ensure that you have the PostgreSQL installed on your machine and is running on PORT **5432** <br>
|
5. Ensure that you have the PostgreSQL installed on your machine and is running on PORT **5432** <br>
|
||||||
|
@ -17,7 +18,8 @@ python# CDC - Backend
|
||||||
### Running the Application
|
### Running the Application
|
||||||
|
|
||||||
1. Activate the environment with this command. <br>
|
1. Activate the environment with this command. <br>
|
||||||
`.\venv\Scripts\activate`
|
`.\venv\Scripts\activate` (for WINDOWS) <br>
|
||||||
|
`source ./venv/bin/activate` (for LINUX)
|
||||||
2. Start the application by running this command (_Run the command where [manage.py](./CDC_Backend/manage.py) is
|
2. Start the application by running this command (_Run the command where [manage.py](./CDC_Backend/manage.py) is
|
||||||
located_) <br>
|
located_) <br>
|
||||||
` python manage.py runserver`
|
` python manage.py runserver`
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
typical conf file for pg_hba.conf for dev work.
|
||||||
|
|
||||||
|
|
||||||
|
# TYPE DATABASE USER ADDRESS METHOD
|
||||||
|
|
||||||
|
# "local" is for Unix domain socket connections only
|
||||||
|
local all all md5
|
||||||
|
# IPv4 local connections:
|
||||||
|
host all all 127.0.0.1/32 md5
|
||||||
|
# IPv6 local connections:
|
||||||
|
host all all ::1/128 md5
|
||||||
|
# Allow replication connections from localhost, by a user with the
|
||||||
|
# replication privilege.
|
||||||
|
local replication all peer
|
||||||
|
host replication all 127.0.0.1/32 ident
|
||||||
|
host replication all ::1/128 ident
|
Loading…
Reference in New Issue